Simple grid-based ecosystem simulation with terrain, rainfall, water flow, and plants rendered in a Tkinter GUI.
- 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.
- Python 3.9+ with Tkinter available (bundled with most Python installs).
python -m venv .venv
source .venv/bin/activate # Windows: .venv\\Scripts\\activate
pip install -r requirements.txt
python main.py- 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 teststo execute basic simulation checks.
Tweak parameters inside main.py in World.__init__ to adjust terrain, water, climate randomness, and plant behaviors.
Only the Python standard library is needed (Tkinter included with most Python installs). requirements.txt is intentionally empty.