Developing an editor (Part 1)

While Waaghman is working very hard on the Little Racers patches and updates (yes, he’s working full time on the online mode), I’m coding some tools and editors four our next games.

I already did some tools for another game that we started (and it probably won’t be finished) and it served me as a learning experience. One of the most annoying things of it was the different kind of things formed that part of a level. We had tiles, but also random geometry, player locations and some other things. The code was becoming a real mess that growed on each new iteration.

This time I’m making a generic level editor, and trying to keep the code clean. The idea is simple: a level has a size, and it can contain layers (just like in photoshop). So you can have a layer which represents a tilemap, and another one that shows the player positions, and all of them are independent.

Right now, the basic framework is done, and I’ve got some layers working. Of course, it has been designed to load and save the levels to XML. Most of the layers that are missing are just modifications of the ones I made, so it shouldn’t take long (but if I’ve learned something through the years is that everything takes more time than expected).

MilkEditor Work in Progress

MilkEditor Work in Progress

I want the editor to be easily customizable, so it can load external layer-types through dlls, so we’ll be able to use the editor on different games without compiling the full thing. It wasn’t a high priority feature, but in C# it was done in less than half an hour.

I have to say that I haven’t had much problems while developing in Windows Forms. Usually, doing this kind of app is something boring, and you end up with lots of little hacks to make the layouts work as expected. But this time, there are tiny ugly things here and there, but everything is much more clean than usual, and I’m pretty proud of it. I’m actually enjoying developing this tool.

When I finish this, there are other more ‘in-depth’ tools that I have to make. But those are really small apps to simplify some specific tasks. I’ll post about them when I have some new material to show. See you later!

Tags: ,

Soy1Bonus April 21st, 2009 News 3 Comments