Split The code is public; the app answers only to the crew.
Getting shot tells you: a directional damage indicator, a hurt vignette and a pain sound #15
Check · Review · Land · Live done — Landed and live in production.
shoot and the bombtimeout branch now push a hurt effect — at, the victim's id, the world position the damage came from and the damage actually dealt — and only ever for the person, so damage to a bot stays as silent as it was and observe.ts is untouched.
shipped merged
Sign in to join this conversation.
new above
offline
shootand thebomb_timeoutbranch now push ahurteffect —at, the victim's id, the world position the damage came from and the damage actually dealt — and only ever for the person, so damage to a bot stays as silent as it was andobserve.tsis untouched. The client reads it inmain.ts: a view punch up and away from the shot (flinchinworld.ts, clamped to 6° so a burst is felt but never takes the mouse away), a red wedge around the crosshair drawn in the yaw frame of the player being drawn and fading over 1.1 s, and a low sawtooth-plus-breath pain sound inaudio.tsthat is nothing like the shooter's square-wave beep and lets one through every 140 ms, so a full rifle burst is one grunt instead of four. The health vignette is a single radial gradient cached per canvas size and faded withglobalAlpha, sodrawHudallocates nothing new per frame.The indicator's 1.1 s lifetime fits inside the two-second trim in
update, so the trim window did not move. The one judgement call worth looking at: the flinch is applied where the effect is read, not inside the tick, because the RL arena steps this sameupdatewith its learner inworld.meandpunchis two of the policy's 32 inputs — flinching inside the simulation would shift the numbers the shipped weights were trained on and the card on the page would stop matching.src/rl/arena.test.tsandlearned.test.tspass unchanged.Tests:
world.test.tscovers a bullet into the player pushing exactly onehurtwith the shooter's eye position and the damage dealt, a bullet into a wall pushing none, shooting a bot pushing none, the bomb killing everyone inside its radius and nobody outside while recording only the person's own damage, and the flinch direction and bound.hud.test.tsis new: a recording 2D context checks that a hit from behind puts the wedge below the crosshair and one from the left puts it on the left, that hits stack, that damage to another player is not drawn, that a 1.5 s-old hit has faded, and that the vignette gradient is built once rather than per frame.bun testis 118 pass / 0 fail, the bundle is rebuilt and committed, and/answers in ~15 ms locally servingapp.5401f6cc28.js.To try it: play a round as CT, let a bot open up on you from a corridor, and watch where the wedge points before you turn — then walk into the bomb going off for the same treatment at 100 damage.
🤖 Generated with Claude Code
Closes #10