ClimbRules
The simulation behind WICK, driven by seconds.
game.Climb is the mount; everything the game actually does is here — the
cling, the slide, the kick, the grip, the sea, the hazards, the verdict —
behind four calls that take nothing but numbers and strings.
local Rules = require("game.ClimbRules")
Rules.press() -- the button went down
Rules.setHeld(true) -- and is being held, this frame
Rules.uiAction("start") -- a card asked for something
Rules.introDone() -- the staging slice released the opening
Rules.tick(1 / 60) -- one frame of the game
It writes Core.state and nothing else. It reads the course from game.Shaft.
Why it is not in the component
A whole 120 m climb is a loop over tick(1/60) with a press() on a steady
beat, so the arc, the difficulty curve and the sea can be measured over the
real course in one pass — in any mode, without the renderer, a device or a
frame budget. That is how the tuning below was found, and it is how it should
be re-checked after any change to Shaft:
Core.state.phase = "title"
Rules.uiAction("start"); Rules.introDone()
local t, nextTap = 0, 0
while Core.state.phase == "climb" or t == 0 do
if t >= nextTap then Rules.press(); nextTap = t + 0.1 end
Rules.tick(1 / 60)
t += 1 / 60
end
-- Core.state.phase is "won" or "lost"; Core.state.elapsed is the round
The arc
A kick crosses the 5.3 m between two plumb faces in 1.15 s, tops out about 3.5 m above the launch, and catches the far wall 1.8 m higher than it left. A steady tap climbs a little over 1 m/s, so the 116 m from the start to the lamp takes a clean run a shade over 90 seconds. Where the granite leans inward the crossing shortens and the same kick lands higher; where it bulges out the kick has to stretch and barely gains.
Measured over the real course, tap by tap:
| Seconds between taps | Round |
|---|---|
| 0.05 | won, 110.7 s |
| 0.08 | won, 92.6 s |
| 0.10 | won, 96.9 s |
| 0.15 | won, 100.4 s |
| 0.20 | won, 123.5 s |
| 0.30 | won, 120.4 s |
| 0.45 | lost, drowned at 109 m after 145.5 s |
| never | lost, drowned after 7.3 s |
The sea
It homes on a gap rather than rising at a flat rate: a floor it always climbs
at, plus more the further behind it falls, up to a cap. So it sits a handful of
metres under a climber who keeps moving — in frame, and one bad landing away —
and it takes a climber who stops. At Core.SEA.surgeAt the floor rises and the
gap it is content with closes.
What can go wrong on the wall
| A window | No granite to catch. A paw within lipReach of the sill or the head catches that instead; otherwise the cat drops through the opening until the wall resumes. fall, then land. |
| A spike, a live wire, a chain | Knocked off: claws out, grip gone, scrabbling down the face for knockSeconds before it catches a couple of metres lower. hazard, then land. A chain caught in mid-air throws the cat across the shaft, tumbling rather than dropping. |
| Crumbling plaster | It holds the landing for plasterGrace, then comes away once. That patch is bare for the rest of the run. |
A hazard never kills, and no hazard takes the same cat twice in a run — a climber knocked off a face falls back into the stretch that hit it, and a hazard that could hit it again there is a stretch of shaft a steady rhythm never passes. The sea is the only thing that kills.
Scoped to this part · feeds back into the world's score.