Learn › N64 Beginner

Lesson 5 of 6 · About 5 min

How the robot moves

A few numbers decide how far this robot can leap.

The robot of Sky Hopper runs past a beetle on an island.

Speed, gravity and the jump, written as fixed-point numbers. Make the robot quicker.

Numbers with a point

Sky Hopper writes its speeds as fixed-point numbers, like 5.67fx: a number with a fixed number of digits after the point, stored as a whole number underneath. It is quick for the console and exact, which matters when the same jump must land in the same place every time.

RUN is the top speed in units per frame, GRAV how much the robot falls faster each frame, and JUMP_V how fast a jump starts upward.

Coyote time and a jump buffer

COYOTE gives 3 frames after running off an edge in which a jump still works, and a press of A is remembered for 4 frames before landing. Holding A keeps the jump going higher. These make a jump feel like it does what you meant.

A quicker robot

In the session you will raise the robot's speed and jump a little.

Sky Hopper in the editor, with the AI's reply about the faster robot in the chat.
Make the robot 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 and JUMP_V are near the top of the code, with GRAV and COYOTE.
  2. Make the robot run about 10 percent faster and jump a little higher.
  3. Play the first area. A small change in speed is easy to feel; a big one can make platforms hard to land on.
Start makingDownload on the App StoreGet it on Google Play