A 3D game engine written in Rust, focused on learning game engine fundamentals while building something practical.
Praxis is an educational yet capable game engine that prioritizes:
- Clarity over abstraction — Code is extensively documented to help you understand how game engines work
- Idiomatic Rust — Leverages Rust's safety and performance without fighting the language
- Battle-tested libraries — Built on vulkano, bevy_ecs, rapier3d, kira, and other proven crates
- Vulkan-based forward and deferred rendering pipelines via vulkano
- Cascaded shadow mapping with PCF soft shadows
- PBR materials with normal mapping
- HDR rendering with tone mapping (ACES, Reinhard, Uncharted 2)
- Automatic and manual exposure control
- Skybox and environment rendering with IBL support
- Environment probes for physically-based reflections
- GPU-accelerated particle system with emission, forces, and collision
- GPU-driven frustum culling and LOD selection
- Skeletal animation with keyframe interpolation
- Animation blending (cross-fade, 1D/2D blend trees, layers)
- Bone masking for partial-body animation
- GLTF animation loading
- IK, retargeting, additive blending, root motion
- Rapier3D integration with fixed timestep (60 Hz)
- Rigid bodies (dynamic, static, kinematic)
- Collision detection and events
- Raycasting and spatial queries
- Octree-based spatial partitioning
- Frustum culling for efficient rendering
- LOD (Level of Detail) system with GPU-driven selection
- Broad-phase optimization for physics and rendering
- 3D spatial audio with distance attenuation
- Doppler effect simulation
- Support for OGG, MP3, WAV, FLAC
- GLTF/GLB loading with materials and animations
- OBJ model support
- PNG/JPEG textures
- Lua 5.4 integration with ECS access
- Hot-reload support
- Configurable sandboxing
- Performance monitoring
- Client-server architecture
- Entity replication with interpolation/extrapolation
- Lag compensation
- Network profiling
- Selection and raycast picking
- Undo/redo system
- Transform gizmos
- Orbit camera controller
- CPU/GPU profiling
- Memory tracking
- Chrome trace export
- Mesh streaming
# Clone and build
git clone https://github.com/gariasf/praxis
cd praxis
cargo build
# Run examples
cargo run --example hello_triangle
cargo run --example comprehensive_scene_demo
cargo run --example animation_demo
cargo run --example editor_demo --features editor- Rust (latest stable via rustup)
- Vulkan-capable GPU and drivers
praxis/
├── crates/
│ ├── praxis_core # Engine lifecycle and initialization
│ ├── praxis_graphics # Vulkan rendering, shaders, materials
│ ├── praxis_ecs # Entity-Component-System (bevy_ecs)
│ ├── praxis_physics # Physics simulation (Rapier3D)
│ ├── praxis_scene # Scene graph, transforms, animation
│ ├── praxis_audio # Audio playback and spatial sound (kira)
│ ├── praxis_assets # Asset loading (GLTF, OBJ)
│ ├── praxis_input # Keyboard, mouse, gamepad
│ ├── praxis_gui # Debug UI (egui)
│ ├── praxis_window # Window management (winit)
│ ├── praxis_math # Math utilities (glam)
│ ├── praxis_spatial # Spatial partitioning and optimization
│ ├── praxis_editor # Editor tools and GUI
│ ├── praxis_procedural # Procedural generation (textures, terrain)
│ ├── praxis_profiling # Performance profiling and monitoring
│ ├── praxis_scripting # Lua scripting integration
│ ├── praxis_networking # Networking and multiplayer
│ ├── praxis_terrain # Terrain generation and rendering
│ └── praxis_utils # Logging, timing, error handling
├── examples/ # Runnable demos
├── assets/ # Models, textures, sounds
└── docs/ # Architecture and guides
See examples/README.md for a complete catalog with detailed descriptions.
| Example | Description |
|---|---|
hello_triangle |
START HERE - Minimal rendering example (~200 lines) |
comprehensive_scene_demo |
Complete asset pipeline with OBJ loading and textures |
complete_features_demo |
Full showcase - All engine systems working together |
| Example | Description |
|---|---|
material_demo |
PBR materials with post-processing |
material_instancing_demo |
Efficient per-object material property overrides |
environment_probe_demo |
IBL reflections with environment probes |
particles_demo |
GPU-accelerated particle system |
advanced_lighting_demo |
Advanced lighting techniques |
gpu_culling_demo |
GPU-driven frustum culling (1000+ objects) |
lod_gpu_demo |
GPU-driven LOD selection with compute shaders |
terrain_demo |
Heightmap terrain with LOD and texture splatting |
| Example | Description |
|---|---|
animation_demo |
Interactive animation with blend transitions |
skeletal_animation_demo |
Bone hierarchies and keyframe animation |
animation_blending_demo |
Cross-fading, blend trees, layers |
animation_advanced_demo |
IK, retargeting, additive blending, root motion |
gltf_animation_loader_demo |
Loading animations from GLTF files |
| Example | Description |
|---|---|
editor_demo |
Full editor with panels and tools |
editor_camera_demo |
Orbit camera controller |
selection_demo |
Entity selection and raycast picking |
console_demo |
Console panel with log filtering |
menu_bar_demo |
Menu bar with file, edit, entity, view, help menus |
| Example | Description |
|---|---|
audio_demo |
Spatial audio with doppler effect |
scripting_console_demo |
Interactive Lua REPL with ECS access |
networking_demo |
Client-server with entity replication |
spatial_optimization_demo |
Frustum culling, octree, BVH, LOD |
profiling_demo |
CPU/GPU profiling and trace export |
save_load_demo |
Game state persistence with metadata |
Run any example with:
cargo run --example <name>
# Some examples require feature flags:
cargo run --example editor_demo --features editor
cargo run --example terrain_demo --features terrain
cargo run --example scripting_console_demo --features scripting
cargo run --example networking_demo --features networking
cargo run --example complete_features_demo --features "terrain,networking,scripting"# Run tests
cargo test --workspace
# Run benchmarks
cargo bench
# Check code quality
cargo fmt --all -- --check
cargo clippy --all -- -D warnings
# Generate docs
cargo doc --workspace --no-deps --openThe codebase is heavily documented. Start with:
- Documentation Index — Complete documentation overview
- Architecture — High-level system design
- Beginner's Guide — Step-by-step introduction to all systems
- Getting Started — Installation and setup
- Guides — Task-oriented tutorials
- Learning Paths — Structured progressions from beginner to advanced
- Dependencies Reference — Complete listing of all external dependencies
- Shader files in
crates/praxis_graphics/src/shaders/— Extensive educational comments
- Learn game engine architecture and 3D graphics programming
- Create an engine using idiomatic Rust practices
- Build something practical enough for actual game development
- Use only free, open-source, battle-tested libraries
Contributions welcome. Please:
- Follow existing code style (clippy pedantic + nursery)
- Add rustdoc comments for public items
- Include tests for new functionality
- Run
cargo fmtandcargo clippybefore submitting
MIT
Built on excellent open-source libraries: