Spielerando

State machines

Two buttons pressed in the same moment send the hero into the wrong state

When jump and attack arrive together, the result changes with whichever the game happens to read first, and sometimes the hero passes through two states in one tick. This entry shows how to make the outcome the same every single time.

Undo and redo while planning a city, with money that stays right

Planning a layout is easier when every placement can be taken back. Two things usually go wrong: money gets out of step with the buildings after a few undos, and a new action after an undo leaves a redo that makes no sense. Here is a history that stays consistent.

Two players flip the same lever together and it ends up unchanged

Each player pulls the lever once, the game flips it twice, and the switch looks as if nobody touched it. Or a late pull from an old picture of the room turns something off that should stay on. Here is how to word such commands.

Two players grab the same item in the same moment and both get it

On each screen the player was first, so each one walks away with the treasure, and later the game quietly repairs it by taking one back. This entry shows how one single winner is decided, fairly, and what the loser sees.

Both players order a move into the same square at the same time

When all orders are carried out together, someone has to lose a collision, and the answer must not depend on who happens to be listed first. Swaps, chains and units that stand still make the rules harder than they look. This entry gives a set that always settles.

A dead player watching teammates skips someone or stares at a corpse

After you fall, the camera follows a teammate. When that teammate dies or leaves, the camera should move on to the right next person, and stop cleanly when nobody is left. This entry shows the small trap in doing it with a shrinking list.

Poison hit twice: restart the timer, add time, or add strength?

Every game with burning, slowing or stunning has to decide what a second hit does to an effect already running. Choosing wrongly makes stun-locks, immortal enemies or effects that never matter. Here are the four choices and a way to keep each one in check.

A hidden scout that is spotted only after being watched for a while

Hiding units are fun only if the enemy has fair ways to find them. A sharp-eyed guard who spots you in one frame is no fun, and one who never does makes hiding a cheat. This entry covers the two ways cover is lost and how long it stays lost.

A wave or event that fires every time the condition flickers

Scenarios say things like: when the town reaches a certain size, the raiders come. If the town hovers around that size, the raiders come again and again, or never. This entry shows how to separate a condition being true from the moment it became true.

Chain-stunning an enemy forever, and how to stop it without feeling unfair

If stuns just add up, a team with two stunners wins every fight before the other side moves. If stuns are simply blocked, players feel cheated. The usual answer is that each stun hurts less than the last, but the clock that resets this is easy to get wrong.

An army cut off from supply weakens, and one tile of road must not heal it

Supply lines give war games their shape, but a clean on-off rule can be played: touch a depot for one moment and all the hunger is forgotten. This entry shows how to make being cut off cost something, and recovery take as long as it should.

A shared combo meter that one player can farm alone or that never builds up

Co-op games love a chain that grows when the team hits together. The hard parts are who is allowed to keep it alive, when it breaks, and making teamwork worth more than one person's button mashing. Here are rules that hold up.