gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Displaying the current score.

#4495 - Indecisive - Tue Apr 01, 2003 9:07 pm

Can anyone recommend a good way of displaying the current score?

I'm making a simple game (chickens, baskets, clouds, maybe a windmill) and I need to display the current score in the top-left.

Currently, the only idea I have is to use a sprite for each digit of the score. It also occurred to me I could make the score part of the background (if I make tiles that are digits).

Which would be the better method?

If anyone knows of a different way to do this or has some nifty routines then all help would be welcome.

(My internet connection seems to be playing up so this may have multiple posted. Sorry)

#4496 - Daikath - Tue Apr 01, 2003 9:24 pm

http://forum.gbadev.org/viewtopic.php?t=671

that was on the first page of this forum ;).
_________________
?There are no stupid questions but there are a LOT of inquisitive idiots.?

#4497 - Indecisive - Tue Apr 01, 2003 9:52 pm

Yeah, okay, sorry about that. I saw "score board" and thought it would be high score table stuff. Should have looked closer...

#4520 - peebrain - Wed Apr 02, 2003 3:11 pm

In reply to that dead thread (only after seeing this thread did I read that), can you explain this more, tepples (or anyone else?)?

"If you only scroll a limited amount, try setting a vcount interrupt to partition the image into status-bar and playfield regions. Super Mario Bros. and Super Mario Bros. 3 for NES do essentially this."

~Sean
_________________
http://www.pbwhere.com

#4529 - Quirky - Wed Apr 02, 2003 4:43 pm

It's a trick that is pretty much obsolete on the GBA, because of its multiple layers.

You scroll most of the screen the regular way, then when you reach a certain scan line, the interrupt kicks in and you set the scroll registers to 0. The rest of the screen then stays fixed. Very cunning, but if you just have 1 or 2 BGs and the score board, you'd be better off sticking the scores on a seperate background layer or doing them as sprites.