Swim (four legs)
The swim of the game cycles for four legs: the front legs paddle in turn while the back legs kick, the head held up, looping every 0.8 seconds for as long as a game has the character afloat.

Use it in a cartoonOpen it in the block editorThe pack file (JSON)
What it is for
Swim (four legs) is the swim of the nine game cycles, written for the fours set: paddling with the front legs in turn and kicking with the back legs, the head held up, rather than the upright swim's two-armed paddle.
The principle it shows: overlapping action
The front legs paddle on a 0.8-second cycle while the back legs kick twice as fast, every 0.4 seconds, and the body's small bob keeps the slower rhythm while the tail swings with the back legs' faster one. Several different speeds running at once, rather than one shared timing for the whole body, is what keeps the swim from reading as a single mechanical paddle.
The program, line by line
settings: h = 540, leg = 0.33
when it starts
show the side view
set dy (-0.05*h), torso 6, head 10, back left leg -10, back left shin 20, back left foot 0, back right leg -10, back right shin 20, back right foot 0, front left leg 30, front left shin 30, front left foot 0, front right leg 30, front right shin 30, front right foot 0
sin wave on front left leg · every 0.8 s · amp 28
sin wave on front right leg · every 0.8 s · amp 28 · phase 3.141592653589793
sin wave on front left shin · every 0.8 s · amp 24 · phase 1.5707963267948966
sin wave on front right shin · every 0.8 s · amp 24 · phase 4.71238898038469
sin wave on back left leg · every 0.4 s · amp 16
sin wave on back right leg · every 0.4 s · amp 16 · phase 3.141592653589793
sin wave on dy · every 0.8 s · amp 3
sin wave on tail · every 0.4 s · amp 14show the side view— the move is drawn in profile.set dy (-0.05*h), torso 6, head 10, back left leg -10, back left shin 20, back left foot 0, back right leg -10, back right shin 20, back right foot 0, front left leg 30, front left shin 30, front left foot 0, front right leg 30, front right shin 30, front right foot 0— the base floating pose: the body lifted slightly, head held up, the front legs already reaching forward to paddle.sin wave on front left leg · every 0.8 s · amp 28,sin wave on front right leg · every 0.8 s · amp 28 · phase 3.14— both front legs paddle, opposite each other.sin wave on front left shin · every 0.8 s · amp 24 · phase 1.57,sin wave on front right shin · every 0.8 s · amp 24 · phase 4.71— both front shins bend a quarter-turn behind their own leg.sin wave on back left leg · every 0.4 s · amp 16,sin wave on back right leg · every 0.4 s · amp 16 · phase 3.14— both back legs kick, twice as fast as the front legs.sin wave on dy · every 0.8 s · amp 3— a small body bob, at the front legs' own speed.sin wave on tail · every 0.4 s · amp 14— the tail swings at the back legs' faster rhythm.
Try this
Paddle the front left leg 40 degrees instead of 28. The stroke becomes a much harder paddle, pushing far more water with each reach.
In the program:
wave · amp28→40Hold the head 20 degrees up instead of 10. The character strains much further above the water to keep its face clear.
In the program:
set · to.part:head10→20
How it differs from Swim and Climb (four legs)
Swim is the same idea paddling with two arms on a two-legged body rather than four legs. Climb (four legs) is the other cycle written for this body with no foot-planting math, reaching up a surface rather than paddling through water.
Works on
| Body | Moves? | What moves |
|---|---|---|
| 2 legs (a person) | yes | whole body, turns, body, head, arms |
| 4 legs (a dog) | yes | whole body, body, head, front legs, back legs, tail, ears |
| no legs (the monster with no legs) | yes | whole body, turns, body, arms, tail, ears |