A Post-Apocalyptic RPG



Burnout

I guess I hit one of many mid-development burnout cycles. I decided it would be a good idea to take a step back and make a yet simpler game instead of this tiny RPG. I even went so far as to pull out the boilerplate code from Canary to serve as a platform for future games.

But I fought against this urge (after a time) and went back to Canary, and was immediately thwarted by a bug that crashed the game about half of the time going from the initial character creation screen to the dungeon screen. It took longer than it should have to isolate it to a poorly initialized Entity. Entities talk, you see, and they have an integer timer that dictates how many frames their speech shows on the screen. If that number is greater than zero, the engine displays the text in their speech buffer and subtracts one from that counter. About half the time, an entity was being initialized with a non-zero speech timer, and the engine was trying to get the length of the text buffer, which didn't have anything in it, so it was dying within the strlen function.

In the end, I got to learn a lot about c debugging, cgdb, and running CMake so that it would add debug info to the program. It also made me realize that I need to clean up the entity construction code and other places that are allocating memory.