Friday, March 16, 2012

Grapnel Physics and Grapnel 2 Graphics

I wouldn't have expected it, but Inkscape is actually really good for pixel art.

For Grapnel 2, I'm currently imagining multiple areas to swing through, differing in graphics and the mix of traps to dodge. For the moment, I'm working on the classic Temple zone. I'll add others once everything else is working.

Anyway, here's what graphics I've got so far. It's enough to get started at least. The arms and the body are separated so they can rotate individually. They look a lot better when put together.







Now I've got to work out how to handle the physics of someone swinging around on a line.

The physics in Grapnel 1 was actually pretty simple. I used Verlet integration and treated the rope as a stiff spring if it was being stretched (and nonexistent if it wasn't). With gravity and a small acceleration towards the mouse cursor, IIRC, that's about all there is to it.

In Grapnel 2, I want to get rid of the artificial acceleration. Instead, I'm going to make the mouse control the torque applied between the arm and the body. That should give a much more realistic (and hopeful more interesting) control mechanic. It should also allow me to give bonuses for doing flips and such.

No comments: