Build the level

Create the project

In the Project Hub, click New Project..., enter CoinCollector as the Name and click Create.

The New Project form, with CoinCollector as the name

The game will use two of the engine's optional packages: Physics 3D moves the player and notices the coins, and Audio plays the pickup sound. A new project has both turned on in Window ▸ Configuration ▸ Package Manager. Shalltear.h includes every package that is on there, so your code uses them with no other include. Code that uses a package you turn off no longer compiles.

The Package Manager, with Shalltear Audio and Shalltear Physics 3D turned on

A scene for the first level

  1. Click File ▸ New Scene. The new scene has a camera and a light.

    The File menu, with New Scene highlighted
  2. Press Ctrl+S. The scene has never been saved, so the editor asks for a path. Change Untitled to Level1 so it reads project://Assets/Scenes/Level1.scene, and click OK.

    The Save Scene As form, with the path project://Assets/Scenes/Level1.scene

The floor and the walls

  1. In the Hierarchy, click + and choose 3D Object ▸ Cube. Press F2 and rename it Floor.

  2. In the Inspector, set Position to 0, -0.5, 0 and Scale to 20, 1, 20.

    The Floor in the Inspector, with its Position and Scale highlighted
  3. Click Add Component, type BoxCollider, and select it. A collider gives an object a shape that physics can collide with, and a box collider fits a cube of any scale.

    The Add Component list narrowed to BoxCollider by typing its name
  4. Make the four walls the same way. Each is a Cube with a BoxCollider. Select a wall and press Ctrl+D to duplicate it rather than start again.

NamePositionScale
Wall North0, 1, 10.522, 2, 1
Wall South0, 1, -10.522, 2, 1
Wall East10.5, 1, 01, 2, 20
Wall West-10.5, 1, 01, 2, 20
The arena in the Scene View: the floor and its four walls, with Wall North selected

Colors

  1. In the Asset Browser, select + and choose Create ▸ Material. Press F2, rename it Ground.mat and select OK.

    The Asset Browser's + menu: Create (1), then Material (2)
  2. In the Inspector, set baseColor to a gray and select Save.

    Ground.mat in the Inspector, with its baseColor and the Save button highlighted
  3. Select the floor, and drag Ground.mat from the Asset Browser onto Material 0 in its MeshRenderer. Do the same for each wall.

    Ground.mat being dragged from the Asset Browser onto the floor's Material 0
  4. Make two more materials the same way for the next pages: Gold.mat in yellow and Player.mat in blue.

The camera

Select Main Camera and set Position to 0, 16, -14 and Rotation to 53, 0, 0. It now looks down at the arena from one end. The Runtime View shows what it sees.

The Runtime View showing the arena from the camera, beside the camera's Position and Rotation in the Inspector

Press Ctrl+S to save. Next, make a coin.