Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2017-01-22 18:49:53

Parl
New member
Registered: 2017-01-22
Posts: 3

How did Game Boy games work within the sprite limit?

Hello, I've just discovered GBDK development and I'm still reading up on it.

I was wondering how games like Mario Picross are able to work within the 10 sprite per line limit, given that it was working with 15x15 grids:
https://i.ytimg.com/vi/BT5cSu9QhPc/hqdefault.jpg

I assume that this was actually modifying the background layer and that only the animated elements such as the timer, hammer/chisel and Mario were within the sprite layer. Would this be the case?


Another example, although it is the NES, would be the memory game from Mario Bros 3:
https://i.imgur.com/CCH7dEH.png

Measuring the cards, they're three tiles wide and four tiles tall and given six cards per row (and a highlighting ring), they would clearly be beyond the sprite limit. However, the cards are animated when you select them. So, perhaps they're rendered as a background, the animations are rendered as sprites and then when the animation is finished, it's only the background layer displaying again?

I'm just curious and would love any insight into how they worked around these limits.

Offline

 

#2 2017-01-23 14:45:03

nitro2k01
Administrator
Registered: 2008-02-22
Posts: 245

Re: How did Game Boy games work within the sprite limit?

Parl wrote:

I assume that this was actually modifying the background layer and that only the animated elements such as the timer, hammer/chisel and Mario were within the sprite layer. Would this be the case?

There's no real reason why the time should be made with sprites. The general rule is to put as much as possible in the BG layer, as long as it doesn't have to move around freely. The clock animates, but stays in one place, so it's a perfect job for the background layer. Same with the card game. Even the card flip animation could reasonably be all BG, just by modifying tiles. The cursor is most likely done with sprites, however.


Blog: Gameboy Genius
"A journey of a thousand miles begins with one small step"
Old Chinese Proverb

Offline

 

#3 2017-01-23 16:14:55

Jonas
Member
From: Frankfurt, Germany
Registered: 2016-06-06
Posts: 112
Website

Re: How did Game Boy games work within the sprite limit?

If you use BGB to emulate this game, you can easily answer your question by having a look at the VRAM viewer (right click -> Other -> VRAM viewer). If you do so, you will realize that nitro2k01 is right. The only sprites on your screenshot are the hammer, the chisel and the arrows that indicate the current position.

Offline

 

#4 2017-01-23 16:27:39

Parl
New member
Registered: 2017-01-22
Posts: 3

Re: How did Game Boy games work within the sprite limit?

That's really interesting. I originally approached this thinking that the background layer was mostly static.

It makes sense, otherwise games like the Picross example wouldn't be possible.

Thank you.

Jonas wrote:

If you use BGB to emulate this game, you can easily answer your question by having a look at the VRAM viewer (right click -> Other -> VRAM viewer). If you do so, you will realize that nitro2k01 is right. The only sprites on your screenshot are the hammer, the chisel and the arrows that indicate the current position.

I hadn't even though of that. smile Thanks for the tip!

Last edited by Parl (2017-01-23 16:28:22)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson