And it begins. Well, continues.

Published September 06, 2011
Advertisement
According to TortoiseHg my project is 5 weeks old. A fair amount has gone into it in that time, more than I can cover here. Instead, I intend to simply record what was achieved in my last development session(s) between journal posts. At least this way I, and you, can see that 'stuff is being done'.

In the true spirit of emergent design, last night's session was spent refactoring a chunk of functionality - player action and camera controls were brought over to the new action containers, and player physics was split out into its own handling functions. Collision detection was rewritten (again) because the game's non-linear 3D space makes efficient collision detection a little non-trivial.

And then I spent a good couple of hours banging my head on the keyboard trying to figure out why suddenly my player stopped moving. In the end:
  • Buggy rotation code. Rather than copy and paste, or (God forbid) actually moving the old rotation code into an abstracted rotation function, I'd retyped the rotations for the player camera orientations. Big problem, of course: I'd forgot a Conjugate() call on my quaternion code and *foom* everything stopped working correctly. Note to self: You wrote a simpler Rotation function already - use it and optimise later!
  • Very small numbers. Measuring the angle between two vectors is all cool and stuff, but translating back from the collision detection's linear result to the non-linear worldspace was causing near-zero rounding errors. Time to swap all that junk out for a proper slerp or - more likely - just use a linear interpolation at that point anyway. After all, we're talking about movement between frames here, it's not like the user's going to notice anything.


Ah well, some thinking on it today then more coding tonight - if I fix this maybe I can go resolve that horrible client connection bug.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement