July 18, 2009 Archives

07-18-2009 22:25:07

July 18 Update, Collisions ahoy!

Since my last update, I've:

  • Changed the controls from buttons to StaticImages which are mostly transparent (looks great!)
  • Revamped the progression system so that it moves by events now, which have the option of delaying the progression if they need to take a while (such as more elaborate Fire events might in the future or Move events.)
  • Finished collision detection just far enough to notice that there is a much much better way to be doing that I will try to implement on Sunday or Monday. Right now I loop through and check all entities against the moving entity and if their spheres overlap I give the obstacles a push so they drift around the side. Kudos if you can name the immediate problems with this. One: Hackish. Two: Since drifting back to their original position is also treated as a sort of Move event, the obstacle and moving ship will push each other around until one drifts over to the side and they snap into place. The improvement I'm looking at is using Ogre's intersection queries so ee if any bounding boxes are overlapping and then do a check against their bounding spheres. I have also found a way to set certain flags on objects so I can exclude all objects moved by actual Move events and give them the priority when it comes down to moving obstacles out of the way. Other than that though, the function to bounce the obstacle back will be the same and translate it back so the spheres are not overlapping anymore.
  • I've also done a little preliminary work on loading other battlexml files, but this one is puzzling me and may require more of a rewrite than I'm comfortable with. Unless of course I ask in the command line, but who would want that?

Posted by Landon | Permanent Link | Categories: Summer of Code, Thousand Parsec | [ 0 ] 2009/07/18/index.php#e2009-07-18T22_25_07.txt