Tuesday, 16 May 2006

"CastleWall" 0.2 progress

So its been a while since I've updated me ood blog, especially on my c++ projects front - which I really should do, as not only does it help me show off ;) which everyone has to do a little of now and again.. it helps me keep track of my own progress and solidify it in my mind. Here's a biiig update to make up for it.

I've been working on what I've been calling 'CastleWall 0.2', though I feel the iteration should be a little higher, which shows I'm not setting any milestones for myself, oh well I'm learning it all for the first time.

So what have I done? Well I've got two castle's made up, with full opal/ODE physics. Its a lot of bricks, so I had to make them larger and fewer, and they had to be box primitives unfortunately as ODE doesn't support trimesh-trimesh collision, which was a bit of a blow when I found out.. The primitive shapes do anything for any semblance of realism as you might imagine, I plan to try using a random selection of materials to add more variation and/or some offset mapping to see if that helps. The good part is that all the bricks are loaded from a .scene(xml) file from blender and a method just adds physical attributes to the mesh used. This means that all sorts of structures can be made, and characters placed within Ogre. Though I'd like to add scripting to pick up the object names in Blender for use without re-compiling

Performance is still low when certain parts of the castle's get struck and the collisions get complex, I'm going to have to work on this part. I've made the current player's castle static geometry and that helps tremendously, its when a big proportion of the castle 'bricks' have a force acting on them that causes the slow performance problems, perhaps a good solution would be to limit the amount of objects that can be physically effected for each major collision, such as cannonball striking.

I decided to go for a multi-speculuar bump mapping shader, which I admit I from the Ogre sample, I really want to learn how to write shaders, but I'm concentrating on C++ and general game programming and anyway, why re-invent the wheel? The performance difference doesn't seem to be that bad either between that and a more basic material.

I've got terrain with a splatted texture, not PLSM2 as when I first tried it I couldn't for the life of me get it to run, though the latest version works a treat. I don't think it would be an advantage as my test level is very small anyway.

I've also added a skybox of rolling green hills and somewhat blended the terrain into in, which I'm quite proud of, I just have to alter the terrain to round at the edges in the correct way to look like it is completely another hill no different from the skybox ones.

Another feature (its not a bug, honest!) I'm proud of so far is when the current players turn is up, an animation track, takes the camera to the other player, I bit like Battlefield I've noticed though without all the post-effects (can't wait to dig into the Ogre compositor framework!)

I've also managed to integrate/modify a class so that player names can be displayed above players heads, I've made it so they appear central out visible at a sensible height to be read at a distance, its a pity I'm still using the Ogre Head, which is the biggest sore thumb of the artwork at the moment. I'm hopefully going to take a bit of time out to model some reasonable looking wizards.

I've also made use of the GameState manager to create a menu state after getting through a lot of my own mistakes. This has just a ocean, skybox and working menu items for New Game and Exit Game. I'd like to get some in-game options in there at some point too. The ocean needs and big island of rolling hills that I can fly to and around, I think that would look super cool. I'd like a water shader in at some point, one that will work on my ancient temporary Nvidia Tnt2 (ATI 9600 finally melted).

Theres also a feature in their to build, that is create shapes (currently based on tetris shapes) that can be moved and rotated on all axis via a menu and then made physical. These will be surrounded by swish magical effects with particles.

I should mention that I've managed to implement these features thus far: a simple sound manager in via Audiere, physics, a working CEGUI interface, particles, scripting, OIS input, a process manager and a game state manager. So I guess I shouldn't be too hard on myself with my progress. As most things though its turning out to be more of an undertaking than I thought. Though I've been learning lots of OOP and C++ and things about game programming, so its been very useful. I think my brain would have rotted at work by now if i had not started this project.

If any of you are interested out there, check back with any updates I hope to add soon

Check below for some screenies!
(Don't take these as an example of Ogre's real graphical prowess!)





More Pictures