Let's talk about Rogue: Genesia's future
Hello everyone
No, the game is not (totally) dead, but we'll need to discuss something.
I've had people complain about how much I only considered discussions with the community on Discord, but this time I'm going directly to Steam.
What happened
First, let's talk about what happened during the development of Rogue: Genesia.
Initial Plan
Initially, I planned for only minor updates and bug fixes on Rogue: Genesia, while I focused on my next game (which has progressed a lot, the prototype phase is completed, and actual development started a little while ago, can't wait to be able to share more about it!).
Co-op
There are 4 reasons I always said Rogue: Genesia wouldn't have co-op multiplayer.
-
Design-wise - there are many things that have never been designed to work in multiplayer (like corruption, anachronistic, leveling up). This is the easiest to change, I can set up custom rules for multiplayer (like having corruption affect only the local player for stuff like health, damage, defense, and having stuff like speed buffs be averaged).
-
**Codebase **- The game has a ton of static references to the local player for everything (cards, weapons, enemies, artifacts, equipment...), over the years, I've tried to reduce a lot of this by implementing an "owner" for such things, but there was a seemingly endless amount of stuff still referencing the local player.
-
**Network load **- A major blocker is that the game has a lot going on, just synchronising projectile positions would require a high-end connection and eat up bandwidth (and that's without even talking about network limits imposed by either Unity or Steam itself).
-
**Performance **- I know players have performance issues with late-game runs (too much is happening), and I don't even know how I could optimise the game further to handle twice, or maybe even 4 times the load. I did spend the whole development of the game trying to gain performance and optimise the game, but in the end, the main issue was just too much damage processing happening, and even hiring a senior engineer to optimise the game resulted in no gain. (Optimising games was part of my job before working on Rogue: Genesia.)
So, while point 1 could easily be fixed, point 2 could be fixed with a lot of patience. Point 3 would take me maybe up to a year to find solutions and implement networking (and I simply did not have the experience with multiplayer at that time to handle it). Point 4 would be the ultimate blocker, and even spending years on it refactoring the game code may not give enough performance gains to handle multiplayer.
So I simply gave up on the idea, finished working on Rogue: Genesia, and started to work on my next game (which is a co-op multiplayer roguelite).
Humbling surprise
However, stuff happened, and I wanted to take a small break from the next game while experimenting on Rogue: Genesia with an LLM. I made a separate branch, and wanted to have fun watching it try to implement co-op. I did not expect any results, nor really care how much it would mess with the codebase since it was on a separate branch of a game that had already reached its end of development, so the codebase not being maintainable wasn't really an issue.
I expected it to fail spectacularly, which it did for quite a bit of time, but after a bit (a lot) of guidance, it actually managed to get very bare-bones multiplayer working. I started to take it more seriously, corrected a lot of things it got wrong (like trying to synchronise every projectile 60 times per second, which could work in a normal game, but not when there are 20 thousand projectiles per player). After a lot of trial and error, it reached point 3, and I thought it would be blocked on point 4 anyway.
(Another person with years of experience and I did not achieve anything impactful on performance even after years.) I set up a benchmark runtime with profiling, and did a loop where the agent would suggest optimisations, I would give it guidance, it would implement them, run the benchmark, compare results and loop back.
In only 9 days, it achieved up to 10x the framerate. A single-player run in the worst case went from 3-5 fps (unplayable) in both ultra and low (the game was CPU-bound) to a stable 18-20 fps (barely playable) in ultra and 50 fps in low (so the game is GPU-bound, but I have many things I can do to improve GPU performance that I plan to do).
In multiplayer, for the same load per player (4 players), it went from 20 sec per frame (multiplayer had a lot of implementation issues affecting performance) to 10 fps (that's 200x).
Video of 1.1 performance
Video of current optimisation
(Low quality currently has a bug where Sun Sword and Crystal Sword become invisible, but that's an easy fix.)
(Specs used for those videos: Intel i9-14900K, 64 GB DDR5 RAM at 4800 MT/s, RTX 3090.)
Time estimate
Here is the list of changes made, and how much time they would have taken me:
-
Migrating projectiles, enemies and summons into ECS Likely months, maybe at least a year, I would have basically made Rogue: Genesia 2 from scratch.
-
Separation between rendering and simulation of projectiles
Would be part of the migration of projectiles into ECS, but it requires extra effort so projectiles can deal damage and be properly simulated without being rendered.
-
Migrating physics from the default 2D physics of Unity into 2D Physics Core that can handle ECS data Likely 1-3 months, and 6-9 months to debug completely (that was the time it took me when I migrated from 3D physics to 2D physics).
-
Multithreading damage processing 2-4 months to migrate and make sure no bugs would be left hidden.
-
Migration of damage processing into Burst I don't even know, I would need to learn to use Burst properly, and then the implementation would have a ton of requirements.
-
Changed presentation of projectiles from GameObjects to particles This one is something I could do the fastest, maybe about 1 week at most, I did a bit of preparation work since LLMs are pretty bad with particle effects, so I did a lot of migration work here.
-
Batching damage processing as much as possible (the first 5 hits per enemy per weapon per frame are independent, then all other damage applied is aggregated into one single big hit) 1-2 weeks, but it would have taken me more time to properly make it work with Burst.
-
Optimising heap/stack usage to reduce garbage collection Not a big job, nor a big impact, but it's a lot of small work all over the code, so likely a few weeks.
-
AND many other minor things like caching as much as possible, converting classes into structs, creating lightweight variants of some classes for specific needs...
Modding
After that, I went and asked it to create modding tools out of curiosity, and it was able to create an in-game card editor, fully data-oriented content creation, and even a damn graph for effects.
(And yes, all of this is functional in-game.)
[carousel]
[/carousel]
What now?
What was initially just a fun experiment ended up being what it is now, a clanker easily did what I couldn't do in years... It's not the magical tool a lot of tech bros portray it as, it requires a ton of babysitting, challenging its decisions, having to look back into what bugs it introduced, or what bad decisions it made. But it did work well and fast.
Is the result perfect? No, it does require a bit of extra testing, a lot of polish, and that's something they are pretty bad at, but I am good at...
I now have 2 choices:
-
Accept including LLM-generated code in Rogue: Genesia, but allow players to have co-op, MUCH better performance, and proper modding tools (and a ton of other improvements I can add to the game).
-
Refuse to include LLM-generated code, limit updates to a minor bugfix patch that I had prepared before this whole experiment.
A part of me doesn't like the idea of integrating LLMs into real production, but I cannot deny how much of an impact it can have on the quality of the game. Especially given how I always wanted to push the game, sometimes putting my own health and personal life aside.
I believe it can be used as a great tool, but I cannot be blind to the stigma it carries either, and to some of the ethical issues it can have related to data processing and licensing. I think that hiding it is unethical, and going into a witch-hunt every time anything related to AI is mentioned would just push developer to maliciously hide their usage of LLM/AI rather that limit/not use. I personally have my limit of what I would accept in my game (no generative AI for assets), but I know everyone has different limits and opinions.
This is why I wanted to be transparent and have a discussion with the community of the game before proceeding further with it.
I want to end with a disclaimer that you are free to share your opinions, but avoid insulting each other. Doing so will just result in a ban, the goal of this news is to have an honest discussion and be as transparent as possible.
Комментарии 0
Гостевые никнеймы не подтверждают личность. Все комментарии проходят проверку владельцем сайта.
Обсуждение ещё не началось.