Learn › GameCube Beginner

Lesson 2 of 6 · About 6 min

A valley from a seed

One number grew this valley, and another one grows a different valley.

A leafy Block Valley grown from a new seed.

How Block Valley grows its whole valley from one number and a few settings, and how to grow a leafier one.

A grid of cells

The valley is a grid of cells, 48 by 48 columns and 24 layers high: 55,296 cells, one byte each, each one air or a kind of block. Nobody placed them: the world maker grows the valley every round, with hills, beaches, a little water, trees and boulders, and a flat meadow around the gold pad.

The seed

SEED is the number the world maker starts its random choices from. The same seed always grows the same valley, so every player of your game walks the same land. BASE_H, HILL_AMP and BUMP_AMP shape the hills, SEA_Y sets the water, TREE_CHANCE and ROCK_CHANCE how many trees and boulders it tries to place.

A leafier valley

In the session you will change the seed and ask for more trees.

A new, leafier Block Valley in the editor, with the AI's reply in the chat.
Grow a new valley

Try it yourself

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

  1. SEED is 2024. TREE_CHANCE is 55 in 100 for each patch of grass.
  2. Grow a different valley with more trees.
  3. Look around in the demo: new hills, new shores, and trees almost everywhere.
Start makingDownload on the App StoreGet it on Google Play