Skip to content

tekpriest/ecosim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ecosim

A high-performance ecosystem simulation engine built in C++ with real-time visualization.

⚠️ Early stage — core architecture and rendering pipeline in development.

Concept

Ecosim models a living ecosystem — plants, herbivores, carnivores, decomposers — interacting across a spatial grid with resource flows (energy, nutrients, water). Each organism follows local rules. Global patterns (population booms, collapses, niche formation) emerge bottom-up.

The goal is a self-sustaining simulation where you can tweak parameters and watch an ecosystem adapt, compete, and sometimes crash.

Component Status Description
Organism model 🚧 Scaffold Age, energy, lifecycle, trophic level
Resource system 📋 Planned Energy flow, nutrient cycles, carrying capacity
Spatial grid 📋 Planned Toroidal world with terrain/moisture variation
Behavior rules 📋 Planned Forage, hunt, flee, reproduce, decompose
Renderer ✅ Raylib setup Real-time 2D visualization
Stats engine 📋 Planned Population curves, diversity index, energy flow Sankey

Why This Matters

Simulation engines are stress tests for systems thinking. The same patterns — concurrent agents, resource allocation, state machines, emergent failure modes — appear in payment networks, ledger reconciliation, and distributed systems. Building this from scratch in C++ forces you to think about:

  • Memory layout — cache-friendly agent representation vs pointer chasing
  • Spatial indexing — quadtrees, grids, and the same data structures that power geospatial payment routing
  • Deterministic simulation — fixed timestep, reproducible runs, the same concerns as financial ledger replay

Tech Stack

  • C++17 — no garbage collector, manual memory control
  • Raylib — lightweight graphics library (no engine bloat)
  • CMake — cross-platform build

Build

git clone --recurse-submodules https://github.com/tekpriest/ecosim.git
cd ecosim
cmake -B build -S .
cmake --build build
./build/ecosim

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors