I'm a solo developer, and Puzzle Flow started as a way to teach myself game development. It is now a published Android game with four kinds of grid logic puzzle, 1,200 levels of each, daily and weekly sets, achievements and 12 languages. This is what I learned building it with Flutter and Flame, including what I would do differently.
The game in one paragraph
Puzzle Flow has four puzzle types: Boxed (split the board into rectangles that match the number clues), Pipeline (connect every pair of dots and fill every square), Knight Hop (visit every open square once with a chess knight) and Tally (cross out numbers so each row and column hits its target). There is no timer and no account, and it works offline.
1. One UI for four puzzle types
My biggest early decision was to never write a separate screen per puzzle type. The menu, pack list, level list, board screen, HUD and reward screen are written once. The category is a parameter, not a reason to copy a screen.
What differs per category is logic, so that sits behind a common interface: the level generator and solver, the input rules (drag versus tap), the rule checks, and how a cell is drawn. Flame only draws the board. A small delegate per category paints cells and handles taps and drags, and the rest of the app depends only on the interface. Adding a new puzzle type means new logic classes and one renderer, with no new screens.
2. Deterministic level generation
Levels are generated on the device, not downloaded. Every level comes from a seed built from its category, pack and level number, so the same level is identical for every player and every run. That also makes daily and weekly sets easy: the seed comes from the date, so everyone gets the same puzzles that day.
Two things made this safe to change later:
- A generator version in the seed. If I improve a generator, levels that players already solved must not change under them. A change adds a new version from a given date forward.
- Golden test vectors. A fixture pins a spread of generated levels. If a code change alters one, the test fails and reminds me to bump the generator version.
Generation can be slow on bigger boards, so the next few levels are built ahead on isolates and cached, which keeps the UI smooth.
3. State lives in a bloc, not in Flame components
A screen resize or a rotation must never regenerate a level or lose progress. So the level state, moves, undo and hints live in a bloc, and the Flame components only draw what the bloc says. The layout is one pure function of the available size, which both Flame and the Flutter overlays call. Colours come from a theme extension, because Flame cannot read the Flutter theme.
4. Unfinished levels and fair stars
I save the run after every move, so closing the app never loses progress, and the game offers to resume. Stars depend on how cleanly you solve a level (hints and take-backs count), never on time. One bug I only found by playing: after replaying a solved level, the earlier hint penalty carried over, so a perfect replay could not earn three stars. Replays now start clean.
5. Ads and subscriptions
The game is free with ads on menus only, never during a level. There is an optional ad-free subscription and hint packs, handled with RevenueCat. Lessons so far:
- Never request ads before consent is gathered, and keep all ad code behind one service that never throws.
- A one-tap-dismiss "go ad-free" dialog was too weak, so I replaced it with a full-screen offer that can only be closed after a short countdown.
- Ad revenue at small scale is tiny. Treat it as a bonus, not a business plan, especially in lower-eCPM regions.
6. What I would do differently
- Write the how-to-play guides earlier. Players only understand the rules if the first level teaches them.
- Make rule requirements obvious. In Pipeline, connecting every pair is not enough: every square must be filled too.
- Test on a real low-end phone sooner than I did.
Try it and tell me what you think
The game is free on Google Play: Puzzle Flow. Since this is a learning project, I would really like feedback on:
- Are the early levels too easy or too hard, and where did you get stuck?
- Which of the four puzzle types did you enjoy most?
- Is anything in the guides confusing?
Thanks for reading, and I'll answer every comment.
Top comments (0)