Search This Blog

Sunday, August 8, 2010

Evolution of a level editor

I've been working on the level editor for a while now, here are some images of how it's evolved over time.




The first version is just a visualizer. It shows the hardcoded standard level that I've been using for testing. I was pleasantly surprised that the .net drawing libraries have some nice built in ways to handle zooming and panning.




Here I've added a status bar and a top-menu, and the ability to actually edit the level. It's shoddy as hell and doesn't actually save, but it looks better :)




This is a pretty neat component, a property grid. It automatically fills itself with the properties of an object, so all I have to do is point it to the currently selected sector (room), line or node, and the user can set stuff like position, textures, or height. Fancy!




Here we see an output panel added. There's also a lot of functionality upgrades going on under the hood. One of the trickier parts of making this editor was automatically constructing sectors. Basically you can create a room (like the orange one in the image) by drawing lines. You then right-click inside the created shape to turn it into a sector. That last bit, detecting if you clicked inside some shape and finding it, is not trivial at all! I remember the Doom editor I used back in the day having a lot of trouble with this. Now I know why :)




And here's a first attempt at an actual level. It's roughly based on the first map in Doom 1: the orange sector is a little lower than the rest of the room, and the four squares to the left make a staircase that goes up to a raised balcony. 

Note how the orange sector has lines connecting it to the right wall, that's because I haven't figured out how to do sectors inside other sectors yet. That's going to screw up both the sector detection and the triangulation, so I'm postponing it for now.

Now to save this thing and run through it in 3D!

4 comments:

  1. Maybe some snap-to-grid functionality as well :)?

    ReplyDelete
  2. I'm trying to show off the awesome design freedom that the engine permits! Yeah that's it.

    ReplyDelete
  3. pretty cool editor their harald! Just beware of finishing the game and not putting to much time in the editor!

    ReplyDelete