Jump (bird, in place)

The jump of the game cycles for birds, in the same named phases the upright jump uses, so a game can start it at any point or hold the bird at the top or in the fall.

A cartoon person and a dog high in the air, arms swept wide like wings at the top of a jump.

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

What it is for

Jump (bird, in place) is the jump of the nine game cycles, written for the bird set: the same named phases (crouch, rise, apex, fall, land, recover) as Jump (in place), so a game can start from any one of them with the from setting, or hold the bird at the top or in the fall with hold. Because a bird's leg is one bone, the crouch bends the leg and the foot rather than a thigh and a shin, and the "arms" here are the wings, spread and beaten instead of thrown up.

The principle it shows: anticipation

Before the bird leaves the ground, it crouches, the legs bending and the wings swept back rather than out, storing the energy the spring then releases. The beat of the wings right at the spring and the flapping through the fall are what make this jump read as a bird's rather than a person's jump reused on a different body; both of those details come after the same anticipating crouch every jump in this set opens with.

The program, line by line

settings: h = 540, leg = 0.05, hold = 0, from = 0
when it starts
  show the side view
  if (from <= 0):
    at the same time:
      — 1:
        glide left leg 30, right leg 30, left foot -30, right foot -30, left arm -100, right arm 100, torso -8, head 6 over 0.14 s (out)
      — 2:
        set dx 0, dy 0
        for 0.14 s:
          dy follows (h*leg*(1 - cos(((0 + 30*sin((min(local/0.14, 1))*pi/2)))*pi/180)))
          dx follows (-h*leg*sin(((0 + 30*sin((min(local/0.14, 1))*pi/2)))*pi/180))
    set dx (-h*leg*sin((30)*pi/180)), dy (h*leg*(1 - cos((30)*pi/180)))
  if (from <= 1):
    at the same time:
      — 1:
        glide left leg 0, right leg 0, left foot 0, right foot 0, left arm 10, right arm -10, sx 0.97, sy 1.03 over 0.08 s (in)
      — 2:
        set dx 0, dy 0
        for 0.08 s:
          dy follows (h*leg*(1 - cos(((30 + -30*pow(min(local/0.08, 1), 2)))*pi/180)))
          dx follows (-h*leg*sin(((30 + -30*pow(min(local/0.08, 1), 2)))*pi/180))
    set dx (-h*leg*sin((0)*pi/180)), dy (h*leg*(1 - cos((0)*pi/180)))
    glide left leg 30, right leg 30, left foot -30, right foot -30, left arm -140, right arm 140, torso 0, sx 1, sy 1 over 0.12 s (out)
  if (from <= 2):
    glide left leg 40, right leg 40, left foot -40, right foot -40, left arm -100, right arm 100, head 0 over 0.18 s (smooth)
  if (hold == 1):
    sin wave on left arm · every 0.5 s · amp -8
    sin wave on right arm · every 0.5 s · amp 8
  else:
    if (from <= 3):
      glide left leg 14, right leg 14, left foot -14, right foot -14, left arm -120, right arm 120 over 0.22 s (in)
    if (hold == 2):
      sin wave on left arm · every 0.25 s · amp -30
      sin wave on right arm · every 0.25 s · amp 30
    else:
      glide left leg 0, right leg 0, left foot 0, right foot 0, left arm -70, right arm 70 over 0.06 s (in)
      at the same time:
        — 1:
          glide left leg 26, right leg 26, left foot -26, right foot -26, left arm -60, right arm 60, torso -6, sx 1.03, sy 0.97 over 0.12 s (out)
        — 2:
          set dx 0, dy 0
          for 0.12 s:
            dy follows (h*leg*(1 - cos(((0 + 26*sin((min(local/0.12, 1))*pi/2)))*pi/180)))
            dx follows (-h*leg*sin(((0 + 26*sin((min(local/0.12, 1))*pi/2)))*pi/180))
      set dx (-h*leg*sin((26)*pi/180)), dy (h*leg*(1 - cos((26)*pi/180)))
      at the same time:
        — 1:
          glide left leg 0, right leg 0, left foot 0, right foot 0, left arm 0, right arm 0, torso 0, head 0, sx 1, sy 1 over 0.16 s (smooth)
        — 2:
          set dx 0, dy 0
          for 0.16 s:
            dy follows (h*leg*(1 - cos(((26 + -26*smoothstep(min(local/0.16, 1))))*pi/180)))
            dx follows (-h*leg*sin(((26 + -26*smoothstep(min(local/0.16, 1))))*pi/180))
      set dx (-h*leg*sin((0)*pi/180)), dy (h*leg*(1 - cos((0)*pi/180)))

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

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

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

-h*leg*sin((30)*pi/180)

h*leg*(1 - cos((30)*pi/180))

h*leg*(1 - cos(((30 + -30*pow(min(local/0.08, 1), 2)))*pi/180))

-h*leg*sin(((30 + -30*pow(min(local/0.08, 1), 2)))*pi/180)

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

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

h*leg*(1 - cos(((0 + 26*sin((min(local/0.12, 1))*pi/2)))*pi/180))

-h*leg*sin(((0 + 26*sin((min(local/0.12, 1))*pi/2)))*pi/180)

-h*leg*sin((26)*pi/180)

h*leg*(1 - cos((26)*pi/180))

h*leg*(1 - cos(((26 + -26*smoothstep(min(local/0.16, 1))))*pi/180))

-h*leg*sin(((26 + -26*smoothstep(min(local/0.16, 1))))*pi/180)

Try this

  1. Hold the jump at the top (hold 1 instead of 0). The wings flutter gently instead of falling, so the bird hangs at the apex for as long as a game needs.

    In the program: params.hold 0 → 1

  2. Start the jump from the landing (from 4 instead of 0). The crouch, spring, apex and fall are all skipped; only the touchdown and the stand back up play.

    In the program: params.from 0 → 4

How it differs from Jump (in place) and Fall (bird)

Jump (in place) is the same phased jump for a two-bone leg and arms rather than wings. Fall (bird) is the open-ended loop a game switches to once the bird is actually falling, rather than this move's own fixed fall phase.

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_jump_bird · version 1.0.0 · c4c-free · by Jabbertoon