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 > Advance Wars- How's it done?

#27178 - Wriggler - Tue Oct 05, 2004 3:31 pm

This may have been asked before, but a search didn't give any results so I thought I'd ask anew.

The old Nintendo game Advance Wars. How did they do it?

How does it go between (what seems to be) Mode 0 and Mode 4 so well?
How did they (for want of trying to sound more technical) fit everything in?
How do they display bitmaps on top of partially transparent layers (when you use your CO power)? Or is this just a bitmap split into tiles and pasted on top?
(When it zooms in on the units) How do they animate the backgrounds? Is this mode 4, or just mode 0 with some clever layering? If so, how did they split the screen into two, and scroll the two parts in opposite directions?
How do they draw the menus? I assume this is windowing with another layer showing through, but it seems like they have used all of their layers already?!?

As you can see, I've been looking back on this game and thinking "How the poop did they do that??!". So I thought I'd put it to the good people of Gbadev. Any ideas?

Ben

#27183 - ampz - Tue Oct 05, 2004 4:46 pm

I don't think there is anything particularly mindblowing in advance wars..

It is quite possible to go between any two modes in a single frame. Just make sure you DMA the new graphics in to VRAM in the correct order since the last bit of data might be written to VRAM after rendering of the upper scanlines has begun.

CO power graphics is most likely just mode 0 layers. (Saves VRAM since the graphics does not cover the entire screen)

Scrolling two halves of a mode 0 background (in steps of 4pixels per frame) can be done by rewriting the charmap every frame (and updating the background scroll registers).
Or you can update the background scroll registers at vcount=80. This provides perfectly smooth scrolling.
Or you can simply simply use two BGs.

There should be enough layers for the menus.

#27199 - SmileyDude - Wed Oct 06, 2004 3:22 am

you could also use an emulator like Visual Boy Advance to see what mode the GBA is in during each frame, and even turn off/on layers. Very handy tool for figuring out how different games work.
_________________
dennis