blog #gamedev ##Saturn Engine

Scene handling in Saturn Engine (WT)

After a rough start with teaching myself game programming I spent many hours of 2017 and 2018 working on a Tohou clone based on this tutorial. Eventually I made it to the point where I could almost call the program a game: you could move a sprite, shoot bullets, destroy enemies that shoot their own bullets and so on. But there was a problem: this was my first C program that incorporated more than a main function, so my general programming skills with the language were really shallow at the time. Naturally my codebase reflected that. Working with the code I had written felt far from pleasant, especially because I had locked myself in. Had I continued working on the game without rewriting the entire thing there would have been little room for me to try out new things and more advanced concepts. So I started over with the goal to write a more general engine that I could use as the basis for future projects as well. That was back in march. Setting up the basics (input handling, rendering, framerate control etc.) took me a while, but now I finally reached the point where I could write a new scene management system. Here's the main portion of my old main() function: