A swing test for a one-button game. Get from the first block to the last as fast as you can. Every finish takes you to a new world; the address keeps the one you’re in, so you can play it again.
- Hold
- Space, or a finger anywhere. You grab the marked ring, in the air as soon as it’s in reach.
- Let go
- You fly on with the speed you had. The dotted line shows where to; orange means you’ll make it.
- Swipe
- Left and right while you hold, to swing higher. Or the arrow keys.
- Fall
- You’re back on the last block. The clock runs on.
How it’s built
A test of one question before there’s a game: does swinging on a cable feel good, on a phone too? The game itself goes on at games.sobra.be.
- A fixed step. Verlet integration at 120 Hz with an accumulator, so it plays the same at 60 and 120 frames a second.
- A cable, not a spring. It never gets longer than when you hooked on; moving towards the anchor, it goes slack.
- Holding is grabbing. Hold in the air and you hook on as soon as an anchor is in reach; one that just left reach still counts for a moment.
- A look ahead. While you swing, a dotted line shows where you’d fly if you let go now.
- A new world every run. Built from a seed in
course.js, then played through by a bot that follows the hints; one it can’t finish without falling is thrown away. - Sound without files. Web Audio: a hum that follows the pull on the cable, a click and a thud.