So Muncher’s Labyrinth finally convinced me that while physics in games is very cool, it’s not really something that I’m good at implementing, and so for the last few days, I’ve been out looking at various existing physics libraries which I might be able to integrate into VectorStorm, rather than spend all my time trying to teach myself physics code, when I’d rather be making games.
The biggest option on the list is Box2D, a fantastic collision and physics solver (that is capable of far, far more than is visible in the screenshot above), and so I’ve spent the past hour or two getting it to run inside VectorStorm. The screenshot here is using a temporary ‘testbed sprite’ class that’s just a proof of concept of how a VectorStorm vsSprite might be linked to a Box2D b2Body.. but it needs an awful lot more work before it’s really as seamless as I’d like!
For anyone who’d really like to look at it in the VectorStorm world, there’s an updated Win32 binary build available here (you want build 148); the demo shown here is in the “Testbed” game mode from the main menu. Use the left analog stick (or arrow keys) to move the large solid block around, and the ‘A’ gamepad button (or the space bar) to reset all 300 blocks. But if you want to see cool physics stuff, the demos available from the Box2D site show off the system far better than this little proof-of-concept demo!