Well I’ve finally got a working EntityForce. This entity can either act as a gravity well, or as the force of an explosion. It’s uses in the game will be many and I’m happy to have this part finished.
Originally I intended to make the physics of Angular Velocity as realistic as possible. But the further I’ve gone along, and especially after creating the EntityForce, I realize that there is a limit to realisim in games. Sometimes it’s more fun to be unrealistic. In this particular case, I was trying to make the gravitational force of the EntityForce realistic. I had an inverse square function to help calculate the effect of the gravity, I had it take into account the mass of the two bodies, etc. But the further I went with this model, the more I realized that while it was an interesting scientific exercise, it just wasn’t enjoyable. It didn’t work in such a way that felt good. The effects of the gravity were felt in tiny amounts too far away, and it wasn’t satisfying to see that the bullets didn’t warp around the gravity well the same way my ship did, since their mass was so much lighter.
In short, it just didn’t add anything fun to the game. It was only after I took mass out of the equation, and replaced the inverse square with a linear falloff… then things felt fun. Admittedly I was a bit hurt that my time and effort into making a simulation would be wasted, but it is far more important that I made that sacrifice to make it more enjoyable.
Anyway, the force has been implemented as a side effect of killing another ship… the resulting explosion gives you some slight damage and the force of the explosion knocks you back. Now I just need an actual explosion, sound effect, etc. Time to start working on explosion particles. Yay!