I'd like to make a game with an inbuilt map editor, and I'm trying to decide how to store the level data.
The example I've seen on the forums is to have the array's X and Y values correspond to positions in a tiled grid, with the identity of the object stored as a string. Like this:
http://dl.dropbox.com/u/906550/Construct/mapeditor.cap
...but that's no good for me, because my world will be large and mostly empty, so the array would end up having an unfeasibly large filesize.
So I'm thinking of using a one-dimensional array as a list of all the objects in the world, and saving the actual information about objects as comma-separated values inside the array. (For example, if the object with ID 1 is a standard block tile at X 250, Y 300, then the first entry in the array would equal "block, 250, 300".)
Here's a quick example I made:
http://dl.dropbox.com/u/906550/Construc ... earray.cap
Does this sound like a sensible approach? I've tested it up to about 1500 objects and it seems to run well - small delay when loading, but acceptable. I'd hate to go ahead with this and find out there's a better way, though.
(On that note, I'm thinking about trying the same technique with the List Box object, to see if there's any difference in performance.)