Why one base for everything
A child who learns one game in Tibblo should already know how the next one works: where the pause button is, what the 3-2-1 means, what the ring around the clock does, what the medals on the result card are. That consistency is good for players, and it is also the only way one developer can keep adding games without each one becoming its own little project.
So every game in the arcade, Turbo Kart, Pizza Party, Ice Maze, Merge Drop, Cocoa Counter and the other 25, starts with the same line: it extends one base script. The base is about 1,200 lines. A game on top of it ranges from under 300 lines for a tapping game to about 1,200 for the kart racer, and almost all of that is the game's own rules and drawing. If you come from the web, think of it as one layout component with thirty pages inside; I wrote more about that mindset in Godot 4 for web developers.
All thirty games, with their cards and rules, are listed on Tibblo's page.
A small state machine
Each run of a game moves through four states: READY → PLAYING ⇄ PAUSED → RESULT. The base owns the transitions. A game only overrides a handful of hooks: what to set up when a run begins, what to do on each tick, what to do on pause and when the run ends.
- Active time excludes pauses and the countdown. The 3-2-1 is part of the run, but nothing moves and no taps count until it is over. Games read input only while the base says
accepts_input(). - Leaving the app pauses the run. If the phone locks or a parent switches apps, the run never keeps ticking unseen.
- A run settles once.
finish()can be called from anywhere, by the clock, by the last heart or by the game itself, but it settles the run at most once and emits a singlesettled(score, max_score, active_seconds)signal. - A run can be seeded.
begin()takes an optional seed for the game's random numbers, which makes runs repeatable in tests.
Games never pay
The most important rule is the one a game cannot break: a game does not know what coins are. It reports a score. The arcade screen turns the settled run into effort, from 0 to 5 units, and the pet's state pays coins for that effort through the game's economy, once per run.
For points games the mapping is the same everywhere: any points earn 1 unit, bronze 2, silver 3, halfway from silver to gold 4, gold 5. A run shorter than the game's minimum length earns nothing, however good the score, so there are no instant wins. The one exception is a run that ended because the hearts ran out: it still pays for the points it made, because losing quickly is not the same as quitting quickly.
Keeping this out of the games is what made the economy possible to balance. Coins are tuned in one place, with a daily soft cap that pays in full at first and less as the day goes on. Changing the pay never means touching 30 game scripts, and a new game cannot accidentally become the one that pays too much.
Shared feel, written once
Most of what makes a mini-game feel alive is the same across games, so it lives in the base and every game gets it for free:
- A 3-2-1 countdown, and a time ring that turns red and beats in the last five seconds.
- A streak multiplier from ×1 to ×4, and floating feedback like +20 or −3 s that pops, rises and fades.
- Hearts in games that use them: a big hit takes a heart with a flash and a shake, then a moment of grace so one mistake cannot cost two hearts. The last heart ends the run with a short slow-motion fall.
- Confetti when the streak steps up, a medal is reached mid-run or the best score is beaten, drawn from a capped pool of at most 160 pieces so a big burst costs no more than a small one.
- A "hit-stop" that is drawn only: the play area swells a little and settles, but the clock never stops, so scores and timing are untouched.
- First-time hints: the first time something new appears, the game slows to a quarter of its speed while a bubble explains it. Once ever, not once per run.
A run also asks the engine to stay at full frame rate while it lasts, even when the rest of the game is allowed to save power. Smoothness matters most when a child is actually steering something, which is also why I cared so much about getting 120 Hz on iOS.
Modes without endless grinding
Children replay favourites a lot, so most games have more than one way to play. Every mode is described as data (a name, a line of text, a speed, when it opens) and played by the same base:
- Classic: score all you can before the clock runs out.
- Endless, in games with hearts, from the first mastery level: no clock, only hearts. A slip that would cost seconds counts instead, and every third slip takes a heart. Past the classic run's length, the game speeds up a little at a time, so there is no pace that can be held forever.
- Relaxed: endless, but it never speeds up. It pays at most 3 of the 5 effort units.
- Tricky and Wild: opened by the pet's level later in the game, 25% and 45% faster, paying one and two more steps.
Endless and Relaxed runs also stop after ten minutes. The comment in the code says it plainly: nobody plays all day. In a family game, a mode that could be farmed for coins indefinitely would be a design bug, not a feature.
Next to modes there is mastery, per game: a finished run gives 1 point plus 1 to 3 for a medal, at most 6 points per game per day, over 20 levels. Mastery opens looks: an evening tint at level 3, a silver card frame at 7, a gold one at 10. It never opens coins.
The game of the day, and a clock set back
Each day one game is the game of the day. It is picked from the day number, so it stays the same all day and after a restart, and it is never yesterday's game. It comes with one modifier: Speedy (everything 15% faster), Mega streak (the streak goes up to ×5) or Lucky day (bonus things turn up twice as often). Modifiers are skipped where they make no sense: a faster clock only makes the ice puzzle harder, and a game without bonus items gets nothing from a lucky day.
The first finished run of the game of the day pays a small flat bonus, and playing several days in a row pays a little on the 3rd, 7th and 14th day. Anything that pays by the day invites one trick: setting the phone's clock back. So day rewards only count when the date is not earlier than the furthest day the arcade has already seen. A clock more than 30 days behind is treated as a wrong clock that someone put right, and counting starts again from there.
Thirty games without a slow start
The game picker, the passport, the album and the score board all need facts about every game: its title, its rule, its icon and its medal goals. None of them needs the game itself. Loading all 30 scripts just to draw a list would make startup slower for no reason.
So those facts live in a small registry, and a game's script is loaded only when it is first played. The registry is not written by hand. A tool generates it from the games themselves, and a test fails if the two ever drift apart, so the picker can never show a medal goal the game no longer uses.
Testing thirty games
Because the rules live in the base, they can be tested once: a run settles once, pause freezes it, a short run pays nothing, the effort mapping is right. The arcade's test suites then play the games themselves, headless, with real pushed taps and swipes, time driven step by step and a small autopilot at the controls. They check that a good player can score well, that a run lasts long enough to pay, that it settles once and that pause really freezes it.
What I learned
Put the rules that must never differ in the base. Pause, pay, fairness and timing are the same in every game because no game gets to implement them.
Separate "how well did you play" from "what does that earn". Scores belong to games, coins belong to the economy. That one boundary is why I could rebalance the whole game without editing a single mini-game.
Make modes data, not code. Once a mode is a name, a speed and a pay rule, adding Tricky and Wild to all 30 games was a change in one file.
Design against the grind on purpose. Caps on time, on daily mastery and on what a relaxed run pays are not there to frustrate anyone. They are there so a child can put the phone down without feeling they are leaving coins behind.