Zalo DS Blog

Monday, July 31, 2017

BitBitJam 4 - Polka Sheep

It's hard to believe it's been a year already. I started doing some coding stuff for the Game Boy the past year for the bitbitJam 3. Me and sergeeo came up with Pretty Princess' Castle Escape and that was the begginning of ZGB a little engine for making games on this now 27th years old console.

I have been improving the engine a lot during the past year, but for this bitbitJam I wanted to work on something that's been annoying me the whole time: the compiler (see this post). If you've been following the scene you might already know that the current version of the GDDK is using an obsolete version of SDCC. I decided to sit down for a while and see if I could evolve it to use the latest one. The first thing I found was gbdk-n and interesting update to the library that uses the latest version of the compiler but it lacks one fundamental feature: banks support 

A further investigation actually leaded me to this post in the Game Boy Development Forum. From there I managed to create a Makefile and see what the problem was exactly. The makebin tool that comes with SDCC doesn't support roms bigger than 32k (in other words, it doesn't support banks) that's correct, but taking a better look at the generated ihx file I realized I couldn't actually do much because no offsets (code 04, extended linear address) were actually present at all on the file. So basically, both the linker and the Makefile had problems...

From there I could have started taking a look at the linker that comes with SDCC which seems to be an updated version of the old one. That's when I realized... maybe the old linker was still working fine? So I did a quick test and created a new Makefile that was using the new compiler and the old linker and voila!: SDCC 3.6.0 is now the compiler supported for ZGB. Take a look at my Makefile to see how I am doing it.

Of course this is just an intermediate solution, someone should take a look at the linker used by SDCC and fix it and also the makebin should be fixed too. In the meantime it would be good if someone could update the current gbdk to use this intermediate solution.

Happy with this advance I was ready for the BitBitJam 4! The theme of the jam this year was Velcro Sheep and there was an extra limitation this year: One Key. 

I must admit at first I didn't like the theme or the limitation. I was planning to do a Zelda game this time, and it was impossible to fit it with these limitations. I am not really a fan of one key games (and by key they clearly stated an input key so no keys to open a door or giving clues or other ways to skip the limitation LOL). This whole situation just forced all us to follow the rules, which is not bad at all. This is a Jam, and that's part of the funny thing. If you want to create an specific game, no one is forbidding you to do it today...

Once again I teamed up with Sergeeo (music + art) and this time we also were joining forces with Kirblue (level design), because we already realized we needed someone who could create some great levels and the game will be much better if we did that. This was the state of our game on Saturday evening (if you want to know more about the bg music just read Sergeeo's postmortem)

Along the week we were polishing it a little bit more and at the end we came up with Polka Sheep: a game where you need to help the main character to rescue his friends who had been captured into mysterious giant bubbles using his velcro power!

The game can be downloaded here .Leave us some comments with your feedback, we always like to read them. Source code is also available here

A week after the jam the voting started and hey... we were ranked #1 I'd like to thank everyone for voting us, it really made us very happy. But since there are a lot of really cool games there, I encourage you to take a look at all of them, it is totally worth it!

There is also something else that made me happy. Two other games of the jam were built using ZGB: Sticky Hooves In The Temple Of Vel-Cro and Velcroid

The fact that some people are starting to use ZGB means all the effort I put on it was worth the effort. There was also another game made with ZGB: Velcro Golf by brovador that sadly wasn't finished in time for the jam

Also if you are interested on Game Boy development I would like to recommend you to take a look at Imanolea's timelapse (the bg music is from Jet Set Radio!!) of his game Sheep Kaboom and if you understand spanish then you also have the video of the full development process.

After the jam I also added a few improvements to ZGB:
- Started to optimize a few core parts in assembly (since the latest SDCC allows me to mix C and asm I can now do this)
- Implemented double OAM buffer (this fixes flickering with sprites and they will no longer be splitted into two, so now you can use big sprites safely)
- Fixed the bug that was causing a random tile in the background to not be properly updated sometimes

I will continue the development of ZGB during this year, so get ready for the BitBit Jam 5!!

Labels: , , , , , ,


Post a Comment

<< Home