Resonance Engine

Modern, cross-platform game engine written in Rust.
Native AI integration, ECS architecture, and performance without compromise.

Built for the AI-Native Era

The Resonance Engine is the runtime foundation that executes NAL game logic. Designed from the ground up for AI-agent-driven development.

14
Modular Crates
๐Ÿฆ€
Rust 2021
5+
Platform Targets
MIT
Open Source

Core Features

ECS

ECS Architecture

Archetype-based storage for cache efficiency, automatic system parallelization, type-safe component access, and query system with flexible filtering.

wgpu

Modern Rendering

wgpu-powered pipeline with 2D sprite batching, 3D mesh rendering, shape primitives, multiple camera types, and cross-platform support.

Input

Input Handling

winit integration for keyboard, mouse, and gamepad input with event-driven architecture and cross-platform compatibility.

Audio

Audio System

rodio-based audio with spatial sound, music playback, sound effects, and procedural audio generation capabilities.

Physics

Physics & Collision

AABB collision detection with trigger vs solid collision distinction, physics simulation integration, and event-driven responses.

MCP

AI Integration

MCP server for agent control, headless runtime for testing, multi-session management, and 8 specialized tools for AI interaction.

NAL

NAL Parser

JSON/JSONL loader for agent-generated game definitions, graph-based scene representation, and runtime validation.

NEAT

ML Agent Support

NEAT neuroevolution in pure Rust, observation/action spaces, curriculum learning, and model persistence.

Modular Architecture

14 specialized crates working together seamlessly

Crate Purpose Key Technologies
resonance-core Foundational types, traits, math utilities glam (SIMD math)
resonance-ecs Entity-Component-System implementation Custom archetype storage
resonance-render 3D/2D rendering pipeline wgpu, shapes, cameras
resonance-window Window management winit 0.29
resonance-input Keyboard & input handling winit event processing
resonance-audio Audio playback system rodio, procedural audio
resonance-anl NAL parser and graph loader JSON/JSONL parsing
resonance-runtime Main runtime orchestration Plugin system, app framework
resonance-mcp MCP server for AI integration JSON-RPC protocol
resonance-agent ML agent interface NEAT neuroevolution
resonance-native Native game runner miniquad, rodio
resonance-player Headed game player with ML Window + Rezzy integration
resonance-test-utils Common test utilities Testing infrastructure

Cross-Platform by Design

Write once, deploy everywhere

Windows

DirectX 12, Vulkan support via wgpu. Native performance with full feature set.

macOS

Metal backend for optimal Apple Silicon and Intel Mac performance.

Linux

Vulkan support for cutting-edge graphics on all major distributions.

WebAssembly

Compile to WASM for browser deployment with WebGPU support.

AI-First Integration

Built-in Model Context Protocol server for AI agent interaction

game_launch

Initialize a new game session from NAL definition with configurable parameters.

game_start

Start the game loop and begin simulation with specified configuration.

game_screenshot

Capture game state as image for AI vision models to analyze gameplay.

game_state

Query current game state as structured JSON for AI comprehension.

game_input

Send input events (keyboard, mouse) programmatically from AI agents.

game_step

Advance simulation by one frame for precise frame-by-frame control.

game_query

Execute ECS queries to inspect entities and components at runtime.

game_close

Clean shutdown of game session and resource cleanup.

Performance & Optimization

Archetype ECS

Cache-friendly memory layout. Components of the same archetype stored contiguously for optimal CPU cache utilization.

SIMD Math

glam provides SIMD-accelerated vector and matrix operations for maximum throughput.

Automatic Parallelization

Systems without data dependencies run concurrently across CPU cores automatically.

Zero-Copy Rendering

Direct GPU buffer uploads and batched draw calls minimize CPU-GPU transfer overhead.

Fixed Timestep

Deterministic physics simulation with interpolation for smooth rendering.

Hot Reload

Planned support for live code updates without restarting the game session.

Getting Started

# Clone the repository
git clone https://github.com/stevengritz/agent-native-language.git
cd agent-native-language/engine

# Build all crates
cargo build --release

# Run a demo game
cargo run --release --bin platformer

# Run tests
cargo test --workspace

# Build for WASM (browser)
cargo build --target wasm32-unknown-unknown --release

๐Ÿ“š Documentation

Each crate includes comprehensive README files with API documentation and examples.

View Docs โ†’

๐ŸŽฎ Examples

Multiple working examples demonstrate engine capabilities from simple to complex.

Browse Examples โ†’

๐Ÿงช Demos

Full-featured demo games showcasing platformer, shooter, and simulation mechanics.

Play Demos โ†’

Engine Development Roadmap

16-month plan aligned with Harmonic IDE development

๐Ÿšง Phase 1: Foundation (Months 1-4)

Goal: Stable engine for AI agent research + open source launch

  • โœ“ Critical bug fixes (lit rendering, macOS EventLoop)
  • โœ“ Entity lifecycle (spawn/despawn at runtime)
  • โณ 90% test coverage across all crates
  • โณ Scene management with transitions
  • โณ Physics integration (Rapier2D/3D)
  • โณ AI agent framework & RL training

๐Ÿ“‹ Phase 2: ANL Revolution (Months 5-8)

Goal: NAL compiler + bytecode VM

  • โ—‹ NAL v2 compiler (lexer, parser, AST)
  • โ—‹ Intermediate representation & optimization
  • โ—‹ Stack-based VM for hot reload
  • โ—‹ Component access primitives
  • โ—‹ Hot reload in <1 second

๐Ÿ“‹ Phase 3: AI-Native (Months 9-12)

Goal: First-class AI development support

  • โ—‹ Static analyzer for game design
  • โ—‹ Visual debugger & profiler
  • โ—‹ Behavior tree system
  • โ—‹ NAL standard library (20+ modules)
  • โ—‹ Plugin API for community extensions

๐Ÿ“‹ Phase 4: Escape Velocity (Months 13-16)

Goal: Production-ready, cross-platform

  • โ—‹ Performance optimization (SIMD, JIT via LLVM)
  • โ—‹ Mobile support (iOS Metal, Android Vulkan)
  • โ—‹ WebAssembly with WebGPU
  • โ—‹ Benchmark suite (โ‰ฅ Bevy performance)
  • โ—‹ Resonance 1.0.0 release

Current Status

Phase 1 in progress - targeting Month 4 open source launch

โœ“
3 Critical Bugs Fixed
โœ“
Entity Lifecycle Complete
โณ
Testing & CI/CD
โณ
Physics Integration

Learn More

Explore the technology powering Ludo Resonance.

Contact Us Learn About NAL Meet Rezzy