Ok, so my level editor is eventually going to have layers (Background, Main, and Foreground) and I thought I'd ask this question before I dive into the event editor and cause a tidal wave that would demolish my beautiful code.
Here goes:
Currently, there is only one layer (Main) and the level can be saved and loaded again to and from a *.csv file. With additional layers, I'm wondering if it would be wise to have a different array for each layer, but save them all to the same *.csv file... So I'd have 3 arrays in the one file. Do you think this would be harder to get information from than if I say, had one array with 3 values separated by a dot in each cell, like this:
5.11.3, 0.8.7, 2.4.34
etc.. For every cell...
The first number in each cell would be the value of a background layer tile, second number the Main layer and the foreground layer would be the third number.
What do you think? Three arrays or one complicated array with dots separating the layers in each cell?
Easy way to do this is to have x,y and z in array. Much easier, than using 3 arrays. Also you can save data like 1:3, which is like tile 3 in layer 1. Now you have to use string parser 2 and make the : as parser.
I have proven new mathematic formula to be true...
Ok well I've gone with the one complicated array for now. I'm using a regular array to save all the data, including using the Z dimension to determine which layer is being edited, and now I have my dynamic array object read the values from that and turn them into strings like this: 15:32:09 for each cell. Each number in each cell represents a different layer, and when I want to retrieve one of them I'm sure I could just use string parser or something.
But now I have a new problem, when I add backdrop, even if the object is on layer 1 it still adds the backdrop over top of everything else... Any suggestions?
I could give you the source to my game that uses a level editor and loader using an array. However it doesn't actually paste objects in different MMF2 layers, only a backdrop and Active object layer each.
The array uses another page (z axis thingy) for various things like storing which levels the current level leads too and what music plays and which pictures to load for the parallax.
I'm sure phizzy wont mind me letting someone else see his work.
The level editor I'm making is just for visual purposes at the moment, that's why I'm using Add Backdrop. All the data is saved to a csv file so in the actual application, the game will load the levels from the csv data, not the editor. Since csv's are just text, I thought this would be a good way for easy level sharing , just copying someone elses level code into a blank csv file and loading it and then being able to play their level.
Cool Had a look through the event editor and it looks great.
I noticed in the level editor you could have animated tiles, like the boxes that flashed what was inside them.
With mine, I might have animated actives but currently I am using just one object as a tile selector, with each frame being a different tile. With some spread value functions I made it so every instance of the tile selector that was on the screen had a different frame, so it looked like lots of different objects
I made a video of it not long ago just to demonstrate the sort of stuff you can do with it so far.. I've added a few features since then but I can show you if you like