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 > mapEd exportdata

#20041 - Nikkoz - Fri Apr 30, 2004 11:58 am

Hi!
I searched for a good map editor to use in our school project since there is no time to write one of our own. mapEd 0.98.5 seems to real good, but i have some problems with the export data.

The palette is no problem reading, but the tile-data is confusing. It seems like theres only 16 short ints per tile, wich makes 32 bytes / tile? However, i couldn't get it to work just by copying the data directly to the memory.

How is the tile- and map-data stored? The tiledata size is quite strange. Is it optimized?

I'll try some more, but hints and/or code that work is very appreciated.

-N

#20042 - NoMis - Fri Apr 30, 2004 12:43 pm

MapEd only supports 16 color Tiles (used by most professional Games) wich is the reason for the Tiles to be smaller because the color indices only needs 4 bit.
The Mapdata gets exportet as a huge linear array row by row.
If you have a mapsize bigger than 256x256 the gba separates it into blocks. You then have to copy manually.

NoMis

#20044 - Nessie - Fri Apr 30, 2004 2:52 pm

Correct, mapEd only supports 16 colour tiles.

As noted, most professional games use 16 colour mode. I guess the main reason being that you get twice as many BG tiles in 16 colour mode.

The other nice thing about 16 colour mode is that you can use different 16 colour palettes on the same tile (palette switching). MapEd actually does support this, though not directly. Here's how you do it:

1) Copy your tileset and use some art program, say, like Graphics Gale, to adjust the palette entries to create a different colour scheme.
2) Import both tilesets into mapEd.
3) At export time, mapEd does the following:
3a) Exports only the palettes used in the current map (note, NOT a bulk export of all of the palettes in the tiles)..
3b) Exports only the tiles that are used in the current map (NOT a bulk export of the actual tilesets)
3c) Detects tiles that are identical, but using different palettes. In this case it exports the base tile once and then exports the 2 needed palettes, adjusting the map data to display this correctly onthe GBA.

So yes, the export data has been optimized.

#20060 - dagamer34 - Fri Apr 30, 2004 10:59 pm

If you think of mapEd only as a map editor and not a all-in-one map tool that does tile conversions and optimizing for you, you can use 256-colored tiles. Just use another conversion tool to get the tile data and the palette and it will work. Make sure you use the un-optimized mode though when creating a new map, otherwise the tile-indexing will be off.
_________________
Little kids and Playstation 2's don't mix. :(