A Smattering of Physics
Unquestionably, the game needs a physics engine of some variety: your movement will be physically simulated, and of course it would be silly if you could just fly through everything.
For starters, they’re pretty much all big C++ codebases with complicated build systems. I still don’t want to go there if I can help it. And they’re all created to do rigidbody dynamics and joints and springs and wheeled vehicles and all these things that I simply don’t need.
So I’m going to write my own!
Given the nature of the game (as I foresee it just now, at any rate), I should be fine with only spheres for dynamic objects, and meshes for static objects. When the only things that move are spheres, collision detection and response become much simpler problems.
But it’s still not a simple problem. I decided to start by creating a particle system (a quick copy-paste-rename of the pointcloud functions), and then add basic physical simulation with an infinite ground to collide with. Which would look nice in Sponza.
I started by poking about in the book Physics for Game Developers (Bourg & Bywalec. O’Reilly), since I had it lying around in PDF form. At first it seemed fine, but as soon as I started wanting to understand collision detection and response, it became clear that the book was thoroughly inadequate.
I didn’t buy the book just to be told to google for crucial information. Okay, so I didn’t buy the book at all, but that’s beside the point.
So instead I did a bit of googling to find some better books, and these two look pretty good, and seem to have a solid reputation. (But their cover art is dreadful! I guess they just don’t make them like they used to!)
I’m going to have to do some more reading for sure.
In the meantime, I got my particles bouncing off an infinite floor plane okay!