What is Fyrox?
Fyrox is a feature-rich, production-ready, general-purpose 2D/3D game engine written entirely in Rust. Unlike many Rust game frameworks that provide only low-level building blocks, Fyrox includes a full-featured visual editor called FyroxEd, making it comparable to engines like Godot or Unity in terms of workflow. It is MIT-licensed, free to use, and runs on Windows, macOS, Linux, and WebAssembly.
What sets Fyrox apart from other engines is its foundation in Rust. The engine consists of over 35 specialized crates covering graphics rendering, HRTF spatial audio, skeletal animation with blending, behavior trees for AI, an inventory system, a dialog system, autotiling, and much more. Every component benefits from Rust's memory safety guarantees and zero-cost abstractions.
Why Rust for Game Development?
Rust brings several compelling advantages to game development:
- Memory safety without garbage collection — Rust's ownership system prevents null pointer dereferences, dangling pointers, and data races at compile time. No garbage collector pauses means predictable frame times.
- Performance on par with C++ — Rust compiles to native code with zero-cost abstractions. You get high-level ergonomics without runtime overhead.
- Fearless concurrency — The type system prevents data races, making multithreaded game code safer to write and maintain.
- Modern tooling — Cargo (Rust's package manager) makes dependency management, building, and testing straightforward. No CMake configuration headaches.
- Growing ecosystem — The Rust gamedev ecosystem is expanding rapidly with crates for physics (rapier), networking (quinn), and more.
Fyrox uses a pool-based memory model instead of Entity Component System (ECS). Objects are stored in generational pools, which provide cache-friendly access and predictable performance while being more intuitive for developers coming from traditional object-oriented engines. Each node in the scene graph is referenced by a Handle<Node>, which is a generational index into the pool.
Installing Fyrox and Creating Your First Project
Prerequisites
Before installing Fyrox, make sure you have the following:
- Rust 1.87 or newer — Install from rustup.rs. Fyrox requires a recent stable Rust toolchain.
- A C/C++ linker — On Windows, install Visual Studio Build Tools. On macOS, install Xcode Command Line Tools (
xcode-select --install). On Linux, installbuild-essential. - CMake — Required for some native dependencies. Available via your system package manager or cmake.org.
Installing the Fyrox Template Tool
Fyrox provides a project template tool called fyrox-template that scaffolds new projects with the correct directory structure:
cargo install fyrox-template
This installs the fyrox-template command globally. You only need to do this once (or when you want to update it).
Creating a New Project
Generate a new project with the following command:
# Create a new Fyrox project
fyrox-template init --name my-game --style 3d
# Navigate into the project
cd my-game
The --style flag accepts 2d or 3d. This generates a workspace with three crates:
| Crate | Purpose |
|---|---|
game/ | Your game logic, scripts, and plugins |
editor/ | Custom editor build that includes your plugins |
executor/ | The final game executable (standalone, without editor) |
Running the Editor
Launch the Fyrox editor with:
cargo run --package editor --release
The first compilation will take several minutes as Cargo downloads and compiles all dependencies. Subsequent builds are incremental and much faster. Using --release for the editor is recommended for comfortable editing performance.
Understanding the Editor (FyroxEd)
FyroxEd is Fyrox's built-in visual editor. It provides a complete game development environment with panels for scene editing, asset management, and property inspection. Here are the key areas you will work with:
Scene Viewport
The central viewport displays your 3D or 2D scene. You can navigate using:
- Middle mouse button + drag — Pan the camera
- Right mouse button + drag — Rotate the camera
- Scroll wheel — Zoom in/out
- W, E, R keys — Switch between Move, Rotate, and Scale gizmos
World Outliner
The World Outliner (left panel) shows the scene tree hierarchy. Every object in your scene is a node in this tree. You can drag nodes to reparent them, right-click for context menus, and double-click to rename. The hierarchy determines transform inheritance: child nodes inherit their parent's position, rotation, and scale.
Inspector Panel
When you select a node, the Inspector (right panel) shows all its properties. This includes transform (position, rotation, scale), node-specific properties (mesh data, light color, camera FOV), and any script properties you have defined. Every property change goes through the editor's command system, so everything is undoable with Ctrl+Z.
Asset Browser
The Asset Browser (bottom panel) displays files in your project directory. You can drag assets like 3D models (.fbx, .gltf, .glb), textures (.png, .jpg), and audio files (.ogg, .wav) directly into the scene viewport or onto node properties in the Inspector.
Console and Log
The Console panel shows engine messages, warnings, and errors. When running your game from the editor, print statements and log output appear here. Keep an eye on this panel during development for early detection of issues.
Scene Structure and Nodes
In Fyrox, everything in a scene is a node. A scene is essentially a tree of nodes, where each node has a type that determines its behavior. Understanding the available node types is fundamental to building games in Fyrox.
Core Node Types
- Pivot — An empty node used for grouping and organizing. Equivalent to an empty GameObject in Unity or a Node3D in Godot.
- Mesh — Renders 3D geometry. Fyrox supports primitives (cube, sphere, cylinder, cone) and imported models (FBX, glTF).
- Light — Illuminates the scene. Available types: Point (omnidirectional), Spot (cone-shaped), and Directional (sun-like, parallel rays).
- Camera — Defines the viewpoint for rendering. At least one camera is required to see anything in-game.
- Sprite — A 2D billboard that always faces the camera. Useful for particles, UI elements in world space, and 2D games.
- Terrain — A height-map based landscape node with support for multiple texture layers, sculpting, and vegetation painting.
- ParticleSystem — Emits particles for visual effects like fire, smoke, rain, sparks, and magical effects.
- Sound — A positional audio source. Fyrox features HRTF (Head-Related Transfer Function) spatial audio for realistic 3D sound.
- RigidBody — A physics body that participates in the physics simulation (powered by Rapier).
- Collider — Defines the collision shape for a physics body (box, sphere, capsule, trimesh, heightfield).
- Joint — Connects two rigid bodies with constraints (ball, revolute, prismatic, fixed).
- Decal — Projects a texture onto surfaces. Used for bullet holes, blood splatters, cracks, and similar effects.
Scene Files
Fyrox scenes are saved as .fyrox files, which use a human-readable text-based serialization format. Unlike binary scene formats in some engines, you can inspect and diff Fyrox scene files in version control, though manual editing is not recommended.
Fyrox supports scene instancing, similar to prefabs in Unity or packed scenes in Godot. You can create a scene (e.g., a player character with all its child nodes), save it, and then instance it into other scenes. Changes to the source scene automatically propagate to all instances.
Writing Your First Script
Scripts in Fyrox are written in Rust. They are defined as structs that implement the ScriptTrait. Scripts are attached to nodes and receive lifecycle callbacks similar to _ready() and _process() in Godot or Start() and Update() in Unity.
Creating a Rotation Script
Let us create a simple script that rotates a node around the Y axis. In game/src/lib.rs, add the following:
use fyrox::{
core::{
algebra::UnitQuaternion,
pool::Handle,
reflect::prelude::*,
type_traits::prelude::*,
visitor::prelude::*,
},
event::Event,
script::{ScriptContext, ScriptTrait},
scene::node::Node,
};
#[derive(Visit, Reflect, Default, Debug, Clone, TypeUuidProvider, ComponentProvider)]
#[type_uuid(id = "a9fb15d2-5c8a-4b5e-9b6e-d78e14a3f47c")]
pub struct Rotator {
/// Rotation speed in radians per second
#[reflect(min_value = 0.0, max_value = 10.0)]
pub speed: f32,
}
impl ScriptTrait for Rotator {
fn on_init(&mut self, ctx: &mut ScriptContext) {
// Called once when the script is initialized
fyrox::core::log::Log::info("Rotator script initialized!");
}
fn on_update(&mut self, ctx: &mut ScriptContext) {
// Called every frame
let dt = ctx.dt;
let transform = ctx.scene.graph[ctx.handle]
.local_transform_mut();
// Rotate around the Y axis
let rotation = UnitQuaternion::from_axis_angle(
&fyrox::core::algebra::Vector3::y_axis(),
self.speed * dt,
);
let current = *transform.rotation();
transform.set_rotation(current * rotation);
}
}
Registering the Script
Scripts must be registered with the engine so the editor can find them. In your game/src/lib.rs, make sure your plugin's register method includes:
impl Plugin for Game {
fn register(&self, context: PluginRegistrationContext) {
context
.serialization_context
.script_constructors
.add::<Rotator>("Rotator");
}
// ... other methods
}
Attaching the Script in the Editor
After rebuilding the editor (cargo run --package editor --release), you can attach the script to any node:
- Select a node in the World Outliner (for example, a Mesh node).
- In the Inspector panel, scroll to the Scripts section.
- Click Add Script and select Rotator from the dropdown.
- Set the
speedproperty to a value like1.0(one full radian per second). - Press the Play button or
Ctrl+Pto run the game and see the node rotating.
The #[derive(Reflect)] macro exposes your struct fields to the editor Inspector, allowing visual editing. The #[derive(Visit)] macro enables serialization so the editor can save and load your script properties. Together, they provide the bridge between your Rust code and the visual editor.
Accessing Other Nodes
To reference other nodes in the scene, use Handle<Node> fields in your script. The editor will show a node picker widget:
#[derive(Visit, Reflect, Default, Debug, Clone, TypeUuidProvider, ComponentProvider)]
#[type_uuid(id = "b2c3d4e5-f6a7-8901-2345-6789abcdef01")]
pub struct Follower {
pub target: Handle<Node>,
pub follow_speed: f32,
}
impl ScriptTrait for Follower {
fn on_update(&mut self, ctx: &mut ScriptContext) {
if self.target.is_some() {
let target_pos = ctx.scene.graph[self.target]
.global_position();
let current_pos = ctx.scene.graph[ctx.handle]
.global_position();
let direction = target_pos - current_pos;
let movement = direction.normalize() * self.follow_speed * ctx.dt;
ctx.scene.graph[ctx.handle]
.local_transform_mut()
.offset(movement);
}
}
}
Building and Running Your Game
Fyrox separates the editor and the final game executable:
- Editor mode:
cargo run --package editor --release— Opens FyroxEd where you design scenes and test gameplay. - Standalone game:
cargo run --package executor --release— Runs the game without the editor, as your players would experience it.
For distribution, build the executor in release mode:
cargo build --package executor --release
The resulting binary will be in target/release/. Ship it alongside your data/ folder containing scenes, textures, and other assets.
Accelerating Development with Fyrox MCP Pro
While the Fyrox editor is powerful on its own, development speed increases dramatically when you combine it with AI assistance. Fyrox MCP Pro is the first and only MCP (Model Context Protocol) integration for Fyrox, connecting Claude Code directly to your running editor.
What Can AI Do with Fyrox MCP Pro?
With 20 specialized tools, Claude Code can control the Fyrox editor in real time:
- Scene Management — Create, open, save, and close scenes through natural language commands.
- Node Operations — Add any of the 12 node types (meshes, lights, cameras, particle systems, terrain, and more), set transforms, modify properties, and organize the scene hierarchy.
- Selection Control — Select and deselect nodes programmatically, query the current selection.
- Build and Run — Build and launch your game directly from the AI conversation to test changes instantly.
Every operation goes through the editor's Command pattern, so all AI-made changes are fully undoable with Ctrl+Z. You stay in complete control.
Example Workflow
Imagine you are prototyping a level. Instead of manually placing dozens of objects, you tell Claude:
> Create a new scene called "dungeon_room". Add a directional light
pointing downward. Then create a 5x5 grid of cube meshes spaced
2 units apart to serve as floor tiles. Add a point light with
warm orange color at the center, 3 units above the floor.
Claude uses the MCP tools to execute each step in the editor: creating the scene, adding the light, spawning 25 cube meshes at calculated positions, and placing the point light. What would take 10 minutes of clicking is done in seconds.
Setting Up Fyrox MCP Pro
Setup takes about 5 minutes:
- Add the
fyrox-mcp-bridgecrate to your editor'sCargo.tomland register theMcpBridgePlugin. - Build the MCP server:
cd fyrox-mcp-server && npm install && npm run build - Add to Claude Code:
claude mcp add fyrox -- node /path/to/fyrox-mcp-server/dist/index.js
Once configured, the bridge plugin starts a WebSocket server inside the editor, and Claude Code connects to it automatically when you start a conversation.
Ready to Build Games Faster with AI?
Fyrox MCP Pro gives Claude Code direct access to the Fyrox editor. 20 tools, full undo/redo, $5 one-time purchase.
Get Fyrox MCP Pro — $5Resources and Community
The Fyrox community is welcoming and active. Here are the essential resources for getting help and learning more:
- Fyrox Official Website — Downloads, news, and showcase of games built with Fyrox.
- The Fyrox Book — The official documentation covering every aspect of the engine in depth. Start here for detailed API explanations.
- GitHub Repository — Source code, issue tracker, and examples. The
examples/directory contains dozens of working demos. - Fyrox Discord — The most active community hub. The engine developer (mrDIMAS) is regularly available for questions.
- crates.io/crates/fyrox — The Fyrox crate with version history and download statistics.
- Fyrox MCP Pro — AI integration for Fyrox. Connect Claude Code to your editor.
- Fyrox MCP Pro Discord — Support and discussion for the MCP integration.
Recommended Learning Path
- Complete the Fyrox Book introduction chapters.
- Build a small project (a turntable viewer or simple platformer) to get comfortable with the editor and scripting workflow.
- Study the
examples/directory in the Fyrox GitHub repository for patterns and best practices. - Join the Discord community for feedback on your projects.
- Set up Fyrox MCP Pro to accelerate iteration with AI assistance.
Fyrox is a rapidly maturing engine with a unique position in the game development landscape: full Rust safety, a comprehensive visual editor, and now AI integration. Whether you are an experienced Rust developer exploring game development or a game developer interested in Rust's advantages, Fyrox is worth your attention.