A guide to how I made it. Bear with me, I’m not a good teacher, but I’ll try to explain as much as I can.
First off, I followed this tutorial: [link]
Most of what you’d need to know is in that tutorial. My editor is based on that coding, but is further built upon it.
First off, I added more objects to be saved. Tiles, objects, spawners, etc. I made sure to put some objects under parents to save writing.
Also my maps save map settings:
Since all of the maps are saved as .ini files, this means that Mydhilde’s game world will operate in a single room (I still have other rooms, like the title screen and other test rooms for debugging). When I load a new map, the room is restarted, with a new .ini target. The room will load all of the objects into the room, and save the map settings as global variables.
When I’m targeting a new .ini file, I have a global variable which the save script will read.
This part is actually pretty easy – in concept. It’s a lot of tedious work with a few simple tricks.
I have a separate room in Mydhilde. One that I can access with developer controls.
Essentially, I have a GUI with a bunch of buttons assigned to telling my cursor what to lay down. Several little options and scripts to make drawing maps easier. Lots of little specific things.
What I’m placing in the editor is objects that are the same objects as when the map is played in-game (well, to an extent). The important part is that these objects all act differently: based on whether I’m in the editor or in the game.
Tiles act no differently, because they’re static, anyway.
Water tiles won’t animate in the editor (because they eat up performance)
Spawners are a special object I’ve made for the editor. When in the editor, they’ll appear, I can edit their properties, and item/enemy spawners will preview what they’re spawning.
When the game room is loaded, however, spawners will delete themselves and spawn their respective object, with all of it’s designated properties into the room.
When I’m testing a map, I assigned “F1″ to take me RIGHT back to the editor. I have some variables set up that make sure that the editor remembers what map I’m working on so that I can seamlessly jump between the two.
In the editor, “F2″ will display the coordinates of the tile I’m selection. This is good for assigning teleports (although I need to set up something even nicer to work with, probably something that saves coordinates in a sub-screen between maps)
Scenery Objects under a “scenery” parent object share a variable called “option”. That option variable effects each object differently, but it makes it easier to edit small changes in them, like rocks having various graphics. Or maybe in the future, trees will generate different branches based off of their “option”, making each tree unique without random generation upon room loading.
I… think that’s mostly it? I tried to cover as much as I could think of.
If you still have a question regarding this topic, feel free to ask. I’ll try to provide more information.