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 > Which is better/faster, swaping memory or changing OAM?

#19130 - mr_schmoe - Sun Apr 11, 2004 7:58 pm

If I had 8 frames of animation for each of the four directions my character would travel. And each frame is 16 x 32 (8 tiles). That would be about 256 tiles. And then 6 frames an animation for each direction for the weapon usage. 192 tiles. That's nearly half of the sprite memory available. That wouldn't leave much room for the rest of the bad guys. So, my question is this, instead of changing the character name in the OAM, simply swap the character data on the vblank?

#19134 - Lupin - Sun Apr 11, 2004 8:43 pm

well, i think you can't do anything else but swap the data. You can put the data into ewram or even iwram if you still have a little space there.
_________________
Team Pokeme
My blog and PM ASM tutorials

#19136 - tepples - Sun Apr 11, 2004 9:44 pm

mr_schmoe wrote:
So, my question is this, instead of changing the character name in the OAM, simply swap the character data on the vblank?

That's straightforward. It is a bit slower than just changing OAM attribute 2 to point at a different cel, but unless you're working on a sim with scores of units, you should be able to fit it into vblank.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.