Cheer (win)

The win of the nine game cycles: a little spring with both arms up, two pumps of the fists and a happy face, 1.2 seconds from start to finish, for a game to play the instant a character wins or clears something.

A cartoon person and a dog with arms raised overhead, mid-cheer, a happy face.

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

What it is for

Cheer (win) is the win of the nine game cycles: a game plays it the instant a character wins, clears a level or completes whatever it is working toward, a short burst, 1.2 seconds, that plays once and ends back at a standing pose.

The principle it shows: anticipation and follow-through

A small spring up (legs bending 18 degrees, arms swinging back) comes first and primes the cheer before the arms ever go up, the same storing-of-energy a jump's crouch does. After the main pump of fists is done, the move does not simply stop: a quarter-turn-offset wave keeps both forearms snapping for half a second, the energy spent in diminishing little pumps rather than cut off dead, before easing all the way back to standing.

The program, line by line

settings: h = 540, leg = 0.24
when it starts
  show the side view
  look happy
  at the same time:
    — 1:
      glide hips 0, left leg 18, right leg 18, left shin 36, right shin 36, left foot 18, right foot 18, left arm -20, right arm -20, left forearm 20, right forearm 20 over 0.14 s (out)
    — 2:
      set dx 0, dy 0
      for 0.14 s:
        dy follows (h*leg/2*(2 - cos(((0 + 18*sin((min(local/0.14, 1))*pi/2)))*pi/180) - cos((((0 + 18*sin((min(local/0.14, 1))*pi/2))) - ((0 + 36*sin((min(local/0.14, 1))*pi/2))))*pi/180)))
        dx follows (-h*leg/2*(sin(((0 + 18*sin((min(local/0.14, 1))*pi/2)))*pi/180) + sin((((0 + 18*sin((min(local/0.14, 1))*pi/2))) - ((0 + 36*sin((min(local/0.14, 1))*pi/2))))*pi/180)))
  set dx (-h*leg/2*(sin((18)*pi/180) + sin(((18) - (36))*pi/180))), dy (h*leg/2*(2 - cos((18)*pi/180) - cos(((18) - (36))*pi/180)))
  at the same time:
    — 1:
      glide hips 0, left leg 0, right leg 0, left shin 0, right shin 0, left foot 0, right foot 0, right arm 90, left arm 110, left forearm 25, right forearm 25 over 0.06 s (in)
    — 2:
      set dx 0, dy 0
      for 0.06 s:
        dy follows (h*leg/2*(2 - cos(((18 + -18*pow(min(local/0.06, 1), 2)))*pi/180) - cos((((18 + -18*pow(min(local/0.06, 1), 2))) - ((36 + -36*pow(min(local/0.06, 1), 2))))*pi/180)))
        dx follows (-h*leg/2*(sin(((18 + -18*pow(min(local/0.06, 1), 2)))*pi/180) + sin((((18 + -18*pow(min(local/0.06, 1), 2))) - ((36 + -36*pow(min(local/0.06, 1), 2))))*pi/180)))
  set dx (-h*leg/2*(sin((0)*pi/180) + sin(((0) - (0))*pi/180))), dy (h*leg/2*(2 - cos((0)*pi/180) - cos(((0) - (0))*pi/180)))
  glide dy (-0.045*h), left foot -8, right foot -8, right arm 132, left arm 165, mouth 0.6 over 0.12 s (out)
  glide dy 0, left foot 0, right foot 0 over 0.1 s (in)
  at the same time:
    — 1:
      glide hips 0, left leg 12, right leg 12, left shin 24, right shin 24, left foot 12, right foot 12 over 0.08 s (out)
    — 2:
      set dx 0, dy 0
      for 0.08 s:
        dy follows (h*leg/2*(2 - cos(((0 + 12*sin((min(local/0.08, 1))*pi/2)))*pi/180) - cos((((0 + 12*sin((min(local/0.08, 1))*pi/2))) - ((0 + 24*sin((min(local/0.08, 1))*pi/2))))*pi/180)))
        dx follows (-h*leg/2*(sin(((0 + 12*sin((min(local/0.08, 1))*pi/2)))*pi/180) + sin((((0 + 12*sin((min(local/0.08, 1))*pi/2))) - ((0 + 24*sin((min(local/0.08, 1))*pi/2))))*pi/180)))
  set dx (-h*leg/2*(sin((12)*pi/180) + sin(((12) - (24))*pi/180))), dy (h*leg/2*(2 - cos((12)*pi/180) - cos(((12) - (24))*pi/180)))
  for 0.5 s:
    sin wave on left arm · every 0.25 s · amp 12
    sin wave on right arm · every 0.25 s · amp 12
    sin wave on forearms · every 0.25 s · amp 22 · phase 1.5707963267948966
  at the same time:
    — 1:
      glide hips 0, left leg 0, right leg 0, left shin 0, right shin 0, left foot 0, right foot 0, left arm 0, right arm 0, left forearm 0, right forearm 0, mouth 0 over 0.2 s (smooth)
    — 2:
      set dx 0, dy 0
      for 0.2 s:
        dy follows (h*leg/2*(2 - cos(((12 + -12*smoothstep(min(local/0.2, 1))))*pi/180) - cos((((12 + -12*smoothstep(min(local/0.2, 1)))) - ((24 + -24*smoothstep(min(local/0.2, 1)))))*pi/180)))
        dx follows (-h*leg/2*(sin(((12 + -12*smoothstep(min(local/0.2, 1))))*pi/180) + sin((((12 + -12*smoothstep(min(local/0.2, 1)))) - ((24 + -24*smoothstep(min(local/0.2, 1)))))*pi/180)))
  set dx (-h*leg/2*(sin((0)*pi/180) + sin(((0) - (0))*pi/180))), dy (h*leg/2*(2 - cos((0)*pi/180) - cos(((0) - (0))*pi/180)))

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

