Modular agent simulation middleware for game engines. Supports hybrid GOAP + FSM planning with LOD scaling, designed for high-performance, large-scale agent simulations.
- Hybrid GOAP + FSM agent AI system
- Level-of-Detail (LOD) simulation for thousands of agents
- Engine-agnostic core; adapters handle engine specifics
- Unity adapter included with sample scene
- Debugging tools: agent inspector, LOD visualization, performance metrics
The C++ core currently employs a direct std::thread per chunk approach for parallelizing agent updates, effectively distributing the simulation workload across available CPU cores. This will evolve into a more sophisticated Custom Job System in future iterations to further optimize performance and flexibility. For an in-depth understanding of our multithreading strategy and future plans, please refer to docs/multithreading-strategy.md.
To get started with AgentSimMiddleware, you'll need to build the C++ core and integrate it with your chosen game engine.
The C++ core uses CMake for its build system.
- Navigate to the project root.
- Create a build directory (e.g.,
build):mkdir build - Navigate into the build directory:
cd build - Generate build files (e.g., for Visual Studio on Windows):
cmake ..- For other generators, consult CMake documentation (
cmake --help).
- For other generators, consult CMake documentation (
- Build the project:
cmake --build .
This will generate AgentSimMiddleware shared library (e.g., .dll on Windows) and the AgentSimMiddlewareTests executable.
For detailed instructions on integrating with Unity, refer to the Unity Integration Guide.
The project is actively working towards establishing robust CI/CD pipelines.
The *-nextSteps.md files in the .review directory (e.g., build-nextSteps.md, coverage-nextSteps.md, test-nextSteps.md, benchmark-nextSteps.md) outline the detailed plans and tasks for setting up automated builds, comprehensive testing, code coverage analysis, and performance benchmarking.
The build_and_stage.py script serves as a foundational component for automating build and staging processes.
| Build System | Status | Coverage |
|---|---|---|
| CMake | In Progress | In Progress |
| C# | In Progress | In Progress |
To get real-time status and coverage badges:
- Implement the tasks outlined in the relevant
*-nextSteps.mdfiles to configure your CI/CD pipeline (e.g., GitHub Actions, Azure DevOps, GitLab CI) to generate build status and code coverage reports. - Obtain the Markdown URLs for the generated badges from your CI/CD provider.
- Replace the "In Progress" status in the table above with your actual badge Markdown.
Comprehensive documentation can be found in the docs/ directory, covering architecture, design decisions, engine integration, and more.
We are actively working on enhancing documentation completeness and quality, including integrating automated tools for documentation coverage analysis for both C++ and C# components, as detailed in docs-nextSteps.md.
- Expand engine adapters (Unreal, Godot)
- Hierarchical GOAP & behavior trees
- LOD Tier 3 / cluster simulation
- Optional deterministic multiplayer mode
- GPU-accelerated perception and crowd simulation
We welcome contributions! Please see our CONTRIBUTING.md for guidelines on how to contribute.
MIT License (see LICENSE file)