Updated me some physics


My polygon-ball intersection test wasn't working right, and I had to take a few steps back to rewrite it correctly. Now it's both faster (because it does early rejection wherever possible) and more accurate. The trick was to stop thinking about it in terms of intersecting a circle with a polygon, and to start thinking about it in terms of intersecting a point with the Minkowski sum of a polygon and a circle.

I mean, the end result is that the math is still based on circle-polygon intersections, but I was able to actually reason through how the math should work better, by breaking it down into cells. Which also helped me to solve the corner cases, this time meant very very literally.

I also fixed a problem with the physics where I wasn't integrating acceleration in correctly. This normally doesn't matter, except that the engine is set up to allow for time dilation - and that's definitely going to be a mechanic I add later on! (I've also tested it to a limited extent. It's fun.)

I also added a cooldown period between when a ball is eligible to give points; this fixes both an actual scoring exploit (allowing the yellow balls in phase 3 to come to rest on the paddle) and a potential scoring exploit (doing a frame-perfect pause during particular collisions). The pause exploit is particularly clear to me after having watched a few speedruns on SGDQ, although really, who doesn't remember Blaster Master?

Anyway, I've sketched out a bunch of ideas for game mechanics, and also some nifty visual effect stuff as well. I've also worked out how I'm going to code most of it, so that's a plus. :)

Files

macOS, x86 64-bit 32 MB
Version 2 136 days ago
Windows, x86 64-bit 22 MB
Version 2 136 days ago
Windows, x86 32-bit 22 MB
Version 2 136 days ago
LÖVE bundle (requires LÖVE 0.10.2) 19 MB
Version 2 136 days ago

Get Refactor

Buy Now$1.41 USD or more

Leave a comment

Log in with your itch.io account to leave a comment.