Gate Keeper
Gate Keeper is a full RPG game with a short 30 minute story. It is one of my largest and most complex projects.
The game was developed for retro consoles based on the STM32 and Raspberry Pi Pico micro-processors using the 32Blit Game Engine.
Since the engine is limited to 8x8 pixel tiles I had to heavily modify it to support 16x16 pixel tiles which Gate Keeper uses. In addition to this, the hardware limitations of the micro-processors required a lot of performance optimizations to make the game playable.
Learning opportunities
Storing the entire map in memory would exceed the specifications of the used micro-processors. Therefore the map is split up into multiple biomes such as snow, desert or grassland which consist of a 64x64 tile maps.
While Gate Keeper was initially developed for the 32Blit console which uses the STM32 chip with 583kB memory, the map size wasn’t a problem. Once the Pico System console was released, which only provides 151kB of memory, I ported the game to the new console. This caused a problem, because the 64x64 map was too large for the limited memory of the Raspberry Pi Pico. A solution for this was creating a custom compression and rendering algorithm for the map. Implementing the map compression algorithm required writing a plugin for the Tiled map editor.
The memory limitations of the Pico System were not the only problem that occurred during porting the game. The Raspberry Pi Pico micro-processor also has a weaker CPU than the STM32 chip. While the STM32 has 450MHz, the Raspberry Pi Pico has only 250MHz. This caused my personal set frame-per-second target of 60 to be not achieved. By further optimizing the rendering algorithm, I doubled the performance and achieved easily 60 FPS on the Pico System, while the 32Blit console jumped to more than 120 FPS.
At the end I also created a few pull requests on the 32Blit Game Engine to integrate features and bug fixes that were missing but my game needed. By doing this, I also contributed to the open source community which made developing for those consoles possible in the first place.
Conclusion
Once the development of Gate Keeper was completed, I released the game to the community of the 32Blit and Pico System consoles on BlitHub and later also on itch.io. There it is currently playable on Linux, macOS, Windows, the 32Blit console, Pico System and on the browser.
This project taught me a lot about performance optimizations and making software run on devices where it seems not to be possible at the first glance. It also helped understanding the balance of memory and CPU usage based on the currently available resources. Last but not least, it showed me what is necessary to port an already existing game to a new device with different hardware limitations.