NokiMo
Nara Makes Games
Nara Makes Games

patreon


Game Boy Dev Insight - Too Many Actors

I am currently reviewing my game files for The Mayor of Sanctuary as I prepare a new folder and GB Studio file for the HIPPO game, and I wanted to share something with you guys that I find particularly interesting and impressive.

When developing for the Game Boy, there are a lot of limitations you run into that you must find creative solutions to overcome. Those limitations usually involve graphics and what can be shown on the screen at one time. One of those limitations is the amount of actors that can appear on the screen at any given time. The maximum number of actors on screen is ten. You also cannot have more than five in a horizontal row. When you exceed this limit, some of your actors will simply disappear. That's why when you play some platforming games, half of an enemy character will disappear for a split second if you are in line with them and other sprites on screen.

In my own game, there are only a few examples where I exceed this limit and it could cause this graphic glitch. The main one being at the daruma puzzle. You might notice half of a daruma disappear if you line them all up in a horizontal row and walk between them. Or if your hearts at the top of the screen cross paths with more than two actors (usually at the durumas also).

But I definitely ran into problems with too many actors/sprites in the pause menus. For example, my game has fifteen collectibles you can discover during your time in Sanctuary. So how do you create a menu that displays all fifteen items on one screen? You really can't. At least, not in any straight forward manor. It is not as simple as making all of them a part of the background, because you still need a way to hide/show the items based on which ones you have collected in the game. And also important to mention that my game was developed on GB Studio 2, where background tile replacement wasn't an option either. So how did I do it? Math.

Now, I'm not saying this is the only solution. There might actually be a much simpler way to do this that I did not think of. But my way of presenting over ten actors on screen at one time was to fake it... sort of. We know I can show ten actors on screen. My selector (the blinking box) being one, and then nine more of the collectibles. So that leaves six more options that are either hidden or available. That is 64 possible combinations - 2 (on or off) to the 6th power (six items). So I literally made all 64 possible combinations of collectibles that the player has in their inventory, and made a smart math function that knows where to jump in this giant collectibles map. And throw in the added complication of the new checkboxes I added to show the three items that have status effects. Jeez.

Again, this might not be the only solution. And with newer functions available in GB Studio 4, we definitely can do this much much easier. But that's how I was able to make complicated menus in my game work. And I'm pretty proud of the creativity it took to find that solution.

 

Game Boy Dev Insight - Too Many Actors

Comments

I agree. I found the limitations to mostly be a positive, especially since it helped keep my expectations in check.

Nara Makes Games

I think those hardware limitations were both a curse and a blessing, but mostly the second. It forced developers to find crazy solutions to some problems, whereas today would be more a case of "who cares, I get all the memory and processing power I want". Obviously, I'm oversimplifying, but you get my point

Damien B.


Related Creators