Let’s make a Gameboy Advance game! Part 3.5
Hey all! It’s been a while, but as usual, I’ve been busy. I will admit that part of that “busy” is playing Pokemon Let’s Go, but hey, can you blame me?
In addition to school, Pokemon, and working on the start of marketing for my own game, I’ve been chipping away at what I think is my last GBA collaboration. If you can’t tell, I’m quite a fan of monster taming games like Pokemon, which is why I’m making my own game like it! This interest in monster taming games has carried over to other indie games, such as Monster Crown (weeks 1-2) and now Monster Sanctuary!
Monster Sanctuary is a very pretty monster taming metroidvania that is currently being Kickstarted with less than 3 days to go! If you like Monster Sanctuary and want to support it, go here, but gotta go fast!
This game with its visual complexity, let’s just say, is not an easy task to replicate in the Gameboy Advance hardware. I’m pretty sure at this point that I’ve figured out how to cram everything into the system’s memory, but as you can see from the screenshot, there are 4 visual layers involved. 4 very distinct layers.
If you remember last time, I put a map together using two layers (although I probably could have managed with one layer). For that one, I just popped a whole 256 by 256 image into memory and overwrote parts of it with map data to get everything in... And it was a pain! Also, it took up the entirety of the GBA’s graphical memory. Can’t really get away with this time now that I have 4 layers to worry about.
For layers one and two, I don’t have to do anything too special (now that I’m playing it smart). The reason I ran out of memory last time was because I put the whole tileset into memory at once, meaning that there were more than 16 colors in the image. Why is that a problem? If you take an image that has more than 16 colors and put it onto the GBA then you need to make it so every pixel of the image takes 8 bits, which is twice as much memory as an image that takes 4 bits per pixel would take up. Last time I also put the images into memory regardless of whether or not I needed them, which took up a lot of space, so this time lets only put the ones into memory that I am going to be using!
This is what the tileset looks like after I have moved everything around and taken out unnecessary tiles. Notice that the types of tiles come in layers: this is so that I have three different 4-bit palettes instead of one giant 8-bit palette. Technically the order doesn’t matter, but putting them into layers makes it a lot easier on me and a lot easier to feed to my custom tools. This, I believe, is already taking up a quarter of my memory.
Using these tiles I can create a two-layer map that represents the above screenshot. Nowadays I am using a tool called Tiled to make my maps as opposed to my very limited custom tool. This, of course, means that I had to make a tool that converts Tiled maps into my own format that I feed into a tool that converts it into a form the GBA can handle, but I digress.
The next layer back is a bit more of a problem. You see, the developer of Monster Sanctuary actually has that as just a 256 by 256 image and handed it to me as such, which is a great approach for PC but a not so great approach for GBA. With all of the other stuff, there is no way that I am going to fit another 256x256 image into memory, so what do I do? Split up the image into 16x16 chunks and then only take the chunks that are special and put them into memory. In this case, any spot that is completely transparent or completely black can be ignored:
Before:
After:
After all that, we have compressed the map down to almost 25% of what it originally was! Theoretically, if I went ahead and broke the image down into 8x8 chunks and did the same process on it I could have saved even more space, but it would have taken about 4 times as long to do. While I haven’t done it yet, later I will take these tiles and construct them back into the original image by making them into a tilemap and then slap that into the GBA.
At this point I doubt that I will do the fourth layer, but theoretically, I could cram it in using the same techniques as the third layer. As you can see, though, by being smart about how I use memory I can get way more graphical complexity into the system than last time. As you can probably also see, this is quite a bit of work, so if you wonder why GBA games didn’t usually look as good as Monster Sanctuary does, then that’s why.
I’ll try to get this demo actually done soon, and then I’ll try to mess with the next challenge that I previously said I would do this time: sound.
Messan in a Bottle
So for about the past year now I have been gradually working on a game of my own. Introducing a monster taming game where every monster has its own personality: Messan in a Bottle!
https://twitter.com/messaninabottle/status/1064621898485637122
I haven’t figured out a good way to post videos so this time that link will have to do.
Until next time!










