Spielerando

Nature and effects

Learning paths through this topic

Make a candle flame bend when a door opens and blow out if the draught lasts

When a door opens in a dark house the flame should react, and a short gust should not put it out while a long one should. Done badly the flame slides sideways like a sticker or snuffs out by chance. Here is how to give it weight, a limit, and a fair memory of the draught.

Change how fast something sways or waves without it jumping

When the wind picks up, grass, water and flags should sway faster. The obvious change, a new speed in the same formula, makes everything jump to a different spot in its swing at that instant, and the longer the game has been running, the bigger the jump. Here is how to speed up smoothly and why.

Let clouds drift in layers and loop around without ever popping in view

A calm sky behind a puzzle is mostly clouds crossing slowly. The trouble starts at the edge: a cloud that jumps back to the other side while still half visible, wide clouds that vanish early, and drift that reverses badly when the wind changes. Here is a loop that wraps clouds exactly when they are out of sight.

Show breath in the cold, one puff per exhale, faster when the character panics

Visible breath says cold and fear without a word. The usual trap is a puff on a fixed timer that does not match the chest, or one that jumps whenever the breathing speeds up. Here is how to keep every puff tied to a breath, so a sudden fright speeds it up smoothly.

Make a bigger combo throw more confetti without choking a phone

A long chain should feel like a party, but a phone that already carries sparkles from the last few moves stutters when the next burst piles on. Here is how to let the celebration grow with the chain, stay inside what the device can draw, and still look generous when it has to hold back.

Grow a plant while the player is away and let it wilt if it runs dry

In a garden game the plants should be further along when the player comes back after hours or days. But a plant only grows while the soil holds water, and it should not die before the player had a fair chance to return. Here is a calculation that gives the same answer however often the app is opened.

Make a bird flap and glide in a natural rhythm that follows its height

A bird that flaps forever looks like a toy, and one that only follows a sine wave in the sky looks like a drifting cut-out. Real birds climb with a few beats and then coast down. Here is the small rule that gives the rhythm and sets the proportion of flapping to gliding by itself.

Make a flock of crows burst into the air in a wave, not all in the same frame

When the player steps into a field of crows, birds that all take off in the same instant look like one object being deleted. A real flock goes up in a ripple: the nearest bird first, then the alarm runs through the rest. Here is how to get that ripple and the starting times to use.

Blow dandelion seeds away so light ones drift and heavy ones fall

A tap on a dandelion should send seeds floating off with the breeze. The easy way to make them follow the wind gives different flight paths on a fast phone and a slow one, and every seed ends up in the same place. Here is a way to get one path per seed that is the same everywhere and still varied.

Work out sunrise and sunset for a northern story, including nights that never end

A tale set in the far north has weeks of endless daylight and weeks of endless dark, and a day-night cycle that always gives twelve hours each cannot show them. The usual formula also breaks right where this gets interesting. Here is how to get day length from the place and the date, and what to do when the sun never sets.

Change the sky and light colours through the day, also across midnight

Fading between a few colours for morning, noon, evening and night sounds simple, until the blend goes muddy grey in the middle, jumps at midnight or breaks when the clock is set backwards. Here is a clock-to-colour rule that avoids all three.

Make a fruit fall from a tree, bounce a few times and then lie still

Shaking a tree should drop fruit that hits the ground and hops. With a naive bounce the fruit keeps trembling on the ground forever with tiny hops, or sinks into the floor, or never settles at all. Here is a bounce with a clear end that is exact at any frame rate.