Monday, September 29, 2008

Diverse

The last couple of weeks I've been working on many different parts of Ember without. I've started looking into how to get it compiled on OSX, which seems to require some reading up on the OSX build system first. I've also began work on building the latest Ember release for win32. I was hoping that someone else would have picked up the torch, using the win32-dependency package I provided, but so far none has appeared. I'm thinking that there's bound to be some issues with getting openal integrated, but other than that only Mercator has been updated, so it shouldn't be too hard.

I spent some days delving through the code which handles terrain after I found that the terrain was broken when on worlds with non-square sized. The cause of this was improper conversion between the Ogre coord system and the WF coord system. The problem is that the former is screen centric while the latter is world centric. That means that every time we translate any coord between them we need to convert it. However, if we somewhere misses to do this translation, or we're confusing the two, problems will appear. In this case the code was expecting WF style coords, but got Ogre style ones.
A preventive measure that can be taken to avoid these kind of problems in the future would be to more clearly mark what kind of cood type is expected at any place by requiring that whenever possible 2d or 3d structs are used instead of separate values.
It's much more clear what
getHeight(WFMath::Point<2> position)
expects than
getHeight(float xPosition, float yPosition)

Another area I've done some work in is the entity creator. It's now much more easy to work with thanks to the addition of randomized orientation and default values. The former helps a lot when you quickly want to place a large number of entities in the world, as demonstrated in this video.

This video also shows how easily the terrain can be altered. At the start of the video the world is completely empty, with just a flat terrain. Everything that's altered is altered live on the server, so any other client logged in at the same time would see the exact same changes.

The entity creator is getting more and more useful for each day. It can now be used for quickly creating all kinds of more complex structures, such as the enclosure demonstrated here.

The entity types used here aren't part of stock cyphesis yet though.

I've also recorded a little longer stroll through the world. For some reasons however there's quite a lot of stutter, which I think is caused by the massive IO requirements of the video recording app (GLC). When running through the world without any recoding going on I don't get any stutters. It nonetheless shows of some of the richness in the world. The world as seen here is also not the stock world, instead containing some additions I've done on my local box. I'm not sure how this large amount of entities would work on a slower machine.
Post a Comment