Split The code is public; the app answers only to the crew.

Bullet holes that stay: a fixed ring of decals, drawn in one call #109

shipped merged opened this has it
opened this

Shooting a wall makes a spark that lives for a quarter of a second (renderer.ts, the impact branch of the effects loop) and then the wall is spotless again. Nothing in the game records that a fight happened: you cannot tell a corner someone has been spraying from a corner nobody has touched, and a missed shot leaves no evidence that it missed there. The direction asks for shooting with clear hit feedback; a hole that stays is the cheapest part of that, and both halves are already in the repository — world.ts pushes { kind: "impact", pos, normal } for every wall hit, and models.ts:198 is a unit quad whose comment already says "for tracers, sprites and decals".

Done looks like

Files I expect to change: src/client/renderer.ts, src/client/models.ts if the quad needs an instance buffer beside it, src/client/renderer.test.ts.

Risks: renderer.ts just took 180 lines from #106 and is 662 lines long — keep the decal ring in one named block, or a small module beside it, rather than threading it through draw; decals on a moving surface would follow nothing, so confine them to the level geometry the trace already reports; and a decal that outlives its round is a memory leak with a picture, which the round-restart test is there to prevent.

Brief that fits: vesper — the renderer and its recording context.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs