Waddle (bird, in place)

The walk of the game cycles for birds: a quick waddle, the head snapping forward sharply with each step and the wings held a little out, fitted to a speed setting so the planted foot never slides.

A cartoon person and a dog waddling in place, head snapping forward with each step.

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

What it is for

Waddle (bird, in place) is the walk of the nine game cycles, written for the bird set. It is built from the same walk cycle block the fours and many-legged walks use for their own body sway, layered with a bird-specific foot-drag, a foot lift and a sharp head-bob: a waddle with the gull's own sharp head bob. Because a bird's leg is one bone rather than two, this cycle has no shin channel at all: the leg and the foot do all of the work a two-bone leg would split across a thigh and a shin.

The principle it shows: secondary action

The walk cycle block supplies the main waddle: a side-to-side roll and the legs' own stepping. Riding on top of that as a secondary action is the head, driven by its own triangle wave rather than a sine, twice a step, so it snaps forward sharply instead of swaying smoothly. That sharp secondary snap is the one detail that makes this walk read as a bird rather than any other two-legged body doing the same steps.

The program, line by line

settings: speed = 0.75, h = 540, leg = 0.05, every = (clamp(0.5 - 0.12*speed, 0.26, 0.46)), stride = (clamp(8 + 8*speed, 10, 24)), feet = 1
when it starts
  set left arm -12, right arm 12, torso -4
  walk cycle every (every) s · arm swing 0 · no bob · roll 5 · 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.02*h*abs(sin(2*pi*mod(local/every, 1))))
  tri wave on head · every (every/2) s · amp -7
  sin wave on left arm · every (every/2) s · amp -6
  sin wave on right arm · every (every/2) s · amp 6
  sin wave on tail · every (every) s · amp 8

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

clamp(0.5 - 0.12*speed, 0.26, 0.46)

clamp(8 + 8*speed, 10, 24)

-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.02*h*abs(sin(2*pi*mod(local/every, 1)))

Try this

  1. Raise the waddling speed from 0.75 to 1.5 body heights a second. The steps quicken together with the head-bob, without the planted foot sliding.

    In the program: params.speed 0.75 → 1.5

  2. Drag the stance foot back only half as far, 0.5 instead of 1. The waddle looks lighter, each step leaving less of a trailing foot behind it.

    In the program: params.feet 1 → 0.5

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

Walk (in place) is the two-bone-leg version, with a thigh and a shin doing the bending rather than one bone and a foot. Run (bird, in place) is this same waddling mechanism 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, 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_walk_bird · version 1.0.0 · c4c-free · by Jabbertoon