Solar Puzzles: two native codebases, one game
solarpuzzlesreleaseengineering
Our second consumer app is out on both stores. Solar Puzzles is a collection of gentle space puzzles for children: four games — Planet Blocks, Planet Rescue, Planet Portals and Cosmic Marbles — feeding star points into a Space Museum that holds all eight planets, all five dwarf planets and a set of rare artifacts, each with a real photograph and one honest fact.
It began as a birthday project for a six-year-old in the family who knows the solar system better than most adults, which turned out to be a demanding brief: get the science right, never scare anyone, and run smoothly on a hand-me-down Android phone. Here's what shipped, and what we learned building it.
The cross-platform plan we measured and threw away
The app is native twice: SwiftUI for iOS, Kotlin and Jetpack Compose for Android. That wasn't the plan. We started with a single Swift codebase compiled to Android, and got it working end to end before checking the only number that mattered: about 9 frames per second in gameplay, against roughly 57 on the hand-written native build. For a puzzle where a child drags a piece across a board, that's not a rough edge — that's the product failing.
So the Android app became a deliberate twin: each engine is a 1:1 port of its Swift counterpart, ported at the same call sites, down to the tuning constants. It costs us every gameplay fix twice, and we took that trade knowingly. The experiment stayed on a branch, with the measurements, so nobody re-litigates it from memory in a year.
Two codebases, but not two sets of levels. Every level, palette and balance number lives once in the Swift sources; a small export script turns them into JSON assets the Android app reads at launch. Forty portal levels, the rescue missions, planet facts and colors — one source of truth, so a tuning change can't quietly ship to one platform only.
One Canvas per board
The Compose rule that made the difference: a game board is exactly one Canvas, ticked by withFrameNanos or redrawn from an engine version counter — never a composable per cell or per marble. Fifty-odd little composables animating independently is how you get a slideshow on mid-range hardware.
The subtler trap cost us an afternoon of staring at a frozen board: Compose only recomposes when something it reads changes. Pass an engine's state into a composable and never read it, and you get a perfectly still screen with a perfectly healthy engine ticking behind it. Engine-driven UI has to observe the engine explicitly, and now does.
An app with nothing to leak
Solar Puzzles ships in Apple's Kids Category (ages 6–8, rated 4+) and Google Play's families programme, and both listings say the same thing: no ads, no in-app purchases, no accounts, no tracking, no data collected. The most reliable way to keep that promise is to have nothing to break:
- No networking code exists. No SDKs, no analytics, no crash reporting, no web views. The Android app doesn't declare the internet permission at all — the guarantee is enforced by the manifest, not by our good intentions.
- Progress stays on the device in plain local storage, and Android backup is switched off: a child's chosen name should never travel anywhere, not even to their parent's cloud backup.
- The debug surface doesn't ship. Our developer shortcuts and the live tuning lab are compiled out of release builds, so the shipped launcher activity exposes no cheat or deep-link entry points.
The gentler product rules were just as firm: no "Game Over" — the run ends with "Great flight, astronaut!" — big touch targets, and encouragement instead of scolding. In Cosmic Marbles the chain even slows down as it nears the black hole, a mercy brake that gives small hands a real last chance.
Getting the science right
The brief's hardest requirement wasn't technical. Ceres sits between Mars and Jupiter, where it belongs. All five dwarf planets are in the museum, not just Pluto. And for the worlds nobody has photographed up close — Haumea, Makemake — the museum says "no real photo exists yet" rather than showing an artist's impression as if it were a picture. Every image in the app is public domain, mostly NASA, and credited.
That last one felt pedantic while we were building it. Then the six-year-old reviewer asked why one of the cards had no photo, got the honest answer, and repeated it back to her mother that evening. Worth the pedantry.
Get Solar Puzzles — free, works fully offline, no ads and nothing collected. On both stores.
