Cozy Ranch is a relaxing top-down ranch game that runs in a browser tab — built in plain JavaScript and HTML5 Canvas, with no build step and no dependencies. Farm by day, defend by night.
The loop
- ☀️ Day. Raise cows, chickens and sheep; collect the eggs, milk and wool they drop; plant and harvest crops. Solar panels charge your battery while the sun's up. Rogue cows may wander in and eat any crop you haven't fenced off.
- 🌙 Night. Wolves spawn and hunt your animals. Pen them behind fences, scare predators with lamps — but lamps only work when powered, and power comes from the battery you charged during the day. Manage your energy or lose the herd.
Why it's fun to build
It's a tiny self-contained sandbox of systems that interlock: an economy (buy/place/sell, 50% refunds), a power grid (solar → battery → lamps), pathfinding critters, a day/night cycle, and light tower-defense — all in vanilla JS on a single canvas, no framework. Nearly every number lives in one config.js, so balancing the whole game is one file.
Highlights
- Farming + tower-defense in one cozy loop
- HTML5 Canvas, zero dependencies, no build step
- Fully tunable economy and difficulty from a single config
Play
Move with WASD/arrows, click the hotbar to build, drag to lay fences, walk over goods to collect. Play it in your browser →
