About

Paranoia — four ghosts hunt you four different ways, and working out which one is which is the whole game. Built from scratch in vanilla JavaScript: no frameworks, no build step, no dependencies. It installs to your home screen and plays fully offline.

Eat everything

There are 244 things to eat: 240 dots worth 10 each, and four large energizers worth 50. Clear the board and the next one starts, a little faster. You have three lives, and a fourth at 10,000 points.

The four ghosts are four different programs

This is the part worth knowing. All four ghosts move by exactly the same rule — at every junction, take the turn that ends up closest to my target tile, and never turn back on yourself. Everything that makes them feel like characters comes from the single question of where that target is:

Scatter and chase

The ghosts do not hunt continuously. They alternate between chasing and scattering to their own corners, on a fixed schedule that gets more hostile each level: seven seconds of relief early on, then five, then effectively none. When the phase changes every ghost reverses on the spot — which is both a warning and an opportunity.

Eating an energizer turns them blue and edible, worth 200, 400, 800 and 1,600 for the first, second, third and fourth caught on the same energizer. That is 3,000 per energizer, 12,000 a board, and it is most of a good score. The blue time shrinks every level and by level 17 there is none at all — the ghosts still turn around, but they never become edible again.

Two details that decide games

Red also gets faster as the board empties — twice per level, at thresholds that arrive earlier the further you get. Late in a level he is quicker than you and no longer scatters at all.

Controls

On a touchscreen, swipe anywhere on the board or use the D-pad. Turns are buffered: press before the junction and the turn happens as soon as it is legal, so you never have to be frame-perfect at a corner.

Settings

Starting level changes where you begin — later levels are faster with shorter scatters and less blue time. It applies to your next game, because it changes what a score means.

Modern ghost AI is off by default, and that is deliberate. The original had two arithmetic bugs in how Pink and Cyan look ahead: when you face upward, their target also shifts to the left. Those bugs are the reason several well-known safe spots exist. Turning this on corrects the arithmetic — the ghosts then read your direction honestly, which is harder, and none of the classic patterns work any more.

Notes

The maze is written out as text in the source, one character per tile, and checked on load: 28 by 31, exactly 240 dots and 4 energizers. The ghosts' target selection is a pure function of integers with no randomness in it at all, which is why the same situation always produces the same chase — and why it can be tested to the letter.

Scores are yours: local ones stay in this browser, and the global board only ever sees a name and a number.

Play