Day 26: Grenade jumps

February 12, 2010 by pekuja · Leave a Comment 

mato_grenadejump

Well, the new feature isn’t so much grenade jumps as it is the fact that explosions have a blast force that pushes you away from them. It’s probably exaggerated for the simple grenade here, but allows for some nice jumps, which is nice. You do take full damage though. It might be a fun feature though, so I’ll consider adding a low damage, high blast force grenade, or make you take less damage from your own grenades. Making this work properly also required me to adjust the walking physics a bit. Earlier I was just setting the X velocity of the mole directly, which would of course mess up the momentum caused by the blast. Now there’s a bit of acceleration up until a maximum speed, and a simple friction model so that the mole will slow down a little bit every frame if it’s on solid ground. No bunny hopping though, but I guess I could add that on purpose. ;-)

I might also add gun recoil tonight while I’m at it. Should be pretty simple at this point. I also really should start implementing the grappling hook soon. It’s a pretty major feature, but then again, maybe I should embrace mobility with grenade jumping instead. ;-)