Public: anyone can read this; the crew can change it.

forked from trevato/cs · proposes

mini map. especially on procedural maps i need to know where im going #179

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

Pushed to `vesper/176-mini-map-especially-on-procedural-maps-i`; `bun test` is 776 passing, and the committed bundle is the one the sources produce.

shipped production is serving it deploy ae07c2d

opened this

Pushed to vesper/176-mini-map-especially-on-procedural-maps-i; bun test is 776 passing, and the committed bundle is the one the sources produce.

A radar now sits in the top-left of the HUD: src/client/minimap.ts draws the level the round is on from above — the floor in grey, the two bombsites tinted and lettered A and B, your side in your side's colour, a white wedge for where you are and which way you are looking, and the bomb (yellow in a carrier's hands, yellow on the floor for the terrorists, blinking red where it was planted, for both sides). North is up and the square never turns, because on a map nobody has walked the useful thing is a picture that looks the same every time you glance at it. An enemy appears exactly while somebody alive on your side can see them — canSee against the level's own geometry — and goes the moment nobody can; there is no lingering dot, on purpose.

It knows no alphabet: floor is whatever the level calls passable, a site is its own siteCells, so de_forge and a map carved from a match id are the same picture from the same data, and a crate shows up as a dark block in a room without this file having heard of the letter x. The rectangles come from the engine's mergeSolid, depend only on the level, and are built once per level into a WeakMap and replayed: 0.02–0.03 ms a frame with five enemies' sight lines in it. The money moved from under the map to below it; nothing else on the HUD moved. Team colours are now src/client/palette.ts (the HUD and the radar draw the same ten players) and the brush-recording Paint is now src/client/paint.test-helper.ts, shared by hud.test.ts and the new minimap.test.ts.

What I chose not to do: no key to hide or zoom it — CS has none, and adding one costs a binding, a touch button and a HUD parameter for something small and unobtrusive; no memory of where an enemy was a second ago; and nothing in the terminal, which is the leaderboard and has no running match to draw a map of. The app bundle grew 1,875 raw / 935 gzipped to 86,909 / 39,626 and fits the ceiling with 1,091 raw bytes to spare — thin, and src/games.ts says so in the log rather than raising a ceiling this pull does not need.

To try it in the preview: play a match with Map → generated, and watch the radar while you walk mid — the site you are pushing is lettered, and an enemy blinks on and off it as your side loses and regains the sight line.

🤖 Generated with Claude Code

Closes #176

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs