Finished exams on Saturday, took a day off Sunday, and Monday got down to some serious work with Colony.... and let me tell you it is being a BITCH!
I've spent nearly a whole week now working on trying to get the Zeits moving around the environment in a sensible way.
The first part of that was to implement a SphereQuery mechanism which allows me to work out what is inside a virtual sphere on the terrain. It's not as simple as just using Ogre's built in methods, as I have to extend them to cope with the voxel engine. It's also a nightmare to test anything with the GUI as it is at the moment. By Tuesday I was sure enough that it was working correctly, and allowed me to do simple collision avoidance with the camera to prevent clipping through objects.
The next part was to get the Zeits using it in some sensible way. To do this I have a method which a Zeit can use to check if a position is valid. It does this buy querying two spheres, one small inside a larger one.
The inner sphere must be empty for the position to be valid, so that the Zeit has room to exist there.
The outer sphere must not be empty for the position to be valid, so that the Zeit is not floating in thin air.
Next tricky bit, and where I've been stuck now for far too long is getting the movement right so that they can move randomly around the terrain. A random direction is picked every few ticks. Every tick the Zeit attempts to move in this direction. To do this is check whether the position towards the direction is valid. If it is it moves there. Otherwise it tries looking just to the left or right of the direction for suitable positions, and if valid goes there instead. It also tries varying the Y height of potential destinations to go up and down slopes.
However at the moment it seems as if the Zeits make the wrong decision all the time and end up wedged in the landscape, and its blowing my tiny little mind working out why. I've got a suspicion that its the original sphereQuery method which is causing the trouble as it seems to give a different result before and after the move, which shouldn't happen as the Zeit should be ignored in the query. Anyway I hope to get that bug caught by the end of the week, or the weekend and have some Zeits moving around in my lovely 3D landscape.... I hope.
Thursday, 31 January 2008
Sunday, 13 January 2008
Interim report submitted
As exciting as it sounds, but hey now its out of the way I can get back on with Colony proper. Well I can in a week anyway, just a few lil bits of coursework to get out of the way.
For anyone interested the interim report can be found here;
http://www.beastnet.co.uk/wiki/images/5/52/InterimReport.pdf
For anyone interested the interim report can be found here;
http://www.beastnet.co.uk/wiki/images/5/52/InterimReport.pdf
Subscribe to:
Posts (Atom)