The save stays with you
Let me start with the simplest thing: when you play one of my games, the save goes into your browser's memory, on your device. You do not log in, give an e-mail address or invent a password. You open the game, play, close the tab, and next time you choose “Continue”.
This has a comfortable side: the game also works without internet, and nobody has to leave any data with me. It has a flip side too: the save is tied to one device and one browser. If you clear your browser data, you may lose it. That is why I added a few ways to avoid losing your progress.
Slots and autosave
In the games you can keep several independent saves, like several pages in a notebook. In My Bar, for example, there are six slots, meaning places for a save, plus a separate “Autosave”. The autosave happens by itself every so often, so even if you forget to click “Save”, you do not lose all your work.
Every slot remembers a name and a short summary, such as which day of the game it is or how much money you have. That way you can see in the list which save is which, without loading them one by one.
A save from one game will not load in another. Each game has its own “key” and its own names in storage, so saves do not get mixed up even though all the games live under one address.
What is in a save
A save is simply a description of the state of the game: what you built, how much money you have, how the day is going, which settings you picked. The game turns it into text that starts with the mark “KKS1”. It looks like a long string of letters and digits.
This text is compressed, meaning made smaller, like a ZIP file, so it takes several times less room. It is also scrambled, so it cannot be read with the naked eye or easily edited by hand. To be honest: this is not real cryptography. The key to the scrambling is the game's name, written in its code. It is meant to protect against accidental damage and casual peeking, not against someone who is really determined. A checksum is added to the save as well, like a stamp that checks the text has not been changed or damaged on the way. If it does not match, the game refuses to load it instead of loading a broken state.
The save file and manual backup
You can export a save to a file or copy it as text. Then you just load it on another device: you choose the file or paste the text, and the game puts it into the first free slot. This works without internet and without any account, and it is a good backup before an important experiment.
The game also watches versions. If a save comes from a newer version of the game than the one you have open, it does not force it in, but asks you to refresh the page.
When you want to play on a phone and a computer
A file is moved by hand, and I wanted something more convenient. So there is optional save sync. The word “optional” is the most important: without it everything works as before, and it does nothing until you switch it on.
Sync needs no e-mail and no password. When you turn it on, the device gets a random anonymous key, a long string of characters. That is your “account”. One such account works in all of my games at once.
To connect a second device, you do this:
- On the first device, open the “Save sync” window in the game menu and choose “Link another device”. The game shows a short code, for example in the form K7Q4-MX2P, which is eight characters.
- On the second device, open “Save sync”, choose “I have a code from another device” and type in that code.
- Done. Both devices are linked.
The code is valid for only about 10 minutes and works once. So even if someone sees it over your shoulder, it will soon be useless. A short code is also easier to copy than a long key.
There is also a backup key: the full, long string you can write down in a safe place. It replaces the code when you have no linked device at hand. Treat it like a password, though, because whoever has the key has access to your saves.
What is sent, and when
When sync is on, after every slot save (autosave too) the game sends that same save text to my server, together with a short description: the name of the save and a summary like “Year 2, day 34, 12,300”. On top of that comes the version number of the game. The game does not collect your name or e-mail, because you never give them.
Sending does not happen every second. The game waits and sends each slot at most once a minute, and the newest version counts. If there is no internet, the save waits in a queue on your device and goes out when the network returns, or when you open the game again. When you leave the game for the list of games, whatever is waiting is sent too.
On the second device, in the load menu, you can see which saves are newer in the cloud and download them.
What if two devices disagree
Sometimes you change the same save on your phone and on your computer before they get a chance to agree. In that case the game does not choose for you. It shows a window “Two different versions of the save” describing both (for example the game day and the money) and asks which one to play. The other one is replaced. You can also decide later.
I would rather ask than quietly erase hours of someone's play.
Unlinking and deleting
In the sync window you can unlink a device. The saves then stay on it and on the server. You can also delete the account together with all saves from the server. That cannot be undone, so the game asks for confirmation first, and the saves on your devices are left untouched.
In short
By default a save is only yours and sits on your device. If you want, you can move it with a file, paste it as text, or link devices with a short code. Everything is voluntary, and the game works the same with or without sync.