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 > Animated Backrounds?

#8445 - crossraleigh - Thu Jul 10, 2003 9:45 pm

How do they make moving backgrounds, like waves in water? e.g.: Zelda: A Link to the Past has several 'animated backrounds'.

Do they just swap the tiles in and out, or what?

Thanks,
Raleigh Cross

#8452 - tepples - Fri Jul 11, 2003 12:17 am

Swapping tile data in and out is the most common method of animating a background, used since NES days.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#8619 - Nessie - Wed Jul 16, 2003 6:27 pm

An alternative (not necessarily better) is to have each of the anim tiles in vram (assuming they can all fit), and then change the map tile index to point to whichever anim frame you want. Depending on the number of animating tiles you have, this method might possibly be faster. The only other obvious advantage is that you could have each map tile animating at a different rate, whereas, with changing the underlying tile artwork, you force all tiles to change at the same time. Something like animating grass blowing in the wind might look better if you have them animate at different rates...just as a hypothetical example.

So, depends what you need to do really...