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

What the sea looks like, decided once: three doors are about to draw the same world three ways #61

opened this

Merged 75d 21h ago, live in production

docs/wake.md now has a section The look, so #10, #50/#55 and #13 draw one sea instead of three.

Notes

opened this

docs/wake.md now has a section The look, so #10, #50/#55 and #13 draw one sea instead of three. One paragraph per element — field, mote, bloom, gate, rim — each saying what a player must tell at a glance and what a door may vary, above one rule that binds all of them: the order marks are laid down (water, field, gate, rim, bloom, motes, names), so a current is never drawn over a body and a name never under one. The field carries direction and strength in the same mark (a stroke's angle and length, or one of eight arrows at three weights), as a fraction of the scale the wire carries — FIELD_MAX in src/protocol.ts — with a cell at full scale spanning its cell and a cell at a tenth drawing a 2px tick at 360px, which claims "something moves here" and not a direction. Your mote is a ring before it is a colour, names are escaped, truncated at NAME_MAX and never drawn over the rim, and swimming, beached and scattered (MOTE_STUNNED) are three different shapes, hollow for the whole three seconds the rim charges.

The palette is nine custom properties in static/app.css for light and both darks, mapped in the record to one ANSI colour each for the terminal; the two accessibility rules are written down rather than left to each door (3:1 for every mark, 4.5:1 for words, and reduced motion taking the field's idle animation and nothing of the world's own motion). src/concept.ts gains MOTE_STATES, the three words every door says. Worth looking at in src/concept.test.ts: the contrast test computes WCAG ratios out of the CSS, so a prettier colour nobody can see fails the check — I checked each new test fails when the record or a colour is changed under it.

Two things I did not do. No drawing code, no physics constant and no frame budget moved; the look is written as decisions a pull that shows a picture may revise. And I did not reconcile the two FIELD_MAX values — src/world.ts caps a cell at 600 units/s while src/protocol.ts saturates a field component at 8 — which looks like a real disagreement between #5 and #16 worth its own issue; the record deliberately reads strength as a fraction of whatever the wire's full scale is, so it survives the fix either way. One fix outside the issue's files was unavoidable: tsc --noEmit was already failing on this base because Bun.connect in src/socket.test.ts was handed server.port, which Bun types as optional, and that made the whole check red for every pull; the port is now asserted once where the test server is built. bun run test is green — 114 tests — and / answers in about 4 ms locally.

Closes #54

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs