+61 8 9481 2100 140 St Georges Terrace, Perth WA 6000, Australia [email protected]
+61 8 9481 2100
[email protected]
140 St Georges Terrace, Perth WA 6000, Australia
Engineering

Offline-First: The Engineering Decision That Shaped Everything

Why the app works perfectly in a tunnel — and the engineering tradeoffs behind a puzzle game that never needs the internet.

Open Ruby Square in airplane mode and nothing changes. Every level, every stat, every average — all of it works with zero bars. That's not a feature we added; it's the constraint the whole app was built under, and it explains a surprising number of decisions players never see.

The 15 MB promise

Keeping the install under ~15 MB meant no remote assets at all. All 700+ board definitions ship as compact state seeds — not stored grids but generator instructions, a few hundred bytes each. The boards don't exist until you open them; they're computed on demand from seeds smaller than this paragraph.

What 'world average' actually is

Players assume the averages are live. They're not — they're computed aggregates baked into each release. When a new player base forms around a level, its true average updates on the next app update, not in real time. That's the honest tradeoff: offline-first means averages are snapshots, refreshed with versions.

The sync that isn't

Cloud save sync uses Google Play Games' snapshot system — the same infrastructure games like Monument Valley rely on. We don't run sync servers. Progress is stored as a compact blob; conflict resolution is 'newest device wins' with a merge for level-completion flags. Boring, and therefore reliable.

  • No accounts of our own — Google Play Games is the identity layer.
  • No real-time anything — sync happens on launch and on quit.
  • No analytics blocking gameplay — everything queues and sends when connectivity returns.

Why it was worth it

The decision costs us: no live leaderboards, no real-time community features, averages that lag. What it buys is a game that never shows a spinner, works on a plane, dies on no server bill, and treats your progress as yours — stored on your device, synced through your account, deletable by you.

Offline-first isn't nostalgia. It's a bet that a game respecting your connectivity will outlast one demanding it.
In thirty seconds

Key takeaways

Boards are seeds

700+ levels ship as generator instructions, not stored grids — the whole game fits in ~15 MB.

Averages are snapshots

World averages bake into each release rather than streaming live — the honest cost of offline.

No sync servers

Google Play Games snapshots handle saves — progress is yours, deletable by you.

Iker Sagasta

Iker Sagasta

UI engineer & accessibility lead

Iker rebuilt Ruby Square's palette system and owns the sync layer. He has strong opinions about spinners.

Get the next one first

The Ruby Memo — one email a month, no noise.