💾 Archived View for space.r8.rs › docs › manual › new-project.gmi captured on 2022-03-01 at 15:35:02. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

New Project

Create

Open a terminal window and create a folder. In this example we will call our project “My Game”.

$ mkdir my-game
$ cd ./my-game

Now we have an empty folder and are ready to initialize it to make it the root of our “My Game” project.

$ r8 init
Project name? [empty-project] My Game
Engine version? [alsafi]
Initialized a new project 'My Game' in /home/klarre/my-game
  (use "r8 platform --add <platform>")

Give it a project name and just hit return to use the alsafi engine version.

Add Target Platform

Before we can build we first have to specify what platform to target. In this example we will build for a UNIX-like platform thus using the unix platform target.

$ r8 platform --get unix
New key: platforms: ['unix@0.1.0']
Added platform support for 'unix@0.1.0'
  (use "r8 prepare --platform unix" to generate project files)

This commands fetches the platform code and adds a key to the config.yml which specifies what platform and version you are using.

Generate Project Files

The prepare command generates a CMakeLists.txt file.

$ r8 prepare --platform unix

Build The Project

Issue the following command to build the project. The output files will be located in the build/unix folder in the root directory.

$ r8 build --platform unix