GreenGap
GreenGap is my answer to a specific question: Can you teach serious environmental science concepts through a game without boring the player?
The answer is yes—if you embed the concepts in the rules.
The Game
You’re a land manager restoring a forest. You have budget, seasons, and limited actions. To succeed, you must:
- Understand plant succession (pioneer species → climax ecosystem)
- Plan long-term (this decision matters 20 seasons ahead)
- Adapt when randomness disrupts your strategy (droughts, pests)
Win by reaching a thriving ecosystem. Lose by running out of budget or time.
Mechanics = Teaching
Instead of explaining succession, the game demonstrates it:
- Pioneer species grow fast, stabilize soil, then die out (realistic)
- Late-successional species grow slow, but provide permanent value (realistic)
- Biodiversity reduces risk (diverse ecosystems handle disruption better)
The design intent is that players learn these principles not by reading them, but by experiencing them fail when ignored.
Design Decisions
Why Vanilla JS? Simplicity. No framework overhead, direct canvas access, <150KB total app size.
Why FastAPI backend? Even simple games benefit from centralized state management. Prevents cheating (can’t fake progress), enables cross-platform sync.
Why three difficulty tiers?
- Story: Generous budget, predictable randomness. Teaches mechanics.
- Hard: Realistic budget constraints. Real environmental complexity.
- Impossible: Random events can destroy your plan entirely. Teaches humility.
Tech Stack Simplicity
Backend: 500 lines of FastAPI. No complex routing, one SQLite table. Handles game state, scoring, progression.
Frontend: 800 lines of vanilla JS. No React bundle, no npm complexity. Just canvas rendering and turn logic.
Result: Game loads in 2 seconds. No framework compilation, no build pipeline drama.
This is intentional. Educational games compete for classroom time. Slow, bloated apps lose.
Why I Built This
Most game dev is either:
- Massive (AAA scope, 100+ person teams)
- Trivial (match-3 games, infinite clickers)
GreenGap sits in the middle: ambitious game design, focused scope, educational mission — a proof of concept for shipping a meaningful game with minimal technical debt.
Current Status
This is a prototype, not a deployed classroom tool. The design and core mechanics are built and playable; it hasn’t been tested with real students or teachers. If that ever happens, this page gets updated with what was actually learned from it — not before.
Lessons Learned
Mechanics are more powerful than exposition, at least as a design thesis. A single game rule can teach what 10 pages of text cannot — if the rule is actually right, which is the part that needs real classroom testing to confirm.
Simplicity in tech enables ambition in design. Vanilla JS forced me to think clearly about what the game needed versus what I wanted.