Files
nagi-bench/outputs/claude-opus-4-8/claude-code-max/dust2-arena/README.md
T
Jesse ZhangandClaude Opus 4.8 cbfce3b7cc feat: add cs-dust2 React case with two model takes + react kind support
New case cs-dust2 (kind:react): a from-scratch React + three.js 5v5 Dust2 FPS.
Two takes registered: Claude Fable 5 / Claude Code / High (with a hand fix for a
64Hz fixed-step firing bug on high-refresh displays) and Claude Opus 4.8 /
Claude Code / Max (dust2-arena, one-shot). React cases commit source only; the
single file is built from source at deploy time. validate-data.ts now accepts a
React project directory as the declared artifact. AGENTS.md rewritten
English-only with React-case, bare-harness (no skills/plugins) and
artifact-anonymity rules.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 00:08:28 +01:00

65 lines
2.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Dust II Arena
A from-scratch **5v5 first-person shooter prototype** recreating the core areas of
Dust2, built with **React 18 + TypeScript + three.js**. No external assets: the map,
characters and weapons are procedural geometry, and every sound is synthesized with
the Web Audio API. The only third-party libraries are `three`, `react` and
`react-dom` — pathfinding, physics, the AI state machine, the render loop and the
round/economy logic are all hand-written.
## Run
```bash
bun install
bun run dev # http://localhost:5173 — click the arena to lock the mouse
```
Build a static bundle with `bun run build` (output in `dist/`). A prebuilt,
fully self-contained single file is also included as `dust2-arena.html`.
## Controls
| Action | Key |
| --- | --- |
| Move / Jump / Walk | `WASD` / `Space` / `Shift` |
| Fire / Scope (AWP) / Reload | `Mouse1` / `Mouse2` / `R` |
| Primary / Secondary / Knife | `1` / `2` / `3` (or wheel) |
| Swap primary ⇄ AWP | `B` |
| Plant / Defuse / Pick up C4 | hold `E` |
| (dead) Switch spectated teammate | `Mouse1` / `A` / `D` |
| (dead) Take control of teammate | `F` / `Space` |
## What it includes
- **Map** — T / CT spawns, A Long, A site, Mid (with passable doors), Catwalk,
B tunnels and B site, laid out on a connected tile grid with full wall + crate
collision.
- **Characters** — box-built humanoids (separate head, torso, arms, legs), CT blue
vs T tan, in a weapon-holding pose.
- **Weapons** — AK-47, M4A4, AWP (right-click scope), Glock / USP / Desert Eagle,
and a knife, each with distinct damage, recoil, spread, magazine and reload.
Hitscan with per-zone hitboxes (head = 2× body) and armor mitigation.
- **Rounds** — pistol-round opening, then rifle buys; C4 carry / drop / plant /
defuse and full round resolution (elimination, detonation, defuse, time).
- **AI** — 9 bots navigate with grid A*, spot enemies through line-of-sight, fight,
and push the plant / rotate to defuse.
- **Death spectating** — when you die you watch a living teammate in first person,
cycle between teammates, and can take control of one (it stops being AI-driven).
- **HUD** — dynamic crosshair, health / armor, ammo, killfeed, round + bomb timers,
and a live Dust2 minimap. Procedural audio for guns, reloads, footsteps, scope,
hits, C4 and kills.
## Layout
```
src/
main.tsx, App.tsx, styles.css
components/ GameCanvas, Hud, Minimap, Menu
engine/
grid.ts dust2.ts navmesh.ts collision.ts # map + spatial systems
weapons.ts combat.ts # weapon data + hitboxes
world.ts ai.ts player.ts input.ts # simulation + control
scene.ts effects.ts entities/ # three.js geometry
audio.ts store.ts constants.ts types.ts # sound, HUD bridge, config
```