The game is built entirely in vanilla HTML, CSS, and JavaScript using a canvas renderer — no frameworks, no game engines. I structured the codebase around a set of ES6 classes: Game, Player, Plot, Plant, Crow, Water, and Overlay, each responsible for its own state and behavior. A central game loop driven by requestAnimationFrame handles all updates and rendering with delta time for frame-rate-independent movement.
The crow system was the most complex piece of engineering. Crows spawn on a difficulty-scaled timer, fly toward a random plot, land, and begin eating a fully grown plant if the player doesn't intervene. The spawn system needed to pause and resume correctly when the game was paused — which required tracking remaining delay time and resuming mid-interval rather than resetting. Plant decay works similarly, using setTimeout chains that suspend during pause and resume with corrected delays.
Sound design was handled with the Web Audio API — each interaction has its own sound effect (watering, crow caw, plant eaten, score tick, game end), with audio cloning to allow overlapping sounds and cleanup on game end to prevent audio leaks.