← back to projects
Web game · puzzle-stealth

The Map Lies

“The map always lies. The only question is about what.” A grid-based puzzle-stealth game where the minimap you rely on is deliberately wrong – and every level is mathematically guaranteed to be solvable without guessing.

Installable as an app on Windows, Mac, Android, iPhone and iPad, and playable offline. Hebrew by default, English one click away.

Type
Puzzle-stealth web game
Stack
React 19 · TypeScript · Vite
Levels
5 hand-made + endless procedural
Verified
500 generated levels per test run
Level 5: the lantern lights the tiles around the player while the angry minimap glows red

the idea

How it plays

You crawl through a pitch-black dungeon with a lantern that lights only the 3×3 tiles around you. A minimap in the corner shows the whole level – but it hides one or more deliberate lies. Compare what the lantern shows with what the map claims, and click the tile to call out the lie.

What makes it work

  • Catch every lie and the fog lifts and the map “confesses”
  • Disguised traps punish players who trust the map blindly
  • From level 5 the map gets angry: it glitches near an uncaught lie, but never says where
  • All sound is synthesized live with the Web Audio API – no audio files

five kinds of lies

Lie
The map says
Reality
Phantom Wall
Wall
Open floor – often a hidden shortcut
Illusion Floor
Open path
Solid wall, a dead end
Disguised Trap
Safe floor or a treasure chest
A lethal spike trap
Fake Exit
Exit in room A
The real exit is in room B
Relocated Treasure
Chest in room A
The real chest is in room B

the level generator

Every endless-mode level comes from a seeded random generator, so the same seed always builds the same dungeon. One attempt runs five stages:

Carve

A recursive-backtracker maze on odd coordinates.

Open up

Knock out ~10% of walls for loops, then carve 1–3 rooms.

Place

Exit on the safe tile farthest from the start, by BFS; chests in dead ends.

Inject lies

Draw N lies, spaced apart and away from the start.

Validate

Accept only if every rule passes; otherwise retry with the next seed.

zero-guessing validator

The hard part of a game built on lies is fairness: a player must always be able to deduce a lie, never guess it. Every level – generated or hand-made – must pass five invariants, all checked with BFS on the true grid:

R1 · ReachabilityA trap-free path from start to the real exit always exists.
R2 · ObservabilityEvery lie is inside the lantern’s view from some reachable tile.
R3 · No blind stepsEvery trap is visible one step before you could stand on it.
R4 · DeducibleEach lie creates a contradiction the player can actually see.
R5 · BookkeepingMap and truth differ only at declared lies – no accidental ones.

proof, not hope

500
generated levels validated on every run (100 levels × 5 seeds)
~0.5 ms
average generation time, under 10 ms worst case
≤ 3
attempts any level has ever needed
0
runtime dependencies besides React

key insights

Fairness has to be provable

A game about lies is only fun if the lies are fair. Writing the rules down as invariants turned “feels fair” into something a test can check.

Generate, then validate

Instead of a generator that is clever enough to never fail, a simple generator plus a strict validator and retry is easier to trust and to change.

Test the tester

Feeding the validator broken levels on purpose proves it actually catches the problems it claims to.

Seeds make bugs reproducible

Because every level comes from a seed, any strange level can be replayed exactly with ?seed= and ?level=.

tech stack

React 19TypeScriptViteTailwind CSS v4Web Audio APIPWA & service workerBFSSeeded PRNGGitHub ActionsGitHub Pages
← previousyakov.LLM next →Bomberman

get in touch

Questions about a project, the code or the way it was built? I'm always happy to talk about it.