Fanalor

Guide

Getting started

The guide lives in the repository, in docs/guide. Its shell blocks are run by CI, so a command that stops working fails the build. Read it in order the first time. This page is the short path in.

Install

Fanalor is a Rust workspace on stable. You need Rust 1.97 or newer, from rustup. On Debian or Ubuntu the audio and gamepad layers also need system packages:

sudo apt-get install -y libasound2-dev libudev-dev pkg-config

macOS and Windows need nothing beyond Rust. The renderer uses Vulkan, Metal, DirectX 12, or OpenGL, whichever the machine has.

Open the editor

git clone https://github.com/Fanalor-Labs/Fanalor-Engine
cd Fanalor-Engine
cargo run -p fanalor-editor

The first build compiles the engine and takes a while. After that, a change rebuilds in seconds. The editor opens on a small scene: hierarchy on the left, the scene in the middle, the inspector on the right.

A game of your own

cargo xtask new-game my-game
cargo run -p fanalor-editor -- --game games/my-game/build.ron

Play runs the game. Saving a change under its src/ rebuilds it and swaps the new code in. cargo xtask dist --manifest games/my-game/build.ron packages it, and the same command with --web writes the browser build. Web builds need the wasm32-unknown-unknown target and a wasm-bindgen CLI that matches the crate in Cargo.lock. Chapter 7 has the exact commands.

Chapters

  1. Install — toolchain, system packages, the editor.
  2. A first scene — sprites, the inspector, prefabs and variants, tilemaps, cameras.
  3. A first game — a game crate, components, turns, hot reload.
  4. Physics — bodies, characters that push, joints that spring and break.
  5. UI — HUD, options, text, touch.
  6. Audio — sources, buses, streamed music.
  7. Export — a native build and a web build.
  8. Networking — replication, a lobby, LAN discovery.
  9. Effects and animation — particles, blend trees, bones.
  10. Big worlds — regions streamed around the player.

Four sample games sit beside the engine: platformer, breakout, dodge, and the networked arena.