Jul 21, 2012 05:14
I spent most of the evening encapsulating the physics engine within Collidable so nothing outside Collidable and PhysicsJoint depend on it or any of its data types. Everything now goes through the public Collidable interface instead of using Chipmunk (or Box2D) data types or functions. I was even able to remove the physics engine include file from all common headers to prevent future shenannigans.
I was originally going to branch the Chipmunk-based version and then reintegrate later but it seems to be working well and cleans up so many things that had been bothering me that I decided to commit it to the trunk instead. This may well be the biggest single commit I've ever made on VideoVenture in both size and scope. I just hope I don't regret it later...
Incidentally, I managed to get Rave Gun working correctly with a somewhat-hacky asset change. Enemy bullets previously spawned explosions and switched to purple diamonds but the switch seems to have b0rked something in the collision contact handler. Making them spawn purple diamonds and switch to explosions fixed it and seems cleaner anyway. Dynamic type switching has always been sketchy but apparently something changed that made it fall over. The worrisome part is that I have no idea why it sometimes worked and sometimes didn't.
programming,
shmup