Learn › DS Beginner

Lesson 5 of 6 · About 5 min

Colours in 3D

Change a few colours and the same meadow turns to evening.

Meadow Hop under a peach evening sky with purple hills.

How Meadow Hop colours its 3D scene: a sky colour and a colour on every box. Then turn the meadow to evening.

Every box has a colour

Meadow Hop's 3D scene is built from boxes: the ground, the planks, the coins, the slimes, the hills far behind. Each box is drawn with one solid colour, written as eight hex digits: red, green, blue and how solid it is. A darker box just behind a shape gives it an outline.

The sky is not a box: it is the colour the screen is cleared to before each frame.

Far things

The hills and clouds stand far behind the level, so they move slowly as the camera follows the hero, the way far things do. Changing their colours changes the mood of the whole level without touching the level itself.

An evening meadow

In the session you will give the meadow a peach evening sky and dusky purple hills.

Meadow Hop in the editor under a peach evening sky, with the AI's reply in the chat.
Change the sky

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 sky is the clear colour 0x7AC8F0. The far hills are two greens.
  2. Give the meadow a peach evening sky and dusky purple hills.
  3. Watch the demo on the top screen: the whole level is in the evening now.
Start makingDownload on the App StoreGet it on Google Play