Skip to content

Development source guide ยท workspace 0.1.0

Create your first project

The first goal is deliberately small: create a separate game project, build it and open its window. The generated project is a starting point, not a finished sample game. Its initial window has no game scene until you add one.

These instructions use a Linux shell and keep the engine checkout and game as sibling folders. Start in an empty working folder of your choice. The names engine-source and first-game below are example names, not special locations required by the engine.

What you need

  • A Rust toolchain with Cargo that supports the project's 2024 edition.
  • Git if you are obtaining the source with the clone command below.
  • A complete engine source checkout. The CLI builds games against libraries in that checkout; the downloaded CLI alone is not a compiler or a complete SDK.
  • The native development libraries required by your system and the enabled dependencies, including audio/device support on Linux.
  • A working graphical session and compatible graphics driver to run the game window.
  • Enough disk space for downloaded dependencies and build output. No fixed disk or memory requirement is established by this guide.

In development. Native binaries can depend on the system libraries of the machine that built them. A download failing with a missing system-library version is not repaired by creating a different game project. Use the troubleshooting guidance rather than replacing system libraries blindly.

Obtain a matching engine and CLI

Use your existing complete engine checkout if you already have one. Otherwise, from the working folder:

git clone --recursive https://github.com/Dev-Maker-Studio/AI-Game-Engine.git engine-source

The recursive clone also obtains registered game submodules. Review code and build prerequisites before compiling software you have downloaded. The wiki-writing process did not execute this command or build the engine.

Build the CLI from that checkout:

cargo build --release -p cli --manifest-path ./engine-source/code/Cargo.toml

Add its output folder to the current shell's command search path:

export PATH="$PWD/engine-source/code/target/release:$PATH"

Check which version it reports:

AIGameEngine --version

Expected result. A matching current workspace reports AIGameEngine 0.1.0. This is a version check, not a test of rendering, audio or every target. If you use an existing downloaded CLI, compare its capabilities with this guide and retain a matching source checkout.

The PATH change lasts only for that shell. You can instead invoke the executable by its full path. The product page lists published downloads; downloading the executable does not remove the source and toolchain requirements for game creation.

Create a clean game folder

From the same working folder:

AIGameEngine new ./first-game --name "First Game" --engine ./engine-source

Pass --engine explicitly here. Without it, the CLI tries AIGAME_ENGINE, then the engine location recorded when the CLI itself was built. A downloaded executable can therefore point at a location that does not exist on your machine.

Expected result. The CLI reports that it created the project and identifies the engine location. The new project contains:

Item What you use it for
game.toml Game name and identifier
Cargo.toml Dependencies, build settings and the asset-embedding feature
src/main.rs The starting Game implementation
SPEC.md A planning template, not implemented gameplay
assets/ and audio/ Files that can be included in packed builds
icon.png A placeholder icon; replace it before distributing a polished game
.cargo/config.toml The development asset-root setting

The name becomes first_game for the package and executable: letters are lowercased and non-alphanumeric characters become underscores. The folder remains first-game.

Warning. Use an empty destination. The creator refuses an existing game.toml, but that is not a general promise to preserve every file in a partially occupied folder. Do not point new at a valuable existing project to see what happens.

The generated dependencies reference the selected engine location. Moving or deleting that checkout can break the game build; moving the project alone does not make its source dependencies portable.

Build and open the first window

Build the project:

AIGameEngine build --project ./first-game

Expected result. In this Linux tutorial, a successful host build reports an output path such as first-game/dist/first_game. This development build still uses assets from disk; it is not the self-contained release artifact.

Run the game:

AIGameEngine run --project ./first-game

The command invokes the project's development run from the project directory. Its initial Game has empty initialization and update methods, so a window without a visible scene is expected. Use the desktop window-close control to end this initial run; the scaffold does not implement a full game menu or tutorial controls.

In development. A successful compile does not prove that the local graphics driver can create a window or that audio is available. If the process exits before a window appears, retain the first useful error and follow troubleshooting.

Check the first milestone

Before continuing, confirm that:

  1. The engine location is the checkout you intended.
  2. first-game is a separate project, not an edit to the engine itself.
  3. The build reported a successful host output.
  4. The development run opened and closed a window.

You have now established the project and runtime path. Next, make a visible scene and bind a control. Do not mistake the blank scaffold or a passing specification check for a game that already contains movement, inventory, combat or saving.