Quick start

This page makes a playable project from a template, looks round the editor and changes one thing. It takes a few minutes. To build a game from nothing and learn how the pieces fit, do the tutorial afterwards.

Open the hub

Start the editor with no arguments:

./build/Cairn-Editor/Cairn-Editor

With no project open the editor shows the project hub. It lists the projects you opened lately, and has two buttons: Open project and New project.

The project hub

To play a finished game first, open Samples on the left and press Open a copy on one.

Make a project

  1. Press New project.
  2. Type a name. The project's folder is the location plus that name.
  3. Leave Lua picked, and under Start from, pick Third person.
  4. Press Create project.

The editor makes the folder, copies the template's scripts in, builds its level and opens it.

The templates are:

TemplateWhat it is
EmptyOne scene with a camera, a sun and a sky
First game (the tutorial, finished)The game the tutorial builds
Third personA character that walks, runs and jumps, a camera that follows, and a small park
Top-down shooterA twin-stick shooter seen from above, with enemies, a score and a health bar

Play it

Press the green play button above the viewport. The viewport now shows the game through its own camera, and the game has the keyboard and mouse.

Press the red stop button to go back to editing. Stopping puts the scene back exactly as it was when you pressed play.

Change something

  1. Click a tree in the viewport. It gets a blue box, and the inspector, under the hierarchy, shows its values.
  2. Press W for the move gizmo and drag an arrow.
  3. Press Ctrl+Z to undo, and Ctrl+S to save. On macOS, use Cmd.

Change the player's speed

  1. Select Player in the hierarchy on the left.
  2. In the inspector, find Scripts. The Player.lua script lists its fields.
  3. Change WalkSpeed and press play.

The script itself is in the Assets panel under Assets/Scripts. Double-click it to open it in your code editor. Save it while the game is playing and the change takes effect at once.

Next