Page 1 of 1

Map file format discussion

Posted: Fri Dec 17, 2010 4:46 am
by like80ninjas
Hey guys, I have come really far in the creation of my engine and editor. Now I need to get the editor exporting it's collision, 3 tile layers, and entity layer into a file readable by the engine. I already have this working, but it isn't pretty. I'd just like to get a discussion of ways to store map data going. I'm sure there are other people on the web and these forums that would be interested in the various ways of doing this, so how do YOU store map data?

Re: Map file format discussion

Posted: Fri Dec 17, 2010 4:59 am
by Van-B
Usually I just use byte values, as it's real easy to support that in whatever language. I mean, you might not want to use C++ to code a level editor, so binary files are pretty handy and straightforward I find. Ideally, I would have each layer as a seperate file, a standardised width and height, and a tile set that is no more than 16x16 - so each location on the grid can be just a byte representing the image number from the tile set. That way, you can target lesser platforms - like you might exclude a parallax layer for a mobile platform version, so it can cope better.
For special data, like collectables, enemy position, start position etc, I would use the same system - placing them as if it was just another layer.

Re: Map file format discussion

Posted: Fri Dec 17, 2010 12:53 pm
by dandymcgee
If you search the forums there are already at least a few other discussions just like this one. There's a wealth of information to be found in the older posts here.