A declarative, code-first game engine written in Julia.
OpenReality provides AAA-quality rendering with a clean functional API. Define scenes as composable entity trees, attach PBR materials and physics, and render with a single function call — on OpenGL, Vulkan, WebGPU or Metal.
Rendering
- Physically-Based Rendering (Cook-Torrance BRDF, metallic/roughness workflow)
- Deferred + forward hybrid pipeline
- Cascaded Shadow Maps (4 cascades)
- Image-Based Lighting (procedural sky, HDR environment maps)
- Screen-Space Reflections (SSR)
- Screen-Space Ambient Occlusion (SSAO)
- Temporal Anti-Aliasing (TAA)
- Post-processing: bloom, tone mapping (Reinhard, ACES, Uncharted2), FXAA
- Advanced materials: clear coat, subsurface scattering, parallax occlusion mapping, emissive
- CPU-simulated particle system with billboard rendering
- Immediate-mode UI/HUD (text, buttons, progress bars, images)
- LOD system with dithered crossfade transitions
- Heightmap terrain with chunk-based LOD and splatmap layers
Engine
- Entity Component System with O(1) component operations
- Immutable, functional scene graph
- Four rendering backends: OpenGL, Metal (macOS), Vulkan (Linux/Windows), WebGPU (experimental)
- Full-featured impulse-based physics engine (PGS solver with warm-starting)
- 6 collider shapes: AABB, Sphere, Capsule, OBB, ConvexHull, Compound
- Joint constraints: ball-socket, distance, hinge, fixed, slider
- Spatial hash broadphase, GJK+EPA narrowphase, raycasting, CCD
- Trigger volumes, island-based sleeping, friction and restitution
- Keyframe animation with step, linear, and cubic spline interpolation
- Skeletal animation with vertex skinning (glTF 2.0 skin loading)
- 3D positional audio (OpenAL) with spatial attenuation and Doppler effect
- glTF 2.0 and OBJ model loading
- Built-in FPS player controller
- Scene export to binary ORSB format for web deployment
- Game State Machine (FSM) with guarded transitions and history
- GameContext for deferred entity spawning/despawning
- ScriptComponent lifecycle (on_start, on_update, on_destroy)
- Collision callbacks (enter, stay, exit)
- Prefab system for reusable entity templates
- Enhanced EventBus: priority listeners, one-shot, deferred events, cancellation
- Game Config with TOML loading, difficulty presets, hot-reload
- Timers: one-shot, interval, entity-scoped auto-cancel
- Cooperative coroutines with yield_wait, yield_frames, yield_until
- Tweens & easing: 18 easing curves, chaining, ping-pong, loop modes
- Behavior trees: selector, sequence, parallel, decorator nodes with blackboard
- Health & damage: armor, typed resistances, knockback, auto-despawn
- Inventory & items: slot-based inventory, item registry, world pickups
- Quest & objectives: kill/collect/reach/interact/custom objectives, auto-tracking
- Dialogue system: branching trees, per-choice conditions, quest integration
- Debug console: in-game terminal, custom commands, on-screen watches
- Camera controllers: third-person, orbit, cinematic
- Input mapping with gamepad support
- Animation blend trees (1D and 2D blending)
- Depth of field, motion blur, vignette, color grading
- Opt-in multithreading with snapshot-based parallelism
- Instanced rendering for batched draw calls
- AssetManager with async loading
- Save/load game serialization
- Debug drawing (lines, boxes, spheres)
ameligrana - first ever contributer to OpenReality 🎉
One-liner (recommended):
# Linux / macOS
curl -fsSL https://open-reality.com/install.sh | sh
# Windows PowerShell
irm https://open-reality.com/install.ps1 | iexOr build from source:
Prerequisites: Julia 1.9+ (julialang.org), GLFW (sudo apt install libglfw3 libglfw3-dev on Ubuntu / brew install glfw on macOS), optionally Vulkan SDK (lunarg.com).
git clone https://github.com/sinisterMage/Open-Reality.git
cd OpenReality
julia --project=. -e 'using Pkg; Pkg.instantiate()'using OpenReality
reset_entity_counter!()
reset_component_stores!()
s = scene([
create_player(position=Vec3d(0, 1.7, 5)),
entity([
DirectionalLightComponent(direction=Vec3f(0.3, -1.0, -0.5), intensity=2.0f0)
]),
entity([
cube_mesh(),
MaterialComponent(color=RGB{Float32}(0.9, 0.1, 0.1), metallic=0.9f0, roughness=0.1f0),
transform(position=Vec3d(0, 0.5, 0)),
ColliderComponent(shape=AABBShape(Vec3f(0.5, 0.5, 0.5))),
RigidBodyComponent(body_type=BODY_STATIC)
]),
entity([
plane_mesh(width=20.0f0, depth=20.0f0),
MaterialComponent(color=RGB{Float32}(0.5, 0.5, 0.5), roughness=0.9f0),
transform()
])
])
render(s)| Key | Action |
|---|---|
| W / A / S / D | Move |
| Mouse | Look around |
| Shift | Sprint |
| Space | Up |
| Ctrl | Down |
| Escape | Release cursor |
| Guide | Description |
|---|---|
| Getting Started | Installation, tutorials, and your first scene |
| API Reference | Complete reference for all components, functions, and types |
| Architecture | Engine internals and design decisions |
| Examples | Annotated code samples for common patterns |
using Pkg
Pkg.activate(".")
Pkg.test()MIT License. See LICENSE for details.