Single-World Integrated Demo

Phase 1 milestone demo tying together GPU rendering, physics, multiplayer, visual scripting, and asset hot-reloading.

The single-world demo is the Phase 1 integration milestone for Aether. It ties together five major subsystems -- GPU rendering, physics simulation, multiplayer networking, visual scripting, and asset hot-reloading -- into a single interactive scene running through the ECS.

What It Demonstrates

  • GPU rendering via aether-renderer's wgpu backend with PBR materials, shadow mapping, and per-object model uniforms.
  • Physics simulation using aether-physics with Rapier3D rigid bodies. A static floor and dynamic cubes respond to gravity and collisions.
  • Multiplayer networking (optional, controlled by AETHER_OFFLINE_MODE) for synchronizing state across clients.
  • Visual scripting runtime for executing node-graph scripts at runtime.
  • Asset hot-reloading via aether-asset-pipeline's file watcher, which detects changes to assets on disk and logs reload events.
  • ECS-driven architecture where every object is an entity with Transform, Renderable, and physics components, and all per-frame work flows through system updates.

How to Run

cargo run -p single-world-demo

Configure with environment variables:

AETHER_WINDOW_WIDTH=1920 AETHER_WINDOW_HEIGHT=1080 cargo run -p single-world-demo
AETHER_OFFLINE_MODE=true cargo run -p single-world-demo   # skip networking
AETHER_HOT_RELOAD_DIR=./assets cargo run -p single-world-demo

Controls

KeyAction
W / A / S / DMove camera forward / left / backward / right
Arrow keysRotate camera (yaw and pitch)
SpaceMove camera up
ShiftMove camera down
ESCQuit

Camera movement is relative to the current facing direction, with pitch clamped to prevent gimbal lock.

Architecture Overview

The demo uses a flat ECS layout where each SceneEntity holds an Entity ID, a Transform, and a Renderable. The main loop follows this order each frame:

  1. Input -- keyboard state is polled and applied to camera position and rotation.
  2. Physics -- PhysicsWorld::step() advances the simulation, then sync_to_ecs() writes updated positions and rotations back to entity transforms.
  3. Hot-reload -- the file watcher is polled for change events. When an asset file changes, the path is logged (a full re-import pipeline would slot in here).
  4. Render -- camera and model uniforms are uploaded to the GPU, draw commands are built from the renderable list, and renderer.render() executes shadow and forward passes.

Subsystems Showcased

CrateRole in this demo
aether-ecsEntity allocation, component storage
aether-rendererGpuRenderer, PBR materials, shadow pass, model uniforms
aether-physicsPhysicsWorld, rigid bodies, colliders, collision layers
aether-asset-pipelineHotReloadWatcher for detecting asset changes on disk
aether-scriptingVisual script runtime (system module)
aether-networkMultiplayer state sync (system module, optional)

Scene Contents

The scene spawns:

  • Floor -- a 40x40 unit static plane with a box collider.
  • 3 dynamic cubes -- spaced along the X axis, each with a 1-unit box collider and dynamic rigid body subject to gravity.
  • 1 static sphere -- a decorative object floating above the scene.

Physics properties include friction (0.5), restitution (0.3), and density (1.0) on the cubes, providing visible bounce when they settle onto the floor.

Source Location

All source files live under examples/single-world-demo/src/:

  • main.rs -- entry point, winit event loop, physics-render integration
  • engine.rs -- scene mesh/material setup, EngineConfig from env vars
  • components.rs -- Transform, CameraState, InputState, Renderable
  • systems/ -- modular system files for render, physics, input, networking, scripting, and hot-reload