InfestedRL Post-mortem – Why it FAILED
Source: Splintered Core CRPG
It’s official. InfestedRL has failed.
More specifically, my 7 days roguelike challenge had failed. I am especially frustrated because I spent more than 10 hours a day working on it and still by the end of the week I’m only about 40% there.
This will be a long post-mortem in the most brutal fashion.
Engine work is IMPORTANT
I went into the challenge without finishing the engine first, thinking that since I had a prototype done in the past it would be little work to expand it into a full game. Truth? That’s about the stupidest idea ever conceived in my life.
Here’s what the engine could do before the 7DRL:
- Have a primitive rendering system in place
- Have a primitive entity management system in place
- Can render a player sprite to the middle of the screen, and move it around
- Have resource managers to manage resources needed in teh game
Here’s what I wrote in the week, including refactors:
- Previous animation system didn’t stood up to the test. It became messy quickly, forcing a refactor that took 2 days to implement and test.
- Entity management had to be expanded because of the lack of foresight.
- Camera entity written to isolate camera related code from the player entity
- Wall code re-written
- Scene loading
- Dungeon generation
Here’s what I still need to do:
- Refactor the input management system
- Refactor the entity management for flexibility
- Refactor render code to pre-calculate more things
- Save/load scene
- GUI system
- Time/turn management system
- Scene switching and global state management
- Message system
- FOV and LOS system
See that? The list of features needed in the engine grows exponentially once you get down and dirty into the game code. You can sit in front of the monitor the whole year, planning the game on paper, thinking that you know everything you need, but once you really start coding you’ll ALWAYS find out that you haven’t done enough planning.
Could this been prevented? Unlikely. It is an experience problem – this is my first time writing a game, and naturally, I know less than I think I do. The only way to prevent this is to continue on InfestedRL, finish it and release it.
In summary, engine work is crucial. In my experience, engine code takes 90% of the work while scripting only takes less than 5% of the time. The actual “game programming” takes very little time if you have a good engine working in the first place. If you don’t, be prepared to waste time refactoring a lot of things.
Animation system is not a smart idea
Early in my designs, I decided that I wanted to make a graphical roguelike.
Bad idea.
No, making a graphical roguelike isn’t a bad idea. Making an ANIMATED graphical roguelike isn’t too. Trying to do that in a 7DRL is however, downright moronic.
I took 2 days to write the animation system, and another day to fix it when I realized that it was insufficient to handle what I am planning to do. And another half a day to refactor a minor portion of it when I realized that my entity management system isn’t tied in well enough to the animation system.
Conclusion? Never attempt animation if you never did it before, if this is your first time writing a game, and if you have a very limited time frame to do it.
Optimization is about experience
I didn’t know that per-pixel alpha would kill the frame rate so much. Took me 2 hours to figure it out, and then another hour to convert all my tilesets to 8-bit PNGs with colorkeys and dithered alphas, which sped up the frame rate back to playable speeds.
Which brings me to my point – knowing what to do in order to get an optimized frame rate output depends on your experience in writing games. The more you write, the more games you publish, the better you will understand what kind of requirements your game needs in terms of assets and resources. What kind of file format, what kind of pixel format, etc.
I think this is the best thing the 7 days challenge had taught me. I believe I’ll learn more once I release InfestedRL.
Don’t be too ambitious, n00b
If this is your first time working on a game, do something simple. Writing a pac-man game would teach you the EXACT SAME lessons you would have learnt from writing a roguelike. Well, at least this is true in my case.
Animations, game states, global variable tracking, game logic, etc, most of them are similar in games, be it a roguelike or Tetris.
Starting with a roguelike is generally a great idea, but do not be too ambitious. A dude walking around a dungeon killing goblins (only 1 monter type) with a wooden sword (only 1 item type) is a good enough scope. Trying to add in spells, multiple monsters, bosses, and such would severely tax your capabilities to finish it in the first place.
So don’t bite off more than you can chew.
What I ended up with
I will continue work with InfestedRL, and hopefully release it sometime before the end of September. Since this is no longer a 7DRL, I’ll be adding in cut features like multiple survivor types and more monster types.






French