Gaming & Simulation

SubTerra

Modern Ant Colony Simulation Built with Bevy ECS

A modern reimagining of SimAnt (1991) built with the Bevy game engine in Rust. Features emergent behavior, pheromone-based pathfinding, and colony dynamics with ECS architecture.

SubTerra hero image

// the problem

Challenge

Classic ant colony simulations are either oversimplified browser toys or academic papers. No modern game captures the depth of SimAnt with today's rendering and simulation capabilities.

// what we built

Solution

Engineered a full ECS-based simulation in Rust using Bevy, where thousands of ants exhibit emergent behavior through pheromone trails, resource gathering, and colony defense. Parallel systems leverage multi-core CPUs for real-time simulation at scale.

// shipped

Key features

  • Pheromone-based pathfinding
  • Colony resource management
  • Predator-prey dynamics
  • Terrain generation
  • Multi-colony warfare
  • WebAssembly deployment

// stack.json

Tech stack

The exact tools shipping this product in production.

  • Rust
  • Bevy ECS
  • WebAssembly
  • WGPU
  • Rapier Physics

// system.diagram()

Architecture

Data-oriented ECS architecture with parallel system execution and WGPU rendering pipeline

System scheduling Render pipeline Physics queries Behavior update Asset loading Component writes Bevy App backend ECS World service Render Pipeline frontend Physics (Rapier) service AI Systems ai Asset Loader service
  • backend
  • service
  • frontend
  • ai

// receipts

Results

  • Thousands of simultaneous entities at 60 FPS
  • Emergent colony behavior via pheromone system
  • Parallel ECS systems for maximum CPU utilization
  • WebAssembly build for browser deployment
Thousands simultaneous
Entities
60 FPS
Frame Rate
Massively parallel
Systems
Native + WASM
Build

// next()

Have a project like this?

We build production systems with the same engineering rigor you see here. Let's talk.