Map file format discussion
Moderator: PC Supremacists
-
- Chaos Rift Regular
- Posts: 101
- Joined: Thu Dec 09, 2010 2:13 am
Map file format discussion
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?
- Van-B
- Chaos Rift Regular
- Posts: 125
- Joined: Tue Aug 10, 2010 7:17 am
- Current Project: iPhone puzzle game
- Favorite Gaming Platforms: All - Except Amiga
- Programming Language of Choice: DBPro, ObjC++
- Location: Scotland
Re: Map file format discussion
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.
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.
Health, ammo.... and bacon and eggs.
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Map file format discussion
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.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!