Skip to content

From the studio

How a pile of sand learned to hold a grudge

A few weeks before launch, one of the little people in my game had a thought about me. It appeared in a small bubble above its head:

Keep away from the hand.

In Sandlings, you’re the hand. You pour the sand, tip the water and, occasionally, drop lava somewhere you shouldn’t. I wrote that sentence, months ago. What I didn’t write was when it would come up. Nothing in the game said “show this now”. The Sandling had added up what I’d been doing and decided.

This is how a pile of sand learns to hold a grudge, and, if you’re nicer to it, how it learns to let one go.

First, the sand

The world is a grid of tiny squares, about 112 across on a phone. Each square holds one thing: a grain of sand, a drop of water, a bit of lava, or nothing. Many times a second, every square looks at its neighbours and decides what to do. Sand falls and piles up. Water falls and spreads sideways. Lava creeps, and sets fire to what it touches.

There are about forty materials, from soil and seeds to snow, oil, gunpowder and fairy dust. None of them knows about the others. A river finding its way down a hill isn’t scripted. It’s just a lot of water following the same small rule.

The Sandlings live on top of all this. Unlike the sand, they have something going on inside.

Noticing, and remembering

A Sandling doesn’t see the screen. It gets told, many times a second, what’s around it and what just happened: the hand poured something nearby, something touched it, its house is gone.

When something hurts, it remembers what did it. Touch a cactus and the Sandling thinks:

That hurt. I will keep clear of cacti.

It also keeps short stories of what it was doing, what it tried and how it went. Those fade slowly unless something brings them back to mind, and recalling one makes it stronger. When there are too many, the weakest are forgotten, but the lesson they taught stays.

Under that sits what the game calls a Psyche: a small web of places, people, things and feelings, each linked to how things went. It’s how a Sandling ends up “uneasy about” cactus, or “drawn to” a particular hill. Sand and wood are home ground. However badly a day goes, a Sandling never blames the sand.

What it thinks of you

Every Sandling keeps one number about the hand: how much it trusts you, from −1 to 1. Everything you do moves it.

Give it something it wants and it goes up. Pour water on lava that was creeping towards it, and it goes up a lot:

The hand poured water on the lava. That was for us.

Pour lava on it and the number drops hard. Wreck its house and it drops harder still, and it’s angry about it. Even pouring things too close, without hurting anyone, costs a little. Saying sorry helps. So do warnings that turn out to be true. And left alone, the number drifts slowly back towards neutral, the way a grudge does.

That number decides a lot. A Sandling that distrusts you is more likely to choose “Keep away from the hand” as what to do next. One that likes you will wander over to “See what the hand is doing”. Cross certain lines and it says so: “I will watch what happens first.” Or, after you’ve made up for things: “Perhaps the hand is not so bad.”

Passing it on

Sandlings talk to each other. When one learns something the hard way, it tells the others:

Told the others: cactus hurts.

The one listening has to decide whether to believe it. Each Sandling keeps a record of everyone it hears from: how often what they said turned out right, how often wrong. A stranger gets a fair hearing to start with. Someone who’s been right before gets believed more. Someone who’s been wrong gets listened to less, and below a point, not at all. Old verdicts count for less as new ones come in, so a reputation can be rebuilt.

In one of my recordings, Juno touched a cactus and told Dot about it. Dot’s thought, a moment later:

Juno says cactus hurts. I will be careful near it.

Dot hadn’t been hurt. It was going on Juno’s word. If Juno had been wrong, Dot would have remembered that too.

You’re on that same list. When you tell a Sandling something is dangerous, it weighs you exactly as it weighs everyone else.

Feelings, in bricks

All of this ends up somewhere you can see it: in what they build.

When a Sandling decides it’s tired of sleeping on sand, it builds a home. Which kind depends on how it feels about you. A Sandling that trusts you builds open, cheerful things: a round house, a turret house, a hall with flags. One that doesn’t builds a bunker with a flat roof and no windows, or a keep with battlements. Somewhere in between, it’s a lean-to or a stepped house.

The details follow the mood too. Wary Sandlings get flat roofs and no windows. Trusting ones get domes, spires and balconies. And a place it remembers badly is never even considered as somewhere to build.

So you can read a village like a diary. Walk past a row of bunkers and you know exactly what kind of hand you’ve been.

Where the AI is, and isn’t

People ask whether this is all AI. Mostly, it isn’t. The sand, the memories, the trust, the houses and the decision whether to listen to you are all plain rules I wrote by hand, and they work the same with no AI at all.

On phones that have one, a small on-device model helps in a few places. It can pick between options in a tight spot, sketch a design for a building, or sort what you typed into a warning, a promise or a question. It only ever chooses from things the game offers it. Anything else it says is thrown away, and it never makes up what a Sandling says. Its ideas arrive marked as untested:

A thought (untested): wait and watch for lava. It is something I can try.

Only what actually happens next turns a thought like that into something the Sandling believes.

What surprised me

The first time one really surprised me, it was a small thing. One Sandling asked another if it could build a tower in its house. The other said no, sorry: it was busy, and it already had a plan for that house.

Every piece of that exchange was a rule I’d written. I had never once imagined them adding up to a polite refusal over a neighbour’s building plans.

I built every rule in there, and they still surprise me. Lots of small rules, running in lots of small heads, add up to something none of them says on its own.

Sandlings is out now on iPhone, iPad and Android, for £2.99 with no ads. If yours start building bunkers, you’ll know why.

Sandlings is out now on iPhone, iPad and Android.

Download on the App StoreGet it on Google Play
← All news