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 > Multiple maps, single tileset?

#85205 - SevenString - Sat May 27, 2006 9:02 pm

Here's the deal:

1) I am re-using the same tiles for different BG layers (parallax -w- transparency).

2) I'm using gfx2gba to convert from images to maps and tiles.

3) For each "level" in the game, I want to create a single concatenated tileset (.raw) from multiple images that more than one BG .map can share.


Q) Do i need to write a utility to do this, or has somebody already solved this problem of merging .raw files while properly re-mapping the associated .map files?

Yeah, it isn't rocket science to code, but if somebody knows how to do this with an existing tool, that would save me some hassle.

Thanks in advance.
_________________
"Artificial Intelligence is no match for natural stupidity."

#85228 - SevenString - Sun May 28, 2006 2:46 am

Never mind... I went ahead and wrote a command-line utility that works after gfx2gba. It does what I was describing in that it takes .raw and .map files as input, finds/removes duplicate tiles, and produces a concatenated .raw file and the remapped .map files that correspond to it.

For my test scene, this utility ended up getting rid of over 160 duplicate tiles in three bg layers, and my code is cleaner too because I'm only referencing one tileset with multiple maps.

If anyone expresses interest, I'll make the utility available with some simple instructions on how to use it.
_________________
"Artificial Intelligence is no match for natural stupidity."