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.

Beginners > Newbie : Max map size in mode 0?

#10606 - goro - Wed Sep 10, 2003 2:48 pm

Hi,

Q.1 What's the max map size in mode 0?

Cowbite spec says
Quote:
They are made up of 8x8 tiles, the bitmaps of which are stored at the tile data address. The HOFS and VOFS registers can be used to scroll around a large area of up to 512x512 pixels (or 64 x 64 tiles).


but 512x512 pixels is pretty low considering 'Link' from the zelda games seems to walk around a massive map.

Also (from GBA Junkie)
Quote:
Rotation Backgrounds (Text Backgrounds) Size 0 128 x 128 (Size 0 256 x 256) Size 1 256 x 256 (Size 1 512 x 256) Size 2 512 x 512 (Size 2 256 x 512) Size 3 1024 x 1024 (Size 3 512 x 512)


If these sizes are in pixels, then the maps are still pretty small.

Maybe the values (e.g 256x256) are in tiles, in which case they are 8 times bigger.

Or the maps are small but are loaded dynamically or multiple maps are loaded and glued together using chewing-gum or wood-glue or something.

HELP!!!!!!!

#10609 - tepples - Wed Sep 10, 2003 3:13 pm

The typical map size is 32x32 tiles, or 256x256 pixels. You can create a larger virtual world by replacing the map entries that just scrolled off the edge of one map with new map entries that appear on the other edge.

Smells like a common question.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#10610 - niltsair - Wed Sep 10, 2003 3:19 pm

If you remember, the original zelda only allowed you to walk in one map, and then loaded a new one when reaching the edge. This is easy.

You can also load dynamicly the map as you walk around, reloading entries in the map as they get offscreen, as Tepples mentionned. This is harder because you have to manage in real time the tiles and map entries, but is the way to go if you want the screen to just scroll around without having map reloaded a la Zelda.
_________________
-Inside every large program is a small program struggling to get out. (Hoare's Law of Large Programs)
-The man who can smile when things go wrong has thought of someone he can blame it on. (Nixon's Theorem)

#10635 - goro - Thu Sep 11, 2003 10:04 am

Are there any (code) examples of this?



Thanks for all of your help.

#10669 - Geno - Thu Sep 11, 2003 11:39 pm

Check the PERN project's tutorials and code: http://www.thepernproject.com/
_________________
Out of Order.