Browser GameStatus: Complete

Mini Farm Tycoon

Mini Farm Tycoon started as an argument: can a real game live in one file? Not a tech demo, but a game with an economy, upgrades, weather, sound, saving, a tutorial, and tests. You have seven days to plant, harvest, and sell, and rent comes due at every sundown.

My role
Solo project
Topics
JavaScript · HTML · CSS · Game design

The Idea

The whole project is one HTML file you can double-click to play. The goal was to push a single file as far as it would go and see what holds up and what breaks.

What I Built

Seven 90-second days. Each morning shows the weather, the rent due at sundown, and tomorrow's forecast. You plant wheat, corn, and pumpkins, harvest into a barn, and sell when the market price looks good, because only cash pays the rent. A shop unlocks crops, more land, a sprinkler, and a farmhand. Weather changes daily: rain speeds growth, heatwaves slow it, storms strike a plot with lightning, and market days raise every price.

How It Works

Everything lives in one document: about 280 lines of CSS, 130 of markup, and 880 of JavaScript, with zero external requests. A single timer advances a game clock that only moves while a day is running, so crops, storms, the farmhand, and prices all pause together. Prices follow a mean-reverting random walk with streaks. The game even ships its own tests: add ?test=1 to the URL to run 26 assertions covering planting, weather, pricing, selling, and the shop.

What I Learned

It can be done, but it probably shouldn't be the default. Everything shares one scope, every change touches the same file, and most tooling assumes multiple files. A single file is a useful constraint rather than a best practice: it shows how much you normally lean on your tools.

Current State

Complete and playable in the browser.