MiRiS Tech

Engine internals, architecture, and the technology behind MiRiS games.

Engine Core Renderer Audio Physics Input Network

Architecture

The MiRiS engine is designed around a modular, component-based architecture. Each subsystem operates independently through well-defined interfaces, enabling hot-swapping and parallel development.

Engine Core

The central orchestrator managing the game loop, resource allocation, and inter-system communication. Built on an entity-component-system pattern for maximum flexibility.

Game Loop ECS World Resources Events

Render Pipeline

A multi-pass rendering system supporting deferred shading, particle effects, and post-processing. Optimized for 2D with optional 3D compositing layers.

rust
pub struct RenderPipeline {
    passes: Vec<RenderPass>,
    target: FrameBuffer,
    config: PipelineConfig,
}

impl RenderPipeline {
    pub fn execute(&mut self, scene: &Scene) {
        for pass in &self.passes {
            pass.render(scene, &mut self.target);
        }
    }
}

Audio System

Spatial audio engine with real-time mixing, dynamic attenuation, and environmental effects. Supports both positional 3D audio and layered ambient soundscapes.

Tech Stack

Our technology choices prioritize performance, expressiveness, and developer experience.

Languages

Rust Engine core, performance-critical systems
Lua Gameplay scripting, modding API
GLSL Shader programs, visual effects
WASM Web deployment target

Frameworks

wgpu Cross-platform GPU abstraction
winit Windowing and input handling
cpal Cross-platform audio

Performance

Real-time metrics from our latest build benchmarks.

88% Frame Budget
72% Memory Usage
94% GPU Load
60fps Target FPS

APIs

Experimental interfaces for extending the MiRiS engine.

Scripting API

Expose engine functionality to Lua scripts with automatic binding generation and type safety.

lua
local entity = world:spawn()
entity:add(Transform { x = 100, y = 200 })
entity:add(Sprite { texture = "player.png" })

world:on("update", function(dt)
    local pos = entity:get(Transform)
    pos.x = pos.x + 100 * dt
end)

Plugin System

Load custom systems at runtime through a dynamic plugin architecture. Plugins can register components, systems, and resources.

rust
pub trait Plugin {
    fn build(&self, app: &mut App);
    fn name(&self) -> &str;
}

app.add_plugin(AudioPlugin::default());
app.add_plugin(PhysicsPlugin::new(config));