Monday, March 09, 2009

Completed terrain area editing

Initially I planned to have gotten the terrain area editing completed some weeks ago. However, when I started looking into the existing entity editor code I found that it was lacking in some areas, mainly the structure which made it cumbersome to add new adapters and to have it be easily extendable and handle suggestions of both attribute names and attributes types. So I spent a couple of days refactoring the entity editor to turn it into a better shape. It paid off in the end, since it's now much easier to extend it. And the lua code, which was quite haphazardly written, is now much better.
The main visible improvement is that we now have the ability to suggest an attribute name, not just a type. This will help with editing, since any author then won't need to keep track of the names of the important attributes.
The new terrain area adapter allows you to add new areas to any entity, and to edit any existing area. You can add or delete new points, and you can alter the layer which is to be used.
I've put together a small movie of this in action. In it I show how you easily can create a new entity (in this case a barrel), add an area to it, alter and edit the area, and then remove the entity from the world.

Higher res version over here (be sure to try the HQ version).

The nice thing about the area editing is that it's implemented as a general feature, so now that we have support for editing terrain areas, it should be easy to also add support for editing terrain mods, which in much of their functionality are similiar to terrain areas (the former alters the heightmap while the latter alters the terrain layers).
Post a Comment