Sunday, November 02, 2008

Quickly creating worlds

I spent some hours just trying the world editing features of Ember out. The main reason was that Jayr had provided a couple of really nifty castle wall sections meshes. With section meshes it's possible to build more complex structures, very much like with LEGO. We currently have three sets of section meshes: a wooden fence, a low stone wall and now a larger castle wall.
I first started by just placing the wall segments next to each other directly on the ground. It looked like this:
The main problem here is that the uneven ground makes the segments not match up. It's not looking very good. And if a player would be walking on top of the wall it would look strange indeed.
One of the Google Summer of Code project was however to add support for terrain mods to both the server and the client. A terrain mod is modification to the terrain which will alter it in some way from it's initial, base point generated shape. So in this case the natural terrain mod to use would be a level mod, which makes sure that a certain area of the terrain is leveled. After applying a level mod the wall looks like this instead. Much better. As can be gleamed from the screenshot we have four different kinds of wall sections: a gate, a simple wall segment, a wall segment with a staircase and a corner segment. By combining these it's pretty easy to quickly create a larger wall.
One thing that I found was that it's quite hard to place the wall segments next to each other so that there's not gap, or no overlapping. We therefore need to add some kind of "snap-to" functionality, as specified in this blueprint.
The scaling of the wall segments seems to be a little off though, as this screenshot shows.
After the wall had been completed I added a little path leading up the castle, a small graveyard enclosed by a low stone wall and an inn and a small cottage near the path. The path required some low level entity editing as we don't have any gui for altering areas yet. But adding and positioning the other entities is really, really easy. The cyphesis server doesn't currently have support for loading back entity data that has been persisted (though it has support for writing data to the database), so unfortunately the world got discarded when I shut down cyphesis. The main point of this little exercise was to see how easy it would be to alter the world. There are two areas that need some more love though:

There's an even greater collection of screenshots to be found here.