Build a Tarkov-style single-file Three.js FPS with raid loop
Session from tarkov-customs-trajectory on Hugging Face by INONONO · MIT · condensed by Coders Talk
Create a fully playable, bug-free single-HTML Three.js FPS clone of Escape from Tarkov's Customs map, with procedural assets only, gun customization, and a full spawn/loot/fight/extract raid loop.
- +0Prompt · +0Build a full Tarkov Customs-style 3D FPS as a single HTML file: Three.js from CDN only, no asset files, procedural geometry/audio, gun customization, and full raid loop (spawn, loot, scav AI, extract).
- +11mAgent did · +11mBuilt the game from scratch as modular JS/HTML source files (head, core utils/audio, weapons/mods, world builder, Customs map geometry, player controller, scav AI, game/FX, menu/profile) then concatenated them into one customs.html.
- +40mAgent did · +40mWrote a Playwright-based headless test harness (test.mjs) to load the game in a real browser, drive the player, and check for runtime errors and mod stats.
- +44mFail · +44mHeadless run threw a pointer-lock error ('root document not valid for pointer lock') that broke deterministic driving of player movement, especially on stairs.
- +45mAgent did · +45mDebugged extensively with custom dbg.mjs scripts and pixel sampling: fixed pointer-lock stub, switched test to fixed-step manual updates, then chased a black-screen rendering bug through camera/scene/material/texture checks until FOV/scope logic was fixed.
- +59mFail · +59mTest suite reported FAIL on loot interaction: pressing F on a wooden crate didn't open it or add the expected items to inventory.
- +1h 0mAgent did · +1h 0mRepositioned a parked scav in the test script so it stopped blocking the loot interaction, then reran the full suite to ALL PASS including a 180s AI soak test.
- +1h 9mFail · +1h 9mLater runs turned up more test failures: a door-walkthrough check failed on position, and the extraction test found weapons/stash counts didn't match after extracting.
- +1h 9mAgent did · +1h 9mAdjusted the test assertions and scav-removal logic to match actual game behavior (killing scavs properly, correct expected weapon/stash counts), then reran until every check passed with no console errors.
- +1h 12mOutcome · +1h 12mShipped customs.html, a 193 KB single-file build (Three.js r160 + procedural everything) with a full raid loop, ~175 loot containers, 15+ scav AI, weapon modding, and a passing headless Playwright test suite.
I'd start the same way — one big spec prompt covering geometry, audio, customization and the full raid loop — since the agent could carry that end-to-end without hand-holding. What actually moved things forward wasn't me correcting it (I never had to step in), it was making the agent build its own Playwright test harness and debug scripts, which caught the pointer-lock bug, the black-screen rendering issue, and the broken loot/door/extract checks that a purely visual pass would have missed. Next time I'd ask for the headless test harness up front instead of after the first build pass, to catch these earlier.