How devmilim/alone-engine works
Alone Engine is a Rust 2D game engine. A game application starts the App loop; the runtime updates scenes and objects, processes input and events, advances collision and physics, and renders frames from game assets. The graph also preserves documented support for audio, tilemaps and LDtk, sprite animation, cameras, timers, and multiplayer networking. Relationships are limited to those visible in excerpts or stated in the README; some documented feature wiring was not sampled.
Main entry points: base.rs GameObject model · app.rs App loop · mod.rs Software renderer · client.rs WebSocket client
Components 22
Runtime and objects
- App loop
src/runtime/app.rs - World and scenes
src/runtime/world.rs - Object dispatcher
src/runtime/dispatcher.rs - GameObject model
src/core/base.rs
Gameplay systems
- Input mapping
src/input.rs - Events and messaging
src/event.rs - Kinematic body
src/components/body.rs - AABB collision
src/collision/mod.rs - Tilemaps and LDtk
src/components/tilemap.rs - Sprite animation
src/components/sprite_animation.rs - Follow camera
src/components/camera.rs - Timers
src/components/timer.rs
Rendering and assets
- Software renderer
src/render/mod.rs - Rasterizer
src/render/rasterizer.rs - Draw queue
src/render/render_queue.rs - Asset resources
src/resources.rs
Audio and networking
- Audio playback
src/audio.rs - WebSocket client
src/objects/network/client.rs - WebSocket server
src/objects/network/server.rs
Core foundation
- Core systems
src/core/mod.rs - LDtk import API
src/core/ldtk_api.rs
Other components
- Game application
Connections 24
- Game application → App loop: starts
- App loop → World and scenes: renders world
src/runtime/app.rs - App loop → Software renderer: renders frame
src/runtime/app.rs - App loop → Events and messaging: dispatches events
src/runtime/app.rs - App loop → Input mapping: updates input
src/runtime/app.rs - World and scenes → Object dispatcher: updates objects
- Object dispatcher → GameObject model: runs lifecycle
- GameObject model → Kinematic body: composes components
- GameObject model → AABB collision: composes components
- GameObject model → Sprite animation: composes components
- GameObject model → Tilemaps and LDtk: composes components
- GameObject model → Follow camera: composes components
- GameObject model → Timers: composes components
- Kinematic body → AABB collision: resolves movement
- Core systems → AABB collision: steps collisions
src/core/mod.rs - Core systems → Events and messaging: emits trigger events
src/core/mod.rs - Software renderer → Draw queue: consumes commands
src/render/mod.rs - Software renderer → Rasterizer: draws pixels
src/render/mod.rs - Software renderer → Asset resources: reads assets
src/render/mod.rs - Audio playback → Asset resources: loads audio assets
src/audio.rs - LDtk import API → Tilemaps and LDtk: supports import
- WebSocket client → WebSocket server: exchanges messages
- WebSocket client → WebSocket server: connects by WebSocket
src/objects/network/client.rs - WebSocket server → WebSocket client: accepts WebSocket
src/objects/network/server.rs