Not quite done with this one yet, so I don’t have much to say:

I’ve been working on an implementation for the player’s grappling hook. So far I have some of the basics implemented – aiming the hook, throwing it, the hook attaching itself to surfaces, the hook retracting so you can throw it again, and so on. I still have to figure out the majority of the physics for the hook, along with other details like preventing it from going through walls and floors.

Getting it to work has required me to make some significant refactorings to the code I use to handle player movement. So far, the code’s been becoming simpler, but I’ve had to go back and rethink some of the logic I wrote to handle acceleration and deceleration. I’ve been replacing a lot of special cases and nested ifs with expressions that make heavy use of Min, Max, Sign, and Abs to properly clamp and adjust the player’s velocity based on various inputs (is the user pressing the dpad, is the user jumping, etc.)