Learn › GameCube Beginner

Lesson 5 of 6 · About 5 min

Sky and fog

The far hills fade into the sky, and the sky is yours to paint.

Block Valley under a light blue sky, with the far trees fading into the fog.

How Block Valley's sky changes from day to dusk to night, why fog hides the edge of what is drawn, and how to paint a blue day.

Three skies

The sky has three colours: day, dusk and night. As the day runs out the game blends from one to the next, and the fog takes the same colour, so the whole valley darkens together.

The colours are written as eight hex digits: red, green, blue and alpha. This game's day sky is a soft peach, part of its dusk-tiles look.

Fog hides the edge

Only blocks within DRAW_R cells, 20, are drawn. Without fog the world would end in a hard line. The fog starts at 13 cells and is full at 20, in the sky's colour, so the far blocks melt into the sky instead.

A blue day

In the session you will make the day sky a clear light blue, and the fog will follow.

Block Valley in the editor under a light blue 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. SKY_DAY is peach. The fog uses the sky's colour.
  2. Make the day sky a clear light blue.
  3. Look at the far hills in the demo: they fade into blue now.
Start makingDownload on the App StoreGet it on Google Play