|
From: TIMOTHY K H. <tkh...@ve...> - 2007-07-29 00:12:00
|
I've made a number of small fixes and additions today, here's a summary:
-Missiles are fixed. They are now correctly oriented upon creation no matter what facing they were fired from. I had to dig into the ODE documentation and really figure out what crazy matrix functions to play with. See launcher.cpp for the changes to fireMissile()
-Missile have a shockwave effect in addition to an explosion. It is currently a graphical effect only, and has no affect on entities within the game, but I hope to extend this soon.
-Added gravity wells, sortof... There is now a second scenario file (scenario2) which is of the "near-orbit" type. Data has been entered for a planetary body roughly equivalent to our moon. In the tick() function of game.cpp there is a now a small loop that applies a force to all entities in the direction of a gravity well.
Note: look for the section labeled ***HACK***. This is where I simply slapped a number into the code in order to see if it was working correctly. Instead of this really bogus number, it needs to be the correct amount of force that would be applied by gravity. Someone with some knowledge of physics please figure out what this would be? Currently, the only data for the gravity well is mass(in kilograms), and position.
-Added some extra functions to util and entity to make things easier in the future.
Note on units: ODE uses the SE units of meter/kilogram/second. Currently, distances in all the code is treated as kilometers, not meters, so there is technically some heavy fudging going on. I'm not sure that I care yet, but there it is.
I am now going to start updating the guidance code in ship.cpp, making it match all of the new functions. Who knows if it will really work at this point, because we have moved from variable to static time steps, but it will be interesting to see what happens.
-Tim
|