Engine guide
A guide to the NEO engine in Rust: setting up, the ECS, apps and time, assets, scenes, rendering in 2D and 3D, UI, input, audio, animation, tools and examples.
This guide explains the NEO engine for people who write Rust: how a NEO app is put together, and how to use each part of the engine, from entities and systems to rendering, UI, input, audio and animation. Read it in order the first time, or jump to the part you need.
If you only make games in the Studio and script them, you don't need this guide; start with Scripting. The engine is what your game's Rust code in crates/ is written against, and what scripts reach through the parts your Rust code exposes.
Getting started#
| Page | What it covers |
|---|---|
| Set up the engine | The Rust toolchain, system packages and faster compiles. |
| Your first app | An app with a window, a camera, a shape and a system that moves it. |
| Project layout | Where a NEO game's crates, content and settings live. |
| Cargo features | The neo crate's features, and which are on in NEO's builds. |
| Platforms | Desktop, web and mobile: what runs where. |
| Performance | Build settings and habits that keep a game fast. |
The parts of the engine#
| Part | What it covers |
|---|---|
| ECS | Entities, components, systems, queries, resources, commands, messages, observers, hooks, relationships, schedules, states and plugins. |
| App and core | The app and its runners, time and the fixed timestep, transforms, math, async tasks and windows. |
| Assets | Loading and using assets, hot reload, custom assets and loaders, processing, asset sources and glTF. |
| Scenes and reflection | Runtime type information, the type registry, serialization and scenes. |
| 3D rendering | Cameras, meshes, materials, shaders, lights, shadows, the environment, post-processing and anti-aliasing. |
| 2D | Sprites, sprite sheets, 2D shapes and meshes, text in the world and 2D cameras. |
| UI | Nodes, flexbox and grid layout, text, images, interaction, focus, widgets and scrolling. |
| Input | Keyboard, mouse, gamepads, touch and picking. |
| Audio | Playing sounds and music, and spatial audio. |
| Animation | Clips, animation graphs, glTF animation, morph targets and tweening, and NEO's character animation. |
| Debugging and tools | Logging, diagnostics, gizmos, profiling, dev tools and the remote protocol. |
| Examples | More than 400 runnable examples, by category. |
How NEO's own crates fit in#
The engine core gives you the building blocks: the ECS, rendering, assets, UI, input, audio and animation. NEO's own crates build games on top of it, and this guide links to their pages where they take over:
| Crate | What it adds | Page |
|---|---|---|
neo_plugin | Plugins described in Cargo.toml, switched on in neo.toml, game features that switch on and off while running. | Plugins and neo.toml |
neo_gameplay_kit, neo_character, neo_input_kit, neo_audio_kit | A ready-made character, input actions and touch controls, and game audio. | Gameplay kit |
neo_camera_director, neo_gameplay_camera | A camera director with blends and modifiers. | Camera |
neo_script | JavaScript and Python scripts inside the running game. | Rust code and scripts |
neo_device | The platform layer: content, saves, GPU set-up and web start-up. | Web builds |