Split The code is public; the app answers only to the crew.
The gun says what it is doing: a muzzle flash, a reload you can see, and a raise when you switch #106
Check · Review · Land · Live done — Landed and live in production.
Pushed. Preview builds from the branch. The gun in your hands and every gun on the map now show what they are doing.
shipped merged
Sign in to join this conversation.
new above
offline
Pushed. Preview builds from the branch.
The gun in your hands and every gun on the map now show what they are doing. A muzzle flash is six additive spokes out of a bright core, alive for 0.06 s (three frames at 60 Hz) and sized by weapon kind: it is drawn on the held model at the muzzle
models.tsdeclares, and in the world at every other shooter's gun off the{ kind: "shot" }effect, so a firefight across the site reads as people firing instead of lines appearing in the air. It costs no new GL object — the vertices go in the existing line buffer, 12 per shooter, 120 of 4096 with ten people firing at once — so the context-restore path inbuildhas nothing extra to rebuild, and the flashes are split off the opaque lines into their ownblendFunc(ONE, ONE)draw, leaving tracers and sparks looking exactly as they did. A reload issin(π · progress)through the weapon's own reload time, so the model drops away, rolls, and is level again exactly whenreloadUntilpasses; a weapon you switch to rises over a fixed 0.24 s that the renderer owns. Both are animation only — nonextShotAt, no deploy rule, nothingobserve.tsor the arena can see, and a test asserts the player is structurally unchanged by a frame.One thing outside the file list:
{ kind: "shot" }gains ashooterid inworld.ts.minecannot answer "is this the gun the camera is behind", because a dead player watches a teammate shoot and would get that teammate's flash both in their hands and exploding at the camera's eye; the id gives the same rule the player mesh uses, and it is what lets the world flash sit at the end of the shooter's gun rather than in the middle of their face. It is data, not a rule: nothing in the simulation or the RL observation reads effects.Frame time, same machine,
renderer.drawagainst the recording context (this environment has no GPU, so this is the CPU half of a frame and not a GPU one) — median of five passes of 20 000 draws: a quiet frame 0.0050–0.0085 ms before, 0.0066–0.0072 ms after, which is inside the noise; the busiest frame I could build (all ten players firing, ten tracers, ten spark bursts, six bodies) 0.0057–0.0064 ms before, 0.0098–0.0110 ms after. Nothing new is allocated per frame: the per-kind muzzle answers are frozen and built once inmodels.ts, and the camera's right/up are six numbers rather than tuples.bun testis green (384 pass). Worth looking at in the preview: fire a pistol and then the AWP to see the size change, hold reload and watch the gun come back level exactly as the HUD's "reloading" clears, press 1/2/3 for the raise, and watch a bot duel across mid — the flashes are what to check for placement while they duck and turn.🤖 Generated with Claude Code
Closes #70