Spielerando

Build this kind of game

Build a puzzle where you push crates onto marked spots and can take moves back

Pushing crates on a grid has strict rules: one crate at a time, never into a wall, never pulling. A good version also tells the player when a level can no longer be won and lets them undo. Here is the core, small enough to read in one go.

Build a game where you tap in time with notes and are judged on how close you were

A rhythm game compares the time of each tap with the time of the nearest note and hands out a verdict. The pitfalls are tapping the wrong one of two close notes, notes nobody tapped, and a device that plays sound a little late. Here is the judging core.

Build a game where you run a small shop, set prices and watch the day's customers

A shop-keeping game is one decision per day, the price, and a result that follows from demand, stock and room for customers. The classic mistake is to reason from demand alone, and the best price is then not what the player earns most with. Here is the day calculation.

Spread pollution or happiness across the map without it growing or leaning

A factory should darken the air around it, fading with distance, and a park should do the opposite. Written the obvious way, the effect leans towards the side that is updated first, creeps out of the map edge or multiplies. Here is a spreading rule that stays even and keeps its total.

Make units walk around walls without squeezing through the corners between them

Soldiers that slip diagonally between two touching walls look like ghosts, and paths that change every time you click look like a bug. Here is a route finder for a square map that goes around corners the way people expect and gives the same answer every time.

Work out how far apart two hexagon squares are and which ones a blast covers

On a map of hexagons, measuring distance with the usual row and column numbers gives wrong answers, and a blast of radius two covers the wrong squares or too few. Here is the coordinate trick that makes distance, rings and blast areas simple and correct.

Make the hit chance shown on screen exactly the chance the game rolls

Nothing makes a tactics player angrier than a shot shown as 75 percent that misses again and again. Often the number on screen was rounded or computed differently from the one used for the roll. Here is how to build the chance once, with cover, flanking and distance, and use it in both places.

Show an income per second that does not jump around or turn negative when you spend

The little number next to the gold counter should tell the player how fast the city earns. If it is computed from the balance it falls below zero whenever they buy something, and if it looks at one second only it twitches. Here is how to read the speed from what was earned.

Click the right square on a map drawn as tilted diamonds

On a map drawn from an angle, the square under the mouse is not found by dividing the position by the tile size. People then click one square and select the neighbour, or select something when they click the sky above the map. Here is the conversion that picks the right square, also near the edges.

Find the exact moment two players' copies of a multiplayer battle stopped agreeing

In a game where every player runs the same simulation from the same orders, one tiny difference grows until the two screens show different battles. Here is a fingerprint of the game state, taken every tick, and a way to say at which tick the two sides first disagreed.

Show where a unit can really move when forests are slow and friends are in the way

The blue squares a player sees before moving must match what the game allows. Counting steps ignores slow ground, and treating friends like walls hides squares that are fine. Here is how to work out the reachable squares so the highlight never lies.

Work out what a base earned while the player was away, without cheating or going negative

When someone comes back after a day, the game must tell them what happened. A plain multiplication of time and rate gives piles above the storage limit, empty stores that go below zero, and absurd rewards after a clock change. Here is the calculation that stays honest.