well, i need to know, how to make a lvl editor in MMF and dont know where to start.
heres what i know about level editors and how i want mine to work:
it would be something simple, i make a set of 16px sized tiles on my 640x480 screen and each tile would have a kind of ID.
like this:
tile: y20, x3. obstacle=yes, object=grass
and so on for all the other tiles.
my doubt is: how to set this? how to make the tags, how to make MMF read and load my txt, i want it to recognize the tags, if the object is set at "grass" it will create a object called grass.
i know i have to use fast loop in the beggining of the level but thats the only info i got.
hope you guys can help me out, thanks in advance ^^
For editing a level, you would need a cursor that could place down active objects, with the properties of these objects stored in their flags or alterable values, and so on.
To save a file, you would use the INI object, or an XML object, or really anything of your choice, to get this information into an external file. This would be done by fastlooping through every active that you had placed and reading its properties, then writing these into the file in a manner that you can retrieve later.
Similarly, to load it back up again, you would have to loop to get these values from the file, make up an active that has the properties translated back into how you're storing them internally, then place it at the right point in the level.
This has an example of how it can be done - you could ask its author about it.
I'd use a list object or something and use different ASCII characters for different tiles, like "A" is a wall, "B" is an enemy, "C" is the player etc. Arrays use so much memory, just for empty blocks. But in the other hand, arrays are much easier to use
Yes, that's what I did for mine. Nyah it is, but protected. It demonstrates that Axel's concept works. No complaining about the lack of fastloop, I made this on a new computer that had no internet that I forgot to put fastloop on when I made it: