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.

DS development > Question about scrolling tiled maps

#55172 - Teeth - Mon Sep 26, 2005 1:27 am

Hi all.

Sorry if this is a garishly noobish question. I've done some development on a system that's supposedly similar to the megadrive so I'm not an absolute stranger to tiled scrolling maps. However, I'm new to Nintendo hardware, and have never worked on GBA before, let alone DS. The question is: am I doing this right?

I've got everything working fine. What I've done is modify the complex2D example to run a single scrolling map. The 128x128 map is currently just defined as a global (the final intent being that the map is loaded in from the rom, obviously) and I copy the map data to whatever rows or colums are coming into view when I scroll the screen. I'm using a 32x32 bg just for testing so obviously when I print my x scroll it's visible on the screen. Not too worried about this right now; my main question is, is this the done thing? Or should I be loading in a 32x32 chunk of a map at a time into a 2x2 group of 32x32 bg maps?

I'm guessing that in general, you'd load the map from ROM into the 4MB of RAM that you've got before you start, and then do more or less what I'm doing now?

Thanks!

#55176 - tepples - Mon Sep 26, 2005 1:48 am

If you have it working, then you have it working. But you might want to use a 64x32 map so that you don't get artifacts on the left and right sides when a tile is split (remember Super Mario Bros. 3 for NES?). This wasn't a problem on the GBA, but the Nintendo DS screen is wider. Also remember that 64-tile-wide text background maps are drawn in 32x32 tile chunks.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.