Thursday, May 22, 2008

Shaping worlds

For the last couple of days I've worked on the tools for shaping the world. As my goal for 0.5.3 is to have a better world which shows off all the new media the first step is to alter the world to allow for more expansive forests and far away mountains. There's been a terrain editor in Ember for some time, but it has been very rudimentary and lacked some features which would make it easier to alter the world. One of these features was the ability to alter more than one terrain point at once. I've now added the ability to set a "radius" in the editor. That will alter all terrain points around the one that the user interacts with. This is very helpful since it allows us to quickly raise and lower large swaths of land.

When I started fiddling with that I found a couple of bugs in the terrain code which prevented it from working as smooth as I wanted. As I've squashed those bugs the editing is becoming much more smoother. I also found that the way the terrain is reloaded is very inefficient. Currently we unload the whole terrain page and then load it again. However, all that we change is just the height data, so it would be much more efficient to tell the engine just to recalculate the affected meshes from updated data. I've done some changes to the code which allows for this much more efficient approach, and it's beginning to look good. There's still a problem with the LOD calculation not being correctly updated, but that shouldn't be too hard to fix. All in all this will allow for the ability to quickly create a whole new world from a blank slate of terrain. Very exciting stuff.

Monday, May 19, 2008

Building worlds

The start of the Summer of Code is getting closer and closer and our three students have already started getting involved in the community. They've all got their git repos set up, and Alexey which has planned some downtime during the summer has already started committing code.
There's also two pages on the wiki about two of the projects. All in all it looks very promising.

I sat down and thought about what I wanted to see in the next release. It didn't take long to realize that the major focus must be on making sure that all the new media that Jayr has created must better be shown within the game. Just by looking through the commits one can see that he's put a lot of work into the media repository, and it's a real shame that not much of it is shown in the game. This mainly has to do with the fact that there's either no corresponding entity types on the server, or that they aren't used in the default world.
In addition, with Ember 0.5.2 we now have support for imposters, which means that we can display much more entities on the screen at once. This is mainly of use when rending foliage and forests, of which we would like to have much more. Jayr has created a couple of really nice birch trees which can be seen here:
He's also added some bushes as well as a whole collection of new nice meshes and textures. So the focus for Ember 0.5.3 is to update the world to make sure that all of the new media is shown. All other blueprints will be put on hold to favour the push. The first thing we need to do is to update the default terrain. Ember can handle quite large terrains without problems, but have a harder time with really steep cliffs, due to LOD issues. This is pretty much the opposite the current layout of the world. We therefore need to expand the world, make it larger and with more distant mountains. Making it larger will also allow for more expansive forests. In addition, we have quite a lot of meshes for both a village and a castle, so we need to provide space for that as well, just as we also need to make sure that the village and castle look good and are naturally laid out. There's already some maps of a proposed world, as seen here, but the current world isn't following it, and it presents a major issue in that it's hard to do world boundaries, where the world simply ends, without using water. In the current setup there's a couple of very large mountains to two sides, and water on two other sides. I'm thinking of going with an island completely, just because it's so much easier then to have a natural world boundary. There's nothing that says the world needs to be in "Moraf" either.

The first step towards a new world is creating the terrain, so the last couple of days I've been focusing on getting better terrain editing functionality into Ember, as well as finding and fixing some bugs related to the real time terrain editing. We now have the ability to alter many base points at once, allowing us to much quicker and easier alter large expanses of the terrain. The next couple of days I plan on experimenting with a new world. Once that's done we should start on making sure that all meshes and textures are represented by ingame entity types. There's now a nifty export functionality in the Model Editor which will automatically create and export an Atlas definition from a pre-existing mesh. This has already proven to be very useful in quickly generate atlas types for missing media.

Last week I also moved all Ogre material definitions from the Ember git repo to the media svn repo, where they much better belong. The idea here is that they should be used as reference when working with the media, so that it's possible to use the exact same materials both when authoring media and when showing it in Ember. We're not there yet however as we also need a good mesh viewer application that can work with the way the media repository is set up.

Thursday, April 17, 2008

Summer getting close

The Google Summer of Code is just now entering into the phase where student allocations are finalized. We've recieved some really nice applications and will be able to announce the final selection soon. This is the first year that I'm involved in the program, but Kai is a real veteran who's been involved with it since 2005. His help has been really valuable.

We've now used git for a couple of weeks and so far it's been a total success. It's sooooo much nicer to work with than cvs. It's a little bit more complex, but in day to day operation it's just a couple of simple commands you need to know. Also, while superficial at first, the web gui is really nice and useful. The ability to do local commits that aren't published before you decide to is immensely useful and really changes the way you work with code. You now don't have to worry about each and every commit not breaking stuff; it's quite ok to commit non-working code as long as the stuff you push to the common repository is working. If only Kdevelop had some better built in git support it would be even better.

With Ember I'm now trying to get a polished 0.5.2 release out. Both CEGUI and libwfut recently released new versions which fixes a couple of bugs we get in Ember, so the new release will require those versions. Jayr has been adding more and more really high quality media. A lot of new normal and specular mapped textures which helps to make the world much nicer. We now only have to update the server to take advantage of all the new media. The fact that there's no persistance and entity editing thus very much depend on editing the define_world.py script on the server makes that process a bit cumbersome though. I've added some support in Ember for saving entities in a serialized form to disk. There's however no way to load them into the world yet, so that's something that needs to be added.

Sean has also provided more patches, adding support for letting the user save the login information for servers, thus removing the need to having to type both user name and password every time one needs to log in to the world (which is something that you do a lot when you're developing Ember). He's also added functionality for totally disabling the gui (bound to the F10 key). Useful for taking screenshots and so on.

Myself I've been fiddling a bit with the minimap. I started out using CEGUI for all elements of it, but since it doesn't support rotation of element I had to abandon that path. I'm currently working directly with Ogre overlays, which should provide the needed flexibility. I'm not there yet, so it's something that won't appear in 0.5.2.

I'm hoping to get the 0.5.2 release out this weekend. Currently it's mainly issues with misconfigured media holding it back.