Barnyard Bunch, an HTML5 farm animal sort puzzle
A single-player farm animal sort puzzle for the web with 100 levels in 10 worlds. Farm animals sit on golden hay bales: lift the farm animal on the right end of a hay bale, move it next to a matching farm animal and group 4 of a kind to fill a balloon’s bucket. Each balloon shows the farm animal it wants, and new balloons arrive as others leave. Plain HTML, CSS and JavaScript ES modules, with no framework and no runtime dependencies.
Every level can be solved, and the levels are plain data files made by a level generator with a solver. Fewer moves earn more stars (3 stars up to 1.3 times the par moves, 2 stars up to 1.8 times, otherwise 1).

A new twist in every world
World 1 teaches the basics, and each world from 2 to 9 adds one new twist. World 10 mixes them all.
- World 2: mystery animals show as a "?" until they reach the right end of a hay bale
- World 3: a tiny hay bale that holds 1 farm animal
- World 4: dusty hay bales that ask for a farm animal ×N and clear after N groups of that farm animal are sent
- World 5: ice that melts when a matching farm animal lands next to it
- World 6: a rainbow chick that matches any farm animal
- World 7: hay bales of 2, 3 and 5 seats next to the usual 4
- World 8: farm animals tied with a rope that move together
- World 9: a "?" balloon that shows its farm animal later
- World 10: everything together

17 farm animals with faces and poses
There are 16 farm animals plus the rainbow chick. Every farm animal has 9 faces (idle, blink, happy, wow, sleepy, worried, dizzy, sad and yawn), a peek head and 8 poses (crouch, dangle, leap, fall, curl, stretch, wave and cheer). The farm animal lifts, hops in an arc and lands softly, with combos, praise words, a "Perfect!" stamp and balloons that rise when they are full.
Three helps per level, with limits: Undo (5 per level), Shuffle (1 per level, always a layout that can still be solved) and Extra bale (1 per level, an empty hay bale with 4 seats). If no move is left, a panel offers Try again. A tutorial teaches by doing in levels 1 to 4, and the hints can be turned off in Settings.

Phone, tablet and desktop
Layouts for phones, tablets, desktop and ultrawide screens, in portrait and landscape, with touch (tap or drag), mouse and keyboard (arrow keys pick a hay bale, Space or Enter act, Esc closes panels). Options for Music, Effects, Vibration (where the device supports it), Reduce motion (it also follows the system), Tips, full screen (where supported) and language.
Each world has its own farm scenery, its own music track and its own ambient loop: 1 menu track, 10 world tracks, 10 ambient loops and sound effects, with separate Music and Effects volumes. All the art is separate WebP files. 14 languages: English, Portuguese, Spanish, French, German, Italian, Dutch, Polish, Turkish, Russian, Indonesian, Japanese, Korean and Chinese.

Change the look: what is in which file
The game reads its data when it starts, so most changes need no build step:
- src/game/rules.js: the rules (hay bales, moves, balloons, the twists) and, at the top, the number of helps per level
- src/game/levels/: the levels, one data file per world, made by the level generator and its solver
- src/config.js: the feel and rhythm numbers (timings, shake, particles) and the 17 farm animals
- src/locales/: one text file for each of the 14 languages
- assets/: the pictures (farm animals, hay bales, balloons, world sceneries, interface), the music, the ambient loops, the sound effects and the fonts, found by file name
What is in the package
- The game, ready to host. Upload it to any static host; no server language, database or account.
- The complete editable project in plain HTML, CSS and JavaScript ES modules, with 43 automated checks. Node.js 26.13 or newer is only needed for the optional tools (the tests and the level generator).
- A buyer guide and a customization guide.
- All the art, music and sound effects, and the Fredoka and Nunito fonts (SIL OFL 1.1).
Notes
- For one person. This edition has no online play, accounts, leaderboards, ads or purchases, and no integration with ad or payment services.
- Progress is saved in the browser of each player (localStorage, keys barnyard-bunch-save and barnyard-bunch-prefs). The game makes no requests to other servers.
- It needs HTTP(S) hosting and does not run from file://.
- Tested on a computer in the Chrome and Safari (WebKit) engines. It has not been tested on physical phones or tablets.






















