Swing Like Water
Swing Like WaterMedia coming soon
About this project
Swing Like Water is a 2D action game in Godot 4 built around one mechanic: a grappling hook that feels like a real rope. Fire it at the terrain, swing, wrap it around corners, and reel yourself in.
What it does
- Fire the grapple towards the mouse, and it anchors to the first piece of terrain it hits.
- Swing freely on a rope of fixed length, or hold the button to reel in towards the anchor.
- The rope wraps around corners as you swing past them and unwraps when you swing back.
- Enemies and homing orbs chase the player, and the player can be knocked back.
How it works
- Player states. The player is a physics body with four grapple states: idle, shooting, anchored and reeling.
- Swinging. While anchored, any velocity that would stretch the rope past its length is cancelled with a force each physics step, so the player swings on a taut rope instead of on a spring.
- Reeling. Reeling applies a damped spring force along the whole rope. The pull eases off exponentially as the rope gets short, so the player doesn’t slam into the anchor.
- Wrapping. Each physics step casts a ray from the player to the current anchor. If terrain is in the way, a new hook point goes in at the hit. The swing direction is saved with it (a cross product), and when the player swings back past the corner the point is removed again.
- Rope visuals. The rope is a
Line2Ddriven by a shader, which animates a short squiggle as the hook flies out.
The physics runs at 120 ticks per second with interpolation, to keep fast swings smooth.