# NEONSTRIKE — ray-traced arena FPS with online multiplayer Fast-paced CS-style shooter where the entire frame is ray traced in a WebGL2 fragment shader. No triangles are rasterized: every pixel casts a primary ray against the analytic scene (level AABBs + multi-sphere humanoid characters), then shadow rays, ambient-occlusion rays, and up to 3 reflection bounces. Per-map themes tint the sky, fog, haze, and neon emissives. ## Run ```bash cd app && npm install && npm start # serves game + WebSocket rooms on :3002 ``` Or launch from the AI Archives hub, which starts it automatically. ## Game - **Maps**: pick on the main menu. - **VECTOR** — neon night three-lane arena (mid + long A + long B), two sites. - **FOUNDRY** — ember-lit furnace hall, raised central platform, ring corridor. - **CANOPY** — violet dusk rooftops: islands, bridges, a lower street level. - **Solo**: CS rounds vs bots — buy phase → live → end, first to 8. Economy: $800 start, +$300/kill, +$3250 win, +$1400 loss. - **Multiplayer**: free-for-all deathmatch, first to 15 kills. Create a room, share the 4-letter code, friends join from the MULTIPLAYER menu. The Node WebSocket server is authoritative for damage, kills, scores, and respawns; clients hit-test locally and report, positions sync at 15 Hz with interpolation (on a timer, so backgrounded tabs keep syncing). TAB shows the scoreboard. - **Characters**: humanoid sphere rigs (head, emissive visor, torso, hips, gun hand) with per-player tint colors, fully ray traced like the world. - **Bots**: waypoint-graph patrol, distance + view-cone + ray-traced LOS spotting, reaction delay, strafing return fire. 4 difficulty tiers. - **Settings** (Esc): 36 options across graphics (resolution scale, RT bounces, shadow mode/samples, AO, fog, frame cap…), audio, controls, crosshair (style/size/gap/color/dynamic), game (bot count, difficulty, radar, damage numbers…). Quality presets potato→ultra. Persisted to localStorage. Everything is generated at runtime: textures are procedural GLSL (triplanar brick/planks/brushed metal/hazard), all 21 SFX are synthesized Float32Array DSP (verifiable headlessly), the ambient loop included. ## Visuals - **Ray tracing**: primary + shadow + AO + reflection rays per pixel; characters are sphere/capsule rigs intersected analytically, with walk-cycle limb animation driven by movement. - **HDR bloom**: the scene renders linear HDR to a half-float framebuffer; a bright-pass + separable gaussian blur (quarter res) builds the glow and a composite pass applies ACES tonemapping and vignette. Off/low/high setting. - **Blender Cycles assets** (`blender/`): all 7 weapons are modeled procedurally in Python and path-traced into transparent viewmodel sprites and buy-card art (`assets/weapons/`); each map is rebuilt from its real geometry and rendered as an isometric diorama for the map picker (`assets/maps/`). Re-render with: `blender -b -P blender/weapons.py -- app/public/assets/weapons` - **FX**: 3D impact sparks with gravity, muzzle flash anchored to the sprite barrel, inertial weapon sway, nebula sky with theme-tinted haze. ## Playtest `test/playtest.mjs` runs the real game in headless Chrome (SwiftShader WebGL2) and verifies: 1. boot with zero JS errors 2. menu + 5 in-game vantage screenshots (pixel variance, not-black, sky≠floor) 3. every procedural material renders a distinct swatch 4. every SFX buffer has sane duration/peak/RMS 5. gameplay: hitscan damage, ammo, bot navigation, bots engaging the player, round win on elimination, money payouts, buy-phase purchase flow 6. settings: bounces visibly change pixels, resolution scale resizes the RT target, persistence 7. perf snapshot per quality preset (software-rendering floor) 8. maps: all three render, are >90% pixel-distinct from each other, bots navigate each; character close-up renders 9. multiplayer: two real browser clients — create room, join by code, see each other, cross-client hit applies server damage, kill credits the scoreboard, victim respawns at full hp ```bash cd test && npm install && npm run playtest ``` Latest result: **86/86 checks passed** — see `playtest/report.md` and screenshots in `playtest/`.