Now the unit definitions and default scenario:
Now the audio module (synthesized SFX for juice) and high-score storage:
Now a shared rendering module (used by both the editor canvas and the play engine):
Fixing a coordinate-conversion bug in screenToWorld (must use device pixels and the clamped camera):
Now the Editor screen (the Eden-style scenario editor):
Now the Play screen with HUD, pause, and game-over overlays:
Now the ScoreTable and StartScreen components:
Now the App state machine, styles, and index.html title:
Build works — fixing the CSS import order warning, a leftover line in the editor, and adding a guard so Quick Play always has a valid scenario:
One final gameplay tweak — make rushers aggro from the start so the action reaches the player within seconds of pressing Play:
Build is clean. EDEN OPS is ready — a full Arma 3 Eden-editor-inspired tactical sandbox that ships with a playable demo op so you're in combat within seconds.
What I built
🎬 Start screen — Animated live-terrain background with patrolling units, "Quick Play" (instant demo scenario) vs "Scenario Editor," the local high-score table, control cheat-sheets, and a mute toggle.
✎ Eden-style editor (EditorScreen.tsx)
- Asset browser sidebar with three categories: BLUFOR (Rifleman / Autorifleman LMG / Marksman DMR), OPFOR (Rifleman / Rusher / Heavy MG), and props (boulders, sandbag cover, explosive fuel barrels, medkits)
- Tap to place with a ghost preview, drag any unit to reposition, tap to select
- Inspector panel with unit stats, "★ SET AS PLAYABLE" toggle for BLUFOR units, and delete
- Validation (needs a playable + at least one hostile), Clear / Demo reset, keyboard shortcuts (Esc, Del, P, Enter), and a glowing ▶ PLAY button
▶ Play mode (engine.ts — a self-contained 60fps canvas engine)
- Twin-stick combat: WASD/arrows + mouse aim + click/space fire on desktop; dual virtual joysticks (right stick auto-fires) on touch
- Arma-style team switch: every unit you marked playable can be swapped with Q/Tab (or the ⇄ touch button) — and when your character dies, control jumps to the next playable instead of instant game over
- Faction AI: rushers charge from the start, gunners strafe and keep range and lead their shots, your BLUFOR squadmates hold position and return fire
- Juice everywhere: screen shake, hit-stop on kills, muzzle flashes, tracers, shell casings, blood/spark particles, knockback, scorch decals, damage floaters, hurt vignette, low-HP pulse, recoil, and synthesized WebAudio SFX (shots, explosions, combo pings, victory/defeat stingers)
- Exploding barrels with AoE, medkit pickups, sandbag/rock cover that blocks bullets
🏆 Scoring & states — Kill points scaled by unit type × a 3-second combo multiplier, speed-clear victory bonus, pause overlay (Esc/P), victory ("AREA CLEAR") and defeat ("K.I.A.") screens with stats, an instant restart (R/Enter), and a persistent top-8 localStorage high-score table with new-record highlighting.
Performance is kept smooth via a single canvas, pre-rendered terrain, capped DPR, particle caps, and throttled React HUD updates.
Files built: src/game/types.ts, src/game/defs.ts, src/game/audio.ts, src/game/highscores.ts, src/game/render.ts, src/game/engine.ts, src/components/EditorScreen.tsx, src/components/PlayScreen.tsx, src/components/ScoreTable.tsx, src/components/StartScreen.tsx, src/App.tsx, src/index.css, index.html