How I Built a Solvable ‘Sheep’ Puzzle Game and Open‑sourced It
The author explains how the viral “Sheep Sheep” puzzle’s random mechanics make it nearly impossible to clear, then details the creation of a clone called “Fish Fish” with customizable difficulty, open‑source code, and the core implementation techniques used.
Hello, I'm Su San, sharing a fun mini‑game I developed.
The popular “Sheep Sheep” puzzle went viral, but its random generation makes higher levels almost impossible to clear, turning it into a luck‑based game.
Motivated, I built my own version called “Fish Fish”, open‑sourced it, and posted it online.
The game offers multiple difficulty levels and customizable settings such as slot count and blocks per level.
Four key implementation points:
Global parameters are stored as unified variables, allowing easy adjustments and user‑customizable settings.
The canvas is divided into a 24 × 24 virtual grid; each block occupies a 3 × 3 cell area.
Blocks are generated randomly: patterns are shuffled and placed, while coordinates are chosen within a shrinking range as levels increase, raising difficulty.
Block layering is handled by assigning a level attribute; overlapping blocks are linked during generation so that higher‑level blocks must be cleared first.
These choices are not the only possible solutions but they satisfy the game’s functional requirements.
Game URL: https://yulegeyu.cn Source code: https://github.com/liyupi/yulegeyu
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Su San Talks Tech
Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
