Learn › N64 Beginner

Lesson 2 of 6 · About 5 min

Characters made of boxes

This robot is a table of boxes, and one colour repaints it.

The robot of Sky Hopper in red, above a beetle.

How Sky Hopper builds its robot from a table of boxes, and how one colour changes every box that uses it.

A table of boxes

Sky Hopper's characters are not drawn in a 3D modelling tool. Each one is a table of boxes. A row has 9 numbers: where the box sits (dx, dy, dz), its half sizes (hx, hy, hz), its colour, how it moves (legs, arms, a spin) and which way it is turned.

The robot, ART_HERO, is 17 rows: feet, legs, a body, a face plate, eyes, arms and a spinning propeller. A table's size must match its #define, HERO_N, so a new box means a new row and a bigger number.

Named colours

The boxes do not hold colours themselves. They name one, like C_TEAL, from the list CL. Change the colour in CL and every box that names it changes at once.

You can also put a model you made in Shiny Gen's 3D editor in a character's place. The game keeps the boxes for any slot without a model.

A red robot

In the session you will make the robot red by changing two colours in CL.

Sky Hopper's robot, now red, on a floating island, with the AI's reply in the chat.
Recolour the robot

Try it yourself

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

  1. The robot's body boxes name the colours C_TEAL and C_TEAL_D.
  2. Make the robot red.
  3. Every box that names C_TEAL turned red. Naming colours instead of writing them in every box is what makes this a one-line change.
Start makingDownload on the App StoreGet it on Google Play