Run (bird, in place)

The run of the game cycles for birds: a forward lean with the head thrust out and the wings half open and flapping hard, fitted to a speed setting so the planted foot never slides.

A cartoon person and a dog leaning forward with arms swept back, running in place.

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

What it is for

Run (bird, in place) is the run of the nine game cycles, written for the bird set: a forward lean, the head thrust out and the wings flapping hard rather than held settled, a bird's own sprint. Like Waddle (bird, in place) it is built on the shared walk cycle block, since a bird's one-bone leg needs no separate shin formula the way a two-bone leg does.

The principle it shows: exaggeration

Most of the walk's numbers are simply pushed further here: a wider stride and a wing-flap nearly five times the walk's own swing, 28 degrees instead of 6. Not every number grows, though — the body's side-to-side roll actually settles down, 3 degrees instead of 5, as if the bird is holding itself steadier while it concentrates on speed. That true detail, not just bigger numbers everywhere, is what keeps the exaggeration from feeling arbitrary.

The program, line by line

settings: speed = 1.5, h = 540, leg = 0.05, every = (clamp(0.34 - 0.04*speed, 0.2, 0.3)), stride = (clamp(12 + 6*speed, 16, 26)), feet = 1
when it starts
  set left arm -55, right arm 55, torso -6, head -4
  walk cycle every (every) s · arm swing 0 · no bob · roll 3 · stride (stride) · give 0 · bend 0 · seen from the side
  left foot follows (-feet*(stride*((1 - 4*mod(local/every + 0, 1))*(1 - step(0.5, mod(local/every + 0, 1))) + (4*mod(local/every + 0, 1) - 3)*step(0.5, mod(local/every + 0, 1)))))
  right foot follows (-feet*(stride*((1 - 4*mod(local/every + 0.5, 1))*(1 - step(0.5, mod(local/every + 0.5, 1))) + (4*mod(local/every + 0.5, 1) - 3)*step(0.5, mod(local/every + 0.5, 1)))))
  left leg lift follows (0.025*h*max(0, -sin(2*pi*(local/every + 0))))
  right leg lift follows (0.025*h*max(0, -sin(2*pi*(local/every + 0.5))))
  dy follows (h*leg*(1 - (1 - step(0.5, mod(local/every, 1)))*cos((stride*((1 - 4*mod(local/every + 0, 1))*(1 - step(0.5, mod(local/every + 0, 1))) + (4*mod(local/every + 0, 1) - 3)*step(0.5, mod(local/every + 0, 1))))*pi/180) - step(0.5, mod(local/every, 1))*cos((stride*((1 - 4*mod(local/every + 0.5, 1))*(1 - step(0.5, mod(local/every + 0.5, 1))) + (4*mod(local/every + 0.5, 1) - 3)*step(0.5, mod(local/every + 0.5, 1))))*pi/180)) - 0.012*h - 0.03*h*abs(sin(2*pi*mod(local/every, 1))))
  sin wave on left arm · every (every/2) s · amp -28
  sin wave on right arm · every (every/2) s · amp 28
  sin wave on tail · every (every) s · amp 10

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

clamp(0.34 - 0.04*speed, 0.2, 0.3)

clamp(12 + 6*speed, 16, 26)

-feet*(stride*((1 - 4*mod(local/every + 0, 1))*(1 - step(0.5, mod(local/every + 0, 1))) + (4*mod(local/every + 0, 1) - 3)*step(0.5, mod(local/every + 0, 1))))

-feet*(stride*((1 - 4*mod(local/every + 0.5, 1))*(1 - step(0.5, mod(local/every + 0.5, 1))) + (4*mod(local/every + 0.5, 1) - 3)*step(0.5, mod(local/every + 0.5, 1))))

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

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

h*leg*(1 - (1 - step(0.5, mod(local/every, 1)))*cos((stride*((1 - 4*mod(local/every + 0, 1))*(1 - step(0.5, mod(local/every + 0, 1))) + (4*mod(local/every + 0, 1) - 3)*step(0.5, mod(local/every + 0, 1))))*pi/180) - step(0.5, mod(local/every, 1))*cos((stride*((1 - 4*mod(local/every + 0.5, 1))*(1 - step(0.5, mod(local/every + 0.5, 1))) + (4*mod(local/every + 0.5, 1) - 3)*step(0.5, mod(local/every + 0.5, 1))))*pi/180)) - 0.012*h - 0.03*h*abs(sin(2*pi*mod(local/every, 1)))

Try this

  1. Raise the running speed from 1.5 to 2 body heights a second, the top of this move's fitted range. The stride and the loop quicken together, without the planted foot sliding.

    In the program: params.speed 1.5 → 2

  2. Drag the stance foot back only three-tenths as far instead of the whole way. The run looks lighter on its feet, each stride leaving less of a trailing foot behind it.

    In the program: params.feet 1 → 0.3

How it differs from Waddle (bird, in place) and Run (in place)

Waddle (bird, in place) is the same mechanism at a gentler pace, with a sharp head-bob this run trades for a forward thrust instead. Run (in place) is the two-bone-leg version of a sprint, built from a thigh and a shin rather than one leg bone and a foot.

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, turns, body, head, arms, legs
4 legs (a dog)yeswhole body, body, head, front legs, back legs, tail, ears
no legs (the monster with no legs)yeswhole body, turns, body, arms, tail, ears

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