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 > How to do very wide backgrounds..

#11388 - shunyata - Sat Oct 04, 2003 1:17 am

I?m working on a h_scrolling spaceshooter and would appreciate some advice on expanding the width of the backgrounds. The maximum width of text backgrounds is 512, and that just dont cut it! And it?s plain silly to use rot backgrounds just to get an extra 512.

Is there some clever way, or do I have to tinker with wrap around?

I guess most space shooters of the old day use a layer in the furthest background which scrolls very slowly or repeats (wraps). Then when a new area is entered all the closer backgrounds scroll out of view, the map-pointer int the BGXCNT is changed to another map which then scrolls into view.

Is this the most effective way?

Thanx in advance.

#11390 - yaustar - Sat Oct 04, 2003 2:20 am

They would change the map dynamically. it will still be a 256x256 map hardware wise but as the tiles scroll out of your view, they would be changed to what would be coming. Play a rom with scrolling BGs (metriod Fusion, sum of all fears) open the map viewer with update checked and look what happens when you move around.
_________________
[Blog] [Portfolio]

#11392 - DekuTree64 - Sat Oct 04, 2003 3:06 am

You can also use a 512 tile background, and since it's separated into 2 32x32 blocks anyway, just load another 32x32 block to whichever one is offscreen at the time, continue scrolling and it will loop around and show it. Much simpler than writing a strip copier if you've never done it before.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku