DOTS Battle Simulator Prototype
- Unity Developer / Prototype author
- DOTS / ECS · Game AI · GPU animation · Architecture · Editor tools
- Technologies
- Unity 6 · C# · DOTS / Entities · Burst / Jobs · Entities Graphics · URP / HLSL · VContainer · Addressables · UniTask · R3 · Odin Inspector
Description
A Unity 6 DOTS battle simulator prototype for controlling large numbers of units. The main task was to combine decision-making, target searches and animation in an architecture designed to scale the simulation. Developed my DODBT plugin into a separate DOTS module with Burst, Jobs and BlobAsset. Built a VAT pipeline with animation baking to textures, an ECS runtime and shaders for Entities Graphics. Built the application around a persistent Bootstrap scene, separate Meta and Gameplay modes, and explicit control of resource loading, DI contexts and ECS systems
Achievements
- Designed BT execution for DOTS with a shared structure in a BlobAsset and separate agent states, enabling Burst and parallel processing with Jobs
- In a test with 10,000 agents and a 34-node tree, cut BT processing time from 126.25 to 1.00 ms using Burst and Jobs, about 126 times faster
- Separated the shared BT structure in a BlobAsset from agent states so many units can use one tree without copying its structure
- Built code generation for leaf nodes and runtime debugging so new logic can be connected without writing glue code by hand and its execution can be tracked in the editor
- Built a VAT pipeline with baking, an ECS runtime and HLSL shaders. Animations run on the GPU with clip blending, correct shadows and depth passes
- Implemented a battlefield grid and a spatial index for target searches so units can find enemies in nearby cells without scanning the whole army
- Set up mode startup with a state machine, VContainer and resource loaders so scenes, dependencies and ECS systems load and unload in a defined order
- Created a single window for editing ScriptableObject configurations so the game designer can set up units, behavior and game systems in one place
- Separated the UI and binary saves into modules so interfaces can be reused across modes and game code is independent of how data is stored
| BT processing mode | Time |
|---|---|
| Without Burst or parallel processing | 126.25 ms |
| Burst | 7.90 ms |
| Burst + Jobs, 11 worker threads | 1.00 ms |
With BT updates at intervals of 0.2 s and a random offset per agent, the average load per frame was 0.1014 ms, P95 was 0.1290 ms, total CPU time was 1.008 ms, and GC allocations per tick were 0 B. This mode updates decisions less often. See the second gallery image for detailed measurements.








