Learn › DS Beginner

Lesson 4 of 6 · About 6 min

Run and jump

Two numbers decide how far this jump carries you.

The hero of Meadow Hop in the middle of a jump between two planks.

How Meadow Hop's hero moves: a run speed, a jump speed, gravity, and two small tricks that make a jump feel fair. Then a quicker hero.

Speeds in small steps

Positions in Meadow Hop are kept in 1/256 of a tile, so movement can be smooth without fractions. RUN is the top speed, 27 steps a frame, about 102 pixels a second. A jump starts upward at JV, 90, and GRAV pulls it down by 4 each frame: a jump about 4 tiles high.

Let go of the button early and gravity pulls harder, so a tap is a short hop and a hold is a full jump.

Jumps that feel fair

For 6 frames after you run off an edge, a jump still works: coyote time. A press of jump just before landing is remembered for 6 frames and happens the moment you land: a jump buffer. Neither is visible, but without them the game would feel like it ignores you.

A quicker hero

In the session you will make the hero run faster and jump a little higher.

Meadow Hop in the editor, with the AI's reply about the quicker hero in the chat.
Make the hero quicker

Try it yourself

In the app this lesson opens a real game for you, with a guide that walks you through these steps:

  1. RUN is 27 and JV is 90.
  2. Make the hero run faster and jump a little higher.
  3. Play the first gaps: you clear them easily now. Speed and level are a pair; change one, check the other.
Start makingDownload on the App StoreGet it on Google Play