Until this week, a cave in Tabby Trails sounded exactly like the meadow above it. The cat would climb down a ladder into a dark side-on world of ledges, bats and torches, and Cat Radio would carry on cheerfully playing Acorn Path, as if nothing had happened. That always felt a bit like going down into a cellar with your headphones on.
Now every cave plays one of five tunes from the moment the cat starts down the ladder until it climbs back out: Two Notes in the Dark, Glow-worm Lullaby, Something Big Below, The Crystal Hall and Tiptoe Past the Lair. Which one a cave gets comes from the world's seed and where its mouth is, so it's always the same tune in the same cave, for everyone in that world. The one in the clip is Glow-worm Lullaby, which is a music box playing a little waltz over a clock that ticks along with it, and a bass that sinks a half step every bar.
Each tune has three stages. The game measures how far the cat has come from the ladder, along and down both counting, so a long flat tunnel builds as well as a deep shaft does, and at a third of the way and again at two thirds the tune moves up. What that means differs from tune to tune. Glow-worm Lullaby plays the whole thing a half step higher and a bit quicker each time. Something Big Below starts with drums muffled as if they're behind the rock and brings them nearer. Two Notes in the Dark is two bass notes a half step apart, like something large breathing, and they just come closer together until they're running. It only ever goes up during a visit, so backing off a little doesn't let the tension out.
They're all played by one little cave band that can sit right in front of you, off the far wall as an echo, or behind the rock, muffled, so the echo is part of the arrangement rather than an effect laid over the top.
Invite codes are words now (something like MOSSY OTTER 47), and a cat the world doesn't know knocks: the owner gets KNOCK KNOCK, with LET IN or NOT NOW.
A bicycle leaves one line in the snow and the sand, a skateboard two, broken where a trick lifts the board.
Hold Z or X with a snowball and a dotted arc creeps out ahead, the way a pounce aims; let go and it lands there.
A sproutling has one GATHER command instead of MINE and CHOP: it mines the rock in front of it and chops the tree.
In story mode every dish and bake heals three hearts, and a night in bed one or two.
Animals in a pen are saved with the world, and a fenced-in herd no longer doubles every time the cat comes back.
The game's sprites are painted once when it's built instead of in every player's browser, so the first frame comes in about a third of the time on my laptop, and half on a slow phone.
On a touch screen the big button says PAW, and the other one says what it will do: CODE facing a sproutling, SLEEP facing a bed.
A Suit and Tie (two cloth and a wool), and caps and capes go on over the frog and raccoon suits.
A wolf's bite throws yellow and white stars off the cat, instead of red bits.
Until this week, a world in Tabby Trails lived in exactly one place: the storage of whichever browser it was made in. That works right up until somebody clears their browser or gets a new tablet, and then a village that took weeks to build is simply gone. It was the worst thing that could happen to anyone in the game, and it had nothing to do with wolves.
So worlds are saved online now, as you play. The ordinary way to do that is an account, with an email address and a password, and I spent a while trying to talk myself into one before deciding the game was better off without. What you get instead looks like this:
Four words and two digits. Type them into the game on another device and your worlds turn up there. (Those particular words are the example from my own code comments.)
Why not just have accounts
Mostly because of who the game is for. Tabby Trails is made for players of about ten to fifteen, and an email address is exactly the kind of thing I don't want to be holding on their behalf. Plenty of them don't have one, the ones who do would have forgotten the password by Thursday, and a forgotten-password flow means sending mail, which is a whole second system to look after from a spare room. More than any of that, the safest personal data is the data that was never collected. If all the database knows is a random number, there isn't much in it to leak.
The other reason is that nobody should have to do anything to be saved. There's no sign-up screen. The first time the game talks to the server it's handed a cookie that the page's own code can't read, holding a random id and a 256-bit secret, and from then on that device's worlds go up by themselves, at most once a minute. The game doesn't even bring the words up until you've played for about twenty minutes and then saved and left. They only matter once a second device comes into it.
What the server knows
The players table has three columns: a random id, when it was made, and when it was last seen. The comment I left above it says "No name, no email, no address", mostly so that future me has to delete a comment before adding one.
The saves are kept as sealed files. The game gzips a world and sends the bytes with a checksum, and the server stores them without ever opening them. I like this more the longer I live with it: no change to the game can corrupt a save on the server, and no change to the save format needs a database migration. A new world is about 2 KB, and a very busy one, with 200,000 changes in it, came out at around 1 MB.
The words themselves are never stored. They go through scrypt, which is slow on purpose, and then through a keyed hash whose key lives only in the server's settings. That one value is both how a set of words is looked up and what proves them, so a copy of the database by itself says nothing about anybody's words. It also means the server can't show you yours a second time. A device that has lost its copy is simply given a new set, and every set you've ever been given keeps working, so a picture you saved a year ago is still good.
Picking 1,024 words
Each word comes from a list of 1,024, which makes a word ten bits, and with the digits a full set is about 46 bits, or some 99 trillion possibilities. That is well short of a good password, which is why wrong guesses are counted hard (five, then one every two minutes) on top of the slow hash.
The list took longer than the cryptography did. Somebody is going to read these off one screen and type them into another, so every word is three to six letters long, common, spelled only one way, and sounds like no other word and no number. The digits run from 10 to 99 and never start with a zero, because "07" gets read out loud as "seven". As you type, the game offers the words it could be, and it says straight away if you've typed one that isn't on the list. And the list can never lose or change a word, because the sets already out there are made of them. There's a test holding its checksum, in case I get clever one day.
Two devices, one world
Once a world can be in two places, two devices can both believe they have the newest copy. Rather than try to merge anything, the server keeps a turn for each world: one tab on one device holds it, and only that tab's uploads are taken. A tab says "still here" every ten seconds, and a device that goes quiet for two minutes can have its turn taken by another. If it comes back later with play of its own, that play isn't thrown away and doesn't become a second world. It's set aside, as a copy of the same one. Older copies are thinned as they age: the newest two whatever happens, then one per quarter of an hour for two hours, one an hour for a day, and one a day for a month.
What it costs
None of this is free. Anyone who has your words can open your worlds, so the game calls them secret words everywhere, and never takes them on the same page as a friend's invite code. (I tried one box for both and dropped it. Paste your words into the invite box now and it refuses them and tells you to keep them to yourself.) When words are typed in, the game lists the worlds it found by name and asks if they're yours, with "no" already selected, because joining two sets of worlds can't be undone. And if you lose the words and the device both, there's no "email me a link" to fall back on. That's the trade, and for this game I think it's the right one.
The tables keep who you are, how you prove it and what you own apart from each other, so an email sign-in could be added later as one more way of proving it, without a single world having to move. I'd just rather not, until somebody asks.
It's all switched on, and the game runs in the browser. Once you have a world, the gear on the home screen has your words.
Also lately
A cat can build its own home out of round rooms, and repaint each one at the room itself.
Persian rugs, woven from wool in three sizes.
A leash, for walking a named animal friend at heel.
The home screen follows your own clock: golden hour, dusk, and fireflies after dark.
Sand takes footprints the way snow does.
A new cat starts out with one of a hundred names (Mochi, Miso, Biscuit, Churro) instead of CAT and two letters.
At the end of a new cat's welcome to Tabby Trails, the mayor hands it a turnip. It has two feet, a leaf on its head and a gold key in its back, and if you tell it what to do, in very small words, it will go and do it while you get on with something else.
They're called sproutlings. This one is Pip, which is the name the game gives your first one as soon as it has something to do (Bean and Spud are next in line). Pip's whole job in that clip is five commands long:
Repeat eight times: if something is in the way, chop it, then chop what's left of it, then take a step. A tree takes one chop and its stump takes the other, which is why there are two. When the commands run out a sproutling always walks back to where it was set down, and when the cat picks it up, everything in its bag flies to the chest after it.
One winding of the key is good for 100 steps and 20 swings, so a single turnip can only turn over so much of the countryside before it droops and has to be wound again. I like that about it.
How it thinks
The game flattens the stack of blocks into a plain list of steps and runs it on a machine so small that its whole state is a few numbers. So a sproutling halfway down a row can be saved with the world, or handed to the room when friends are playing, and it carries on from the step it was on.
The same machine can run without touching the world, and that gets used twice. The dotted line in front of Pip is the game running the program in its head to show where it would go. And when a program plants or paves, the sproutling runs it in its head first to count the seeds or pebbles it'll get through, and takes that many from your chest when you wind it up. Nobody has to pack a turnip's lunch.
The blocks were the one place I gave up on pixels. The game's bitmap font is fine for a hotbar and miserable for a screen full of commands, so the program is ordinary web text laid over the canvas, and everything around it is still drawn by the game.
This week
The screen used to have a little practice field for trying a program out. It's gone: to see what a program does, you set it going. A sproutling that's ready now wears a sign saying how to start it, since nothing about a turnip says "click me". And beacons have names, so a sproutling can be sent to any beacon standing, yours or a friend's, by what it's called.
If you'd like to boss a turnip about, the game runs in the browser, and the mayor will give you yours.
Also lately
The village has a bakery with a brick oven: wheat into dough, and six things to bake, from bread to a birthday cake.
Cave mouths come in five shapes now, and each one dresses for the ground it's on: moss on grass, icicles on the tundra.
A cottage the village built opens onto a round room, with eight ways of arranging the furniture.
There's a note card in the pause menu for telling me what's broken.
The marker that points to your village is a little well instead of a house.
Some nights in Tabby Trails, a little way off in the grass, there's a pink mushroom that wasn't there the night before. It glows a bit. If your cat walks over and eats it, the cat puffs up to six times its size, and for the next sixteen seconds the forest has a problem.
It's called a puffcap, and if a mushroom that makes you big sounds familiar, it should. A certain Italian plumber worked this out decades ago, and this is my small thank-you to him. The radio even speeds up to double tempo while you're big, the way his music hurries when time is running short, because it didn't feel right to borrow the mushroom and leave that behind.
For a while the giant cat was a polite giant. It stepped over the trees and everything was exactly as it had been once it shrank again, which was sweet, but it never quite felt like being enormous. So as of this week the paws count. Walk through a forest and the trees go over one after another, each falling away from the cat, and you come out the far side with a trail of stumps behind you and a hotbar full of wood. Rock holds out a little longer: it cracks under every step, and a stomp or two is what finally breaks a boulder apart.
How the trampling works
The nice surprise was how little of this needed building. The cat can already chop a tree and mine a rock with its claws, and all of that already existed: the tree leaning and going over, the stump it leaves, the wood flying to your hotbar, the way a friend playing with you sees it happen. A giant's footstep reuses every bit of it. Each time a paw comes down, the game looks at the patch of ground under the cat (it's the same oval as its shadow, about six tiles wide) and hits whatever is growing or lying wild in there, as if the cat had swung at each thing itself.
A tree goes in one hit. Rock takes one blow from a footstep and five from a stomp, which is why you can stroll across an outcrop and only chip it but two good jumps will break granite out. And because these are the same world changes a normal cat makes, there was nothing new to send to friends. Their game hears "this tree was chopped" just as it always has, and the stump grows back in three days like any other.
Two things needed some care. Ten trees falling at once shouldn't make ten sounds, so only the first tree, the first bush and the first rock under each step get a voice and the rest go quietly. And the tiny freeze the game does when you break something, which feels good on a single rock, turned walking through a forest into a stutter. Now only a stomp gets it.
The giant still leaves alone anything somebody built. Fences, walls, doors, furniture and everything belonging to a village get stepped over as before, so nobody loses a house to a friend who found a mushroom.
Getting small again
There was one problem from the first version that I'm still fond of. A giant can walk over anything, including the sea, so sixteen seconds later it might be standing somewhere a normal cat can't be. Before it shrinks, the game checks whether a small cat could stand right there, and if not it finds the nearest tile where one could and quietly slides the cat over to it while it shrinks. In the last three seconds the giant hiccups once a second and four little pink corners blink on the spot where it's going to land, so the pop doesn't catch you out halfway across a pond.
If you'd like to try it, the game runs in the browser. Head out into the plains, a forest or the savanna after dark and look for something pink in the grass. Playing on your own you'll find one puffcap; with friends a ring of four comes up, one each, and three small cats can ride on a giant's back.
Also lately
A new cat now arrives hanging from a bunch of balloons, and one of them bursts.
The forge, the music hall, the greenhouse and every cottage can be walked into, and they're all round rooms inside.
Wind blows across the grass, and tall grass bends with it and parts around the cats.
Water and lava each move as one surface now, with foam where the water meets the shore.
The sproutling has a wind-up key on its back that turns while its spring runs down.
Tabby Trails already had a bicycle. Twice as fast as walking, faster again on a street, a perfectly sensible way for a cat to get around.
So obviously I made a skateboard, which is slower. Four fifths of the bicycle, everywhere. By the numbers it's the worse item.
It can kickflip, though.
Press Space and the cat hops, the deck flips over under its paws (you can see the black underside go by, which I'm unreasonably pleased with) and it lands in a little puff of dust. Press again and the cat and the board spin all the way round together. They take turns, so if you hold Space it's flip, spin, flip, spin for as long as you like. That's the whole trick list. Two. Turns out two is plenty when it's a cat.
One thing for the multiplayer people: I don't send "this cat did a flip" to your friends. I just send how many tricks the cat has done so far. Odd ones are flips, even ones are spins, and every screen works out the rest by itself. (The count wraps at 250. It has to be an even number or the screens stop agreeing, which is the kind of thing I know now.)
The sunglasses in the clip have nothing to do with any of this. They're two copper ore, they're only for show, and the game's entire description of what they do is "VERY COOL." Look at the clip, though. It's not wrong.
The board is four wood, two iron ingots and two copper ingots at a village forge. It's all in the beta, which runs in the browser if you're curious. If you find something broken, tell me. That's what the beta is for.
Also lately
The galleon can turn. Eight headings now, and it stays moored the way you left it.
Six kinds of fish, and the fishmonger keeps a board of what's biting and where.
You can walk into the observatory and bother Professor Quill, who has thirteen things to say about the sky.
Narrow water freezes over in winter and a cat can walk across it.
The wolves don't howl anymore. There are also three tenths fewer of them. Unrelated.
Shores and the edges between biomes are ragged now.
This is the first post of the devlog. The plan is a short one every few days, about whatever is easiest to show.
I started Tabby Trails on September 21. Back then it was a cat in a field, in a window 256 pixels wide, with a rock to dig at.
I wanted to see what two weeks of work looks like, so I wrote a script. It checks out the last commit of each day, starts that version of the game, drops a new cat into the same world and takes a screenshot. The world is generated from a seed, so the same seed gives the same place every time. Mostly.
The clip above is those screenshots in order. About a week in, the field turns into a village, because villages got added and this cat happens to wake up in one. On October 4 the houses turn into acorns, and I'm keeping those.
The street lamps and windows turn on at night now:
And there are seasons:
It's an early beta and you can play it in the browser. If something's weird or broken, I'd like to hear about it. No rush.
Also lately
Crickets purr instead of click.
Caves have springs, lifts, ferries and crumbling bridges.
You can craft a raccoon suit. Also a frog suit.
Sproutlings: little wind-up helpers you program by stacking pieces.