A real-time 3D agent simulation built with Rust and Bevy 0.15, focused on utility AI, deterministic systems, and observability.
Eidolon-Engine is a technical portfolio project, not a game. It demonstrates how to structure a small real-time simulation around Bevy ECS, deterministic fixed-step updates, utility-based agent decisions, and inspection tooling.
The current simulation focuses on a stable behavioral loop:
Perceive -> Forage -> Harvest cargo -> Deliver to village store -> Feed/rest -> Explore
Agents do not follow scripted behavior trees. They score possible actions from local state, needs, nearby entities, and lightweight memory, then act through ECS systems that apply movement, resource harvesting, delivery, recovery, and population rules.
The project is currently in a demo-ready simulation-core state:
| Area | Status |
|---|---|
| ECS architecture | Implemented with separated engine, simulation, AI, scenarios, and observability modules |
| Agent lifecycle | Implemented: spawning, needs, movement, death, low-population recovery |
| Utility AI | Implemented: forage, deliver, rest, explore, collect fallback, idle |
| Resource loop | Implemented: harvest food, carry cargo, deliver to village store, feed agents from stores |
| Agent memory | Implemented for remembered food and return/rest locations |
| Scenarios | Implemented via RON scenario files and hotkey presets |
| Observability | Implemented: HUD, inspector, timeline, overlays, behavior log, replay scaffolding |
| Tests | Implemented: unit and integration regression coverage for movement, perception, foraging, population, scenarios, and deterministic RNG |
Known limits:
- Pathfinding is direct steering, not navmesh/path planning.
- Non-food resources are placeholders.
- Replay and observability systems are useful, but not yet polished as a full product workflow.
- Scenario balance still needs a final tuning pass for presentation-quality demos.
| Feature | Description |
|---|---|
| ECS Architecture | Components and systems are split by domain boundaries |
| Utility AI | Agents rank actions dynamically from needs, perception, memory, and role bias |
| Stable Foraging Loop | Agents forage, harvest cargo, deliver to stores, then feed/rest |
| Determinism | Seeded simulation RNG and fixed timestep update flow |
| Scenario System | RON-backed presets for equilibrium, scarcity, island, overpopulation, and stress tests |
| Observability | Live inspector, event timeline, overlays, behavior logging, and replay-oriented data |
| Regression Tests | Focused tests lock down core behavioral loops |
git clone https://github.com/yourname/Eidolon-Engine
cd Eidolon-Engine
cargo run --releaseControls:
WASD+ mouse: orbit cameraLeft Click: inspect entityF1orI: toggle Entity InspectorF2orT: toggle Event TimelineF3orO: toggle Debug OverlaysSpace: pause/resume simulationR: restart with same seedN: new seed- Number keys: switch scenario presets
cargo fmt --all -- --check
cargo test --all-features
cargo clippy --all-targets --all-features -- -D warningsTargeted checks:
cargo test --test foraging_regression
cargo test --test movement_regression
cargo test determinism --verboseEidolon-Engine/
├── src/
│ ├── main.rs
│ ├── lib.rs
│ ├── engine/ # Window, camera, render setup, input, fixed simulation time
│ ├── simulation/ # Agents, resources, world rules, events, spatial grid
│ ├── ai/ # Utility scoring, decisions, memory, action definitions
│ ├── observability/ # HUD, inspector, timeline, behavior log, overlays, replay
│ └── scenarios/ # RON scenario loading, presets, world spawning
├── assets/
│ ├── scenarios/ # Scenario definitions
│ └── config/ # AI and simulation config
├── tests/ # Integration and regression tests
└── .agent/ # Architecture and design notes
This project is scoped to demonstrate engineering depth over feature breadth. The interesting parts are the ECS boundaries, deterministic simulation loop, observable AI decisions, and regression-tested agent behavior.
It is intended for game systems, simulation, and real-time Rust portfolio review.
- Rust 1.78+
- Bevy 0.15
- macOS, Linux, or Windows
MIT. See LICENSE.