Ant Farm
A pocket ant farm for your phone. Pour sugar, dye the sand, drop in a bug, and shake it all up while the ants dig their own tunnels and rebuild.
Ant Farm is a toy ant farm that fits in your pocket. You see a glass-fronted slice of sand and a colony of ants that digs its own tunnels. You can feed them, tint the sand, send in bugs, or shake the whole thing and watch them recover. It's built for phones and plays with touch or a mouse.
What you can do
- Dig: drag a finger to cut your own tunnels. About half the dirt you remove piles up on top of the ground, and the ants will dig a link to any open space they can't reach.
- Sugar: hold to pour it. The ants rush to eat it, and a fed colony grows.
- Dye: pick a color and paint the sand. The color creeps outward, and the ants carry dyed sand up to the surface.
- Bug: drop in a beetle, spider, or roach. The ants swarm it, some don't survive, and big bugs can't squeeze into narrow tunnels.
- Shake: the screen jolts, tunnels give way, and the colors mix. You can also shake your phone. The ants dig themselves out and rebuild.
How the ants dig
The ants follow simple rules based on published research on real ant nests, in species like Messor sancta and Lasius niger:
- A few ants work at each digging face, and tunnels run fairly straight with gentle curves.
- Tunnels keep a few cells of dirt between them instead of merging.
- New branches start from the side of an existing tunnel, and some end in a small chamber or storage pocket.
- A bigger colony digs a bigger nest, and busy routes slowly widen.
- Dirt from digging is hauled up and dumped in piles on the surface. A tall pile slowly presses down on the tunnels beneath it.
- Ants that get buried dig toward the nearest open tunnel and pack the dirt into a dead end.
The whole game is one hand-written JavaScript file of about 14 KB compressed, with no libraries and no image files.
More Games
See all →
Tiny Games
Pocket Farm, Crate Shift, Solitaire, and Shardbound: small browser games that each fit in a few kilobytes and play with mouse, touch, or keys.
Gambit Guard
A chess-based maze-defense game. Every legal move is both a weapon and a new path for the enemy. Plays in the browser, on Windows, Linux, macOS, and Android.
Toddler Mini Games
Touch-friendly free play for little kids: Super School Bus and Toddler Match. No accounts, timers, or ads.