Custom map file format

Started by MontagFTB, April 15, 2010, 02:56:55 PM

Previous topic - Next topic

MontagFTB

I'm curious to see if a utility can be made to convert, say, a BMP or PNG into a custom map. You might even be able to work with a more advanced format and use an alpha channel as the height map, which would give people the ability to use tools like Photoshop to build creeper maps. Is there documentation as to the binary file format for the custom maps?

knucracker

I wondered if anyone would ever ask about that... :)
I actually did this in an internal tool I have.  This is where the special ops maps "Mouse Shadow" and "KC" came from.  Mouse shadow actually started out as a the Creeper World main menu page rendered as a graphic.  So that round shape in the map is actually the blue world on the CW main menu.

KC is the words Knuckle Cracker that were rendered as a reduced size bitmap first.

The way the tool worked was was allow you to pick an image, then define with sliders the thresholds for each terrain level.  In other words, imagine an image that you wanted to reduce to 3, 4, or 5 colors.  Then each color became a terrain level.  Note that the resolution of the image is 70x48, so it is pretty small.

I never released this as part of the map editor because it is a difficult tool to you depending on the image you start with.  For something like a white box on a black background, it is easy.  For a color photo it can be hard to get results.  I also realized that you can manually do the same thing by loading a background image into the editor then manually tracing out different terrain on the image.  Then you can get rid of the image and replace it with a normal background terrain.