Kendama- the making of


Kendama was built using gbdk. Unlike sheep it up though (which is also a 32kb Gameboy game) it uses SRAM, but probably not in the way you'd expect. At the beginning of SRAM, there's a flag (if not set to 1 SRAM will be cleared) after that is the highscore display tile data, then highscore data. Upon booting the game, the score data is copied into RAM, where the highscore value is located. But you can't just compare the digits because that would cause problems, as I've already seen in an earlier build of the game. The solution to this was memory management: if the highscore is less than the score then it just copies itself and whatever is in the score display to SRAM. There's a title screen as well, but the game soft resets (to save memory by not having to manually reset everything) every time you start over. Obviously I didn't want the title screen to show up every time, so I wrote to 2 unused locations in RAM. If these did not match up with the correct values, then the title screen would be loaded. The balls stacked on top of each other are also a special case: instead of individual X and Y positions for each sprite, it just uses a single byte for the entire stack (or 2 if you count the Y positions but the X positions are based off of the kendama sprite). To avoid overloading the console with sprites, once the kendama is off-screen the Y position of the stack decreases instead of the number of balls increasing.

Files

kendama.gb 32 kB
Dec 12, 2022

Get Kendama

Leave a comment

Log in with itch.io to leave a comment.