Scuttle (many legs, in place)

The walk of the game cycles for many legs: every leg steps in one of two alternating sets, so none crosses its neighbour, while the claws hold up and sway and the body rocks a little side to side.

A cartoon person and a dog mid-step, arms lifted and swaying, stepping in place on the grass.

Use it in a cartoonOpen it in the block editorThe pack file (JSON)

What it is for

Scuttle (many legs, in place) is the walk of the nine game cycles, written for the many set: three or more legs a side, up to 16 in all. The gait has the legs stepping side against side in two alternating sets, each side's legs swinging together so none crosses its neighbour, the runtime's own gait handling any leg count without the pack needing to name each leg individually the way the fours walk does.

The principle it shows: secondary action

The walk cycle block supplies the whole leg gait on its own. Everything else in this move rides on top of it as a secondary action: the claws hold up and sway, a small sideways rock moves the whole body (dx), and a slight rise and fall (dy) tracks the steps. None of those touch the legs themselves; they are layered on top of a gait the block already handles completely.

The program, line by line

settings: speed = 0.75, h = 540, leg = 0.1, every = (clamp(0.5 - 0.1*speed, 0.26, 0.45)), stride = (clamp(16 + 12*speed, 20, 36))
when it starts
  set left arm -8, right arm 8, left arm lift (0.046*h), right arm lift (0.046*h)
  walk cycle every (every) s · arm swing 0 · no bob · roll 0 · stride (stride) · give 4 · bend 20
  left leg lift follows (0.035*h*max(0, -sin(2*pi*(local/(every) + 0))))
  left shin follows (16*max(0, -sin(2*pi*(local/(every) + 0))))
  right leg lift follows (0.035*h*max(0, -sin(2*pi*(local/(every) + 0.5))))
  right shin follows (16*max(0, -sin(2*pi*(local/(every) + 0.5))))
  sin wave on dx · every (every) s · amp (0.012*h)
  sin wave on rot · every (every) s · amp 3
  abssin wave on dy · every (every) s · amp (-0.006*h) · offset (-0.01*h)
  sin wave on left arm · every (every) s · amp -10
  sin wave on right arm · every (every) s · amp 10
  sin wave on left claw · every (every/2) s · amp 8
  sin wave on right claw · every (every/2) s · amp -8

Written out in full, exactly as the engine prints them:

clamp(0.5 - 0.1*speed, 0.26, 0.45)

clamp(16 + 12*speed, 20, 36)

0.035*h*max(0, -sin(2*pi*(local/(every) + 0)))

16*max(0, -sin(2*pi*(local/(every) + 0)))

0.035*h*max(0, -sin(2*pi*(local/(every) + 0.5)))

16*max(0, -sin(2*pi*(local/(every) + 0.5)))

Try this

  1. Raise the scuttling speed from 0.75 to 2 body heights a second, the top of this move's fitted range. The legs quicken their alternating sets together, without a planted leg sliding.

    In the program: params.speed 0.75 → 2

  2. Widen the stride directly to 40 degrees instead of letting it follow from speed. Each set of legs swings noticeably further with every step.

    In the program: params.stride "=clamp(16 + 12*speed, 20, 36)" → 40

How it differs from Walk (in place) and Run (many legs, in place)

Walk (in place) names each leg itself in its own formula; Scuttle leaves the leg gait entirely to the runtime's own many-legged handling. Run (many legs, in place) is this same scuttle pushed to a faster, wider stride.

Works on

Worked out by the build: it plays the move in the engine on each body and checks what moves on screen. Nobody types this table.
BodyMoves?What moves
2 legs (a person)yeswhole body, body, arms, legs
4 legs (a dog)yeswhole body, body, front legs, back legs
no legs (the monster with no legs)yeswhole body, body, arms

c4c:beh:cycle_walk_many · version 1.0.0 · c4c-free · by Jabbertoon