Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Best format for map data — Gideros Forum

Best format for map data

antixantix Member
edited September 2015 in Game & application design
I am at the point in development in my 2d game engine where I would like to ask everyone how they handle map data as I am wondering what the best format to use woul be going forward.

To begin with, I'm not using Tiled, instead I have created my own map editor in Visual Basic. I chose this path because Tiled isn't really a game editor since it doesn't have any functions to create/edit animations, moving platforms, enemies, etc. It doesn't export LUA maps either, whereas myeditor does.

Method A: (currently using this) Store each map tile in one number and use bitwise operators to extract any required information when required.
31 1 if solid
30 1 if animated
25-29 reserved
18-24 animation (0-127)
10-17 tile property (0-255)
0-9 tile number (0-1023)

Method B: Use multiple arrays, one for each case; tile, property, animation, animated, solid.

Now it seems that Method B would be quite quick because you aren't having to do loads if fiddley bitwise operators to extract map data all the time. It does however take up exponentially large amounts of RAM.

How else does everybody else store mapdata? And do people think method A or B (or something else) is better in the long run? any why?


Sign In or Register to comment.