Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ecosystem Simulator

Simple grid-based ecosystem simulation with terrain, rainfall, water flow, and plants rendered in a Tkinter GUI.

Features

  • Procedural heightmap to give simple topography.
  • Weather system driven by stochastic temperature/humidity that clouds up and rains based on moisture.
  • Rainfall toggle and adjustable rain release scale.
  • Simple water flow and evaporation.
  • Multiple plant species (incl. trees that cast shade) with different water/sun needs that sprout, mature, spread, and go-to-seed when conditions fit.
  • Pause, single-step, and variable simulation speed.
  • Planting mode to place a plant on click.
  • Smoothed contour overlay for clearer terrain visualization.
  • Randomly seeded ponds/lakes at world start.
  • Enlarged default world size with a compact cell scale.
  • Live plant population bars for empty/sprout/mature counts.
  • Day/night cycle and seasonal temperature swings with adjustable amplitudes/speeds.

Requirements

  • Python 3.9+ with Tkinter available (bundled with most Python installs).

Run

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\\Scripts\\activate
pip install -r requirements.txt
python main.py

Controls

  • Start / Pause / Step once: control the simulation loop.
  • Speed (ms): leftmost = slowest, rightmost ≈ hardware-limited; resolution 0.5ms.
  • Rainfall: enable/disable precipitation; adjust how quickly clouds release rain with the slider.
  • Planting mode: when enabled, click the grid to plant a sprout of the selected species.
  • Weather panel shows current weather state, temperature, and humidity.
  • Plant type picker to choose which species to plant.
  • Day speed, Season speed: control how fast the day/night and seasonal cycles advance.
  • Day/Season amplitude: adjust how strongly those cycles affect temperature.
  • Tests: run python -m unittest discover -s tests to execute basic simulation checks.

Tweak parameters inside main.py in World.__init__ to adjust terrain, water, climate randomness, and plant behaviors.

Requirements

Only the Python standard library is needed (Tkinter included with most Python installs). requirements.txt is intentionally empty.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages