RIFTSPINNER

FIELD NOTES

Offline play and save data: how Riftspinner keeps your progress

No account, no download and no connection needed after the first visit. Here is how that works, and the ways it can still go wrong.

By CablingGod Ltd, the studio behind Riftspinner · Published · 6 minute read

PLAY FREE IN YOUR BROWSER

Riftspinner asks for nothing: no account, no download and, after a single visit, no internet connection. Your upgrades, your achievements and your daily tasks are all stored on your own device. That makes the game simple to start and private by design, and it comes with trade-offs worth understanding, since "stored on your device" is also a sentence that can end in lost progress if you do not know how browsers behave. This article explains how offline play and saving work, what the game does to protect your data and what can still erase it.

How the game works with no connection

The technology behind offline play is a service worker: a small script the browser keeps running in the background for a site. When you first open Riftspinner with a connection, the service worker downloads the game's script, its style sheet, the fonts and the language files into a cache on your device. When it has finished, a green OFFLINE READY line appears on the main menu. From then on, requests for those files are answered from the cache, so the game starts without touching the network, in an ordinary browser tab or from the installed app.

Several design decisions make this reliable rather than hopeful.

What does not work offline is anything that needs another computer: the leaderboards, the daily board and the shop. The game shows OFFLINE while the connection is down. Your runs are still kept, and you can post a score the next time you are online.

How the save works

Your progress lives in the browser's local storage, under a single key. All permanent data is in that one record: your ash, your Ash Market ranks, unlocked rigs and maps, achievements, settings, accessibility choices, the enemies you have met. Everything that belongs only to the current run, such as your health, your wave and the weapons you carry, is held in memory and thrown away when the run ends. Keeping those two kinds of state apart is one of the simplest rules in the code, and one of the most useful. A new per-run field has to be reset in two places, when a run starts and when the tutorial starts, and forgetting one used to be a reliable way to make a bug.

The more important piece is the loader. A game that is updated every few days will, sooner or later, add a field that a player's existing save does not contain. A loader that trusts the save will then read nothing, treat it as zero or fail, and the player's old account will behave strangely after an update. Ours does the opposite. It starts from a complete set of defaults, then reads the saved record field by field, validating the type and range of each one, and any field that is missing or damaged simply keeps its default. New content gets added to old saves without anyone noticing, and a corrupted value cannot take the game down with it. We have learned the hard way to define those defaults above any code that runs at load time, because a constant used before it exists is a failure that only happens on first load.

Why days start at midnight UTC

Several things in the game reset daily: the three daily tasks, the Daily Rift, the rotating shelf of the gem shop, and the count of free runs. All of them roll over at 00:00 UTC, which is 1 am in London during British Summer Time and midnight in winter. There are two reasons for a single worldwide clock. First, it makes the daily content the same for everyone: the daily task is chosen from the date, so every player gets the same task on the same day, so players can compare notes. Second, local midnight is hard to reason about, since it depends on a time zone that can change when you travel and on a device clock the player can set.

The cost is that "today" ends at an awkward hour for some players. If you are in a time zone far from UTC, your day will reset in the middle of your afternoon or evening. We think the consistency is worth it, but it is a real compromise.

What can erase your progress

Local storage belongs to the browser, not to the game, and the browser decides when to clear it. These are the cases that matter:

The game does two things about it. It asks the browser to treat its data as persistent, which makes eviction under pressure less likely where the browser allows it. And it encourages installing the game: an installed copy is much less likely to have its data cleared than a tab you rarely open. On Chrome, Edge and Android there is an INSTALL APP button on the main menu; on iPhone and iPad, open Safari's Share menu and choose Add to Home Screen. If you ever buy something, keep the restore code that comes with it, because that is how a purchase is recovered on a new device.

There is also a deliberate opposite. The Reset account button on the main menu wipes your progress, and because that is destructive it requires you to type a confirmation. It keeps your accessibility settings and your cookie choices, since a player who needed those options before a reset still needs them afterwards.

What this approach gives up

No account means no cross-device sync, no password to lose and nothing to breach, and also no server-side backup of your progress. We chose it because it is easier on players and simpler to run, but it is a trade, and the honest framing is that your save is as safe as your browser's storage. If you care about a long-running account, installing the app and playing in one browser is the single most useful thing you can do.

One last honest note about testing. We test offline play by switching a headless browser to offline mode after the first load and checking that the game, the menu and a full run still work, then by running the same check against the unzipped upload package. That proves the logic. It does not prove how every phone behaves in real airplane mode, or how every browser treats its cache under storage pressure. If offline play fails for you, please tell us your browser and device. The FAQ has the step-by-step answers on installing and resetting.