h*leg/2*(2 - cos(((0 + 18*sin((min(local/0.14, 1))*pi/2)))*pi/180) - cos((((0 + 18*sin((min(local/0.14, 1))*pi/2))) - ((0 + 36*sin((min(local/0.14, 1))*pi/2))))*pi/180))

-h*leg/2*(sin(((0 + 18*sin((min(local/0.14, 1))*pi/2)))*pi/180) + sin((((0 + 18*sin((min(local/0.14, 1))*pi/2))) - ((0 + 36*sin((min(local/0.14, 1))*pi/2))))*pi/180))

-h*leg/2*(sin((18)*pi/180) + sin(((18) - (36))*pi/180))

h*leg/2*(2 - cos((18)*pi/180) - cos(((18) - (36))*pi/180))

h*leg/2*(2 - cos(((18 + -18*pow(min(local/0.06, 1), 2)))*pi/180) - cos((((18 + -18*pow(min(local/0.06, 1), 2))) - ((36 + -36*pow(min(local/0.06, 1), 2))))*pi/180))

-h*leg/2*(sin(((18 + -18*pow(min(local/0.06, 1), 2)))*pi/180) + sin((((18 + -18*pow(min(local/0.06, 1), 2))) - ((36 + -36*pow(min(local/0.06, 1), 2))))*pi/180))

-h*leg/2*(sin((0)*pi/180) + sin(((0) - (0))*pi/180))

h*leg/2*(2 - cos((0)*pi/180) - cos(((0) - (0))*pi/180))

h*leg/2*(2 - cos(((0 + 12*sin((min(local/0.08, 1))*pi/2)))*pi/180) - cos((((0 + 12*sin((min(local/0.08, 1))*pi/2))) - ((0 + 24*sin((min(local/0.08, 1))*pi/2))))*pi/180))

-h*leg/2*(sin(((0 + 12*sin((min(local/0.08, 1))*pi/2)))*pi/180) + sin((((0 + 12*sin((min(local/0.08, 1))*pi/2))) - ((0 + 24*sin((min(local/0.08, 1))*pi/2))))*pi/180))

-h*leg/2*(sin((12)*pi/180) + sin(((12) - (24))*pi/180))

h*leg/2*(2 - cos((12)*pi/180) - cos(((12) - (24))*pi/180))

h*leg/2*(2 - cos(((12 + -12*smoothstep(min(local/0.2, 1))))*pi/180) - cos((((12 + -12*smoothstep(min(local/0.2, 1)))) - ((24 + -24*smoothstep(min(local/0.2, 1)))))*pi/180))

-h*leg/2*(sin(((12 + -12*smoothstep(min(local/0.2, 1))))*pi/180) + sin((((12 + -12*smoothstep(min(local/0.2, 1)))) - ((24 + -24*smoothstep(min(local/0.2, 1)))))*pi/180))

Try this

  1. Keep the fists pumping for a full second instead of half a second. Two more pumps fit in before the cheer eases off, a longer celebration for a bigger win.

    In the program: for · s 0.5 → 1

  2. Open the mouth all the way (mouth 1 instead of 0.6) at the first fist pump. The cheer reads as a full shout instead of a grin.

    In the program: ramp · to.mouth 0.6 → 1

How it differs from Flinch (hurt) and Jump for joy

Flinch (hurt) is the opposite reaction on the same cycle set, a recoil rather than a spring, and it is a third as long. Jump for joy is a hand-built celebration meant to play once in a cartoon scene; Cheer (win) is the game cycles' own short win state, tuned to start and end cleanly between other cycles.

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

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