Zalo DS Blog

Tuesday, January 03, 2017

ZGB, a little engine for the Game Boy

2016 has been an interesting year for the Game Boy scene. I remember back in 2015 talking with people developing for the Game Boy saying lots of docs with important info had been lost over the years and that the scene was dying... Well, I am not sure what happened, but in this past year I've seen some really cool games like: carazu, Rocket Man, Where's my cake?Soup Raiders: Jailbreak, Biotic Limit, Snake Bird, Araku Hime: The Red Princess, Guns & Riders... it seems that the game boy scene has revived!!


Besides Pretty Princess' Castle Escape and Super Princess' 2092 Exodus I have been working on an engine that at some point I decided to name ZGB. This is the engine that both games are using. Some of its features:

- 4 directional scroll that allows maps bigger than 32x32. This is done updating the current row and column as the scroll moves.
- Sprites pool, that will help you manage everything that is moving on screen. It will also handle the creation and destruction of new sprites on screen
- Animations
- Collisions, sprite vs sprite and sprite vs background
- Automatized build support. Just 3 lines of code
- Bank management. Easy to select the bank for every file on the project and transparent bank switching in most cases
- Fonts and printing, and also some tools that will help to debug some values
- Music, using the legacy version of gbt-player
- Sound effects, using the fixed version of the sound sample that comes with the gbdk

ZGB is available on github. You can take a look at all the things you can do with it and there is a tutorial showing you how to create a game step by step. You can also download the source code from Pretty Princess' Castle Escape and Super Princess' 2092 Exodus and see how they do their stuff (or even create some rom hacks if you want :P)



There is a tutorial showing you how to code this

Just for clarification: this is not the definitive engine for the Game Boy. It is written in C using gbdk and that adds a lot of extra garbage on the code . Also there are some parts that still could be optimized a lot. But I think it is good for people who want to do something relatively fast (You know what other options you have if you really want to squeeze the machine). I think it perfectly fits on a game jam. 

There will be more game jams in 2017. I'd like to ask you to give ZGB a try. You'll make me very happy if you create something fun with it (I might even cry). I have already fulfilled one of my childhood's dreams and would like to see you doing it too: create a videogame for the Game Boy.

Happy coding!

ZGB on github

Monday, January 02, 2017

Super Princess' 2092 Exodus

Initially developed for the gbjam5 this is the second game I develop for the Game Boy and also together with sergeeo doing the art and music.

The gbjam5 ran from October 1st 2016 at 7:00 AM to October 10th 2016 at 7:00 AM. 399 games were entered, wow! Contrary to the bitbitJAM the games were not required to work on real hardware, actually the games just needed to be thematized as Game Boy games. I already had the engine I created for Pretty Princess' Castle Escape and I wanted to give it another try. Most of the time I spent on the bitbitJam was actually on the engine and not the game itself, so I knew we could do something better.


The first version of Super Princess' 2092 Exodus was developed in 48 hours. It only contained one level (7 screens) but it was more complete than Pretty Princess. I saw there was still a lot of improvements that could be done on the engine so I decided to continue working on it for a while. At the same time we also wanted to improve the game after the jam, so since them we have:

- Improved the jump (that was the main complain from people)
- Added 2 new levels, with their music, tileset and maps
- Added the screen transition similiar to the one you see in Megaman Games
- Moving Platforms
- 5 new enemies
- Better menus
- Sound effects
- An ending!

The game is not hard but it isn't easy either... in other words you won't finish it on your first try, just like videogames used to be. If you get killed, just try again



We are very happy with the result and hope you all enjoy it. You can play it here (just remember the experience is much better if you download the rom and play it on an emulator, or even better on real hardware)

Source code is also available on github