First Game

Published on 2017-11-26 in µGame.

In order to write a good game framework or library, you have to make games. There is no other way — you won’t know whether you have all the necessary features until you actually try. And you won’t know if a feature is actually necessary until you need it. So the best way is to make a game, then another game, and then yet another game, and once you have covered the spectrum of different kinds of games you want to be able to make, you take all the bits and pieces from them and collect them in a single consistent library.

So far all I had for µGame was a simple “character walking around a map” demo. I needed to make an actual game. What I would most like to make are Japanese-style RPG games and roguelike games, but that would be a bit too much for a start, so I decided to make a platformer. And since there is no way to do scrolling, I decided to try and make a Bubble Bobble-style platformer, where you only see one screen at a time.

../../../_images/6847691511724437286.jpg

Of course it’s not a fun and challenging game — that would require a lot of playtesting and fine-tuning. But it has all the elements that such a game needs to have: the hero, the monsters, walls, platforms, ladders, jumping, shooting, picking up loot, death. It loads all its resources from BMP files (two banks 16 tiles each), and that, together with a non-precompiled code, pretty much uses up all the RAM on the device. But fear not, you can compile the source to .mpy files, which should free up some more space, and you can always compile the graphics into the firmware, in which case it frees 4kB of RAM for you. You also can have much more levels, since only one level is loaded into RAM at once, and there is plenty of flash space free.

Next up will be some kind of a puzzle game, and then maybe a space shooter. I’m also still working on a set of default graphics to be pre-compiled into the firmware, to save you more precious RAM.

The repository with the game is at  https://github.com/pewpew-game/circuitpython-jumperwire  and you will need the firmware from  https://github.com/pewpew-game/circuitpython/tree/ugame/atmel- samd/boards/ugame to run it.