Just in case Derek feels like doing it but doesn't feel like taking time to come up with his own (inevitably much better) method for it.An explanation for everyone who doesn't know how the current method works:
Right now, your level is stored in a text file that consists of a giant rectangle of seemingly random numbers and letters, and several random lines of numbers and text underneath.
In fact, each letter and number stands for one of the many things you can place in the level editor. And the stuff at the bottom represent the level info and any sign or entrance/exit data.
The problem with this method is, since everything is represented with a character (letter or number), you can only have one layer of anything at a time. This means no items hidden in the rock, spawned on the same tile as a monster, spikes, sign, or entrance/exit.
Now since there are quite a number of you who'd like to hide items in rock, or maybe monster's in ice, and I know a number of you clever mapmakers would like to put monsters and spikes on the same tile...Here is my suggestion for a new level generation method
If the level is saved in multiple layers, one for tiles (area tiles, blocks, traps), one for things you can move through (really this is just items), and things you can technically
move through, but the game stops you from doing so (monsters and maybe the spring trap). Then it would be a cinch to draw multiple things on top of each other.
Instead of just one grid in the save file, there would be 3. One for each of the layers.
This method is not without its own limitations, you still can't put multiple items or monsters in the same spot.So I have yet another idea, but I don't really like it as much 'cause it seems inefficient
It's similar to the idea presented above, but instead of only having 3 layers, it has limitless layers.
When saved, the level creator would go through the map and check for instances of overlapping. Every time it detects an overlap, it would create a new layer and put all the overlaps in there.
Then it goes through again and checks if there are still any overlaps. If there are, create another
layer for them.
Continue to repeat until there are no overlaps left.
Now I'm really crappy at Big O notation, so I have no idea how efficient that is.One last method I swear
Keep the one grid system, but use it only for tiles (area tiles, blocks, traps that aren't spikes, entrances/exits)
But for all items and monsters, save it in the text file as a sort of coordinate system. ie: s 8 2 OR s,8,2 (for spider on the 8th column, 2nd row)
The level generator would first go through and place all the tiles, then come back and place each individual item/monster with the coordinates provided in the lvl file.
I believe this is a more efficient than the last method, it's just not as readable in the lvl file. But who cares? People shouldn't be poking their noses into them anyway.Thanks for taking the time to read my great wall of text.
Whether or not you'll actually implement any of them (or in anyone who's not Derek's case, whether or not you care), I still had fun typing it all out.
For all the non-Derek's out there, here is a link to a list of character codes used in the level generator in case your interested: http://mossmouth.com/forums/index.php?topic=146.0