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.

Graphics > Fighting Game Sprites

#16654 - Dymitrix - Sun Feb 22, 2004 4:07 am

I just started looking into GBA development, and I am planning on writing a 2d fighting game. I'm pretty experience programmer, I just have to get use to and familirize myself with the GBA hardware. Anyhow, I have two quick questions... From my research I found that sprites can be at most 64x64... am I right? If that's the case, with the screen size at 240x160... wouldn't that make the sprites a little small for a fighting game? That would mean you have to split the sprite up. This cannot be the limitation, can it? With commercial games, I sure the sprites stand higher than a third of the screen.

My second question is just an opinion. For a background, would a tile mode rather than a bitmap be better since it will allow for subtle animation in the background and what not.

And one last thing that popped in my mind... is there a fighter demo with source at there? I find the best way to learn is through examples...


Thanx in advance for any input

#16656 - poslundc - Sun Feb 22, 2004 4:16 am

Dymitrix wrote:
I just started looking into GBA development, and I am planning on writing a 2d fighting game. I'm pretty experience programmer, I just have to get use to and familirize myself with the GBA hardware. Anyhow, I have two quick questions... From my research I found that sprites can be at most 64x64... am I right? If that's the case, with the screen size at 240x160... wouldn't that make the sprites a little small for a fighting game? That would mean you have to split the sprite up. This cannot be the limitation, can it? With commercial games, I sure the sprites stand higher than a third of the screen.


The GBA hardware isn't designed to be optimal specifically for fighting games. If your sprites are larger than 64x64, then split them into multiple sprites.

Quote:
My second question is just an opinion. For a background, would a tile mode rather than a bitmap be better since it will allow for subtle animation in the background and what not.


You can have subtle animation either way, but generally a tile mode is more useful since you can have separate layers moving independently and a separate layer for displaying things like player status if you choose to do it that way.

Quote:
And one last thing that popped in my mind... is there a fighter demo with source at there? I find the best way to learn is through examples...


Probably not specifically for the GBA, but you might find something more generic if you browse the net.

Quote:
Thanx in advance for any input


No problem, but these questions should really be posted in the Beginners forum, FYI.

Dan.

#16657 - Dymitrix - Sun Feb 22, 2004 4:27 am

Thanx... Sorry, about the post... I was wondering if I should post there. I ultimately chose graphics since I was asking about sprites...

#16659 - DekuTree64 - Sun Feb 22, 2004 5:08 am

You can also use backgrounds as full-screen sprites. In mode 0, you have 4 BG planes, that leaves one for background, 2 for players, and one for status. Or if you want a foreground you could use sprites for the status.

Personally I'd just split them up into smaller sprites though. The way my RPG's sprite system works is it has a shadow OAM that it clears each frame, and then the update function just goes through updating all the sprite positions and stuff, and then gets OAM entries to fill out for display.
That way, you don't have to keep track of all the OAM entries a large sprite is using, you can just check the size and for example, if it's a 64x128 sprite, claim one entry for the top and set it up, and then one for the bottom and set it up with Y pos +64 and tile +64 (8x8 tiles=64 tiles per chunk), and then let the OAM manager take care of copying it over to the hardware OAM during VBlank.
The main purpose for such a system is sorting though (like if you stand infront of someone you want your head to cover their feet, not the other way around), but for a fighter that's not an issue, so you can just store specific OAM entries or whatever way seems easiest.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku