Environment is ready. Now I'll build VOIDRAID — a River Raid-inspired vertical space corridor shooter. Starting with the HTML shell (title + arcade fonts).
Now the game's foundational modules: seeded PRNG utilities, shared types, and a synthesized Web Audio sound engine (no audio assets needed).
Now the procedural world generator — the heart of the River Raid-style corridor:
Now the core engine — game loop, physics, collisions, states. First a small types extension for special particles:
The engine needs its renderer module (next step). Let me first fix small issues — unused field, orb velocity math, and proper per-second fuel refueling:
Now the renderer — all canvas drawing: nebula backdrop, parallax stars, asteroid walls, entities, ship, particles:
Now I need to expose the run seed so wall boulders stay deterministic per run:
Now the React game host — canvas mount, keyboard/touch input, HUD, and menu overlays:
Now the App shell — page layout, mission briefing, progression/tech panels, plus an ambient nebula backdrop for the page:
Now let me verify the build:
Build succeeds. Now a critical review pass — I found a coordinate-direction issue (world +y must be forward/up-screen) plus several gameplay logic fixes (fuel-death bypassing invulnerability, comet culling, gate-warning correctness). Fixing the engine first:
Now flip the comet velocity in world.ts so they streak toward the player from ahead:
Now remap the renderer to the corrected screen-space convention (world +y → up-screen):
Small UX fix — blur menu buttons after click so Space doesn't re-trigger them during play:
Rebuilding to verify all the fixes type-check:
Final robustness pass — guard localStorage access for sandboxed environments, and confirm the entry point:
Build is green. VOIDRAID is complete — a River Raid mechanics study transplanted into deep space, running as a single self-contained web app.
What was built
Gameplay loop (River Raid core, adapted)
- Vertical corridor navigation — an infinite "void channel" scrolls downward past your gunship. Steer laterally with inertia (◄ ► / A D), modulate throttle (▲ ▼ / W S), and hold SPACE / Z to fire the nose cannon.
- Procedurally generated hazards — asteroid walls and clusters, cross-channel Intercepter drones, sentry mines that track and fire plasma, high-velocity comets, and island rocks that force route choices.
- Fuel management — fuel burns continuously (faster throttle = faster drain). Fly through amber fuel depots to siphon, or shoot them for 80 pts and lose the refill — the classic River Raid tradeoff. Empty tanks kill, even through respawn grace.
- Warp gates — each sector ends at a bridge-analog gate spanning the channel; destroy its 3-HP core to detonate the beam and pass. Colliding with the beam kills.
Technical architecture
- React + Vite + Tailwind shell; game runs in a
requestAnimationFrame, dt-clamped loop on Canvas 2D at a logical 480×720, DPR-scaled for crispness.
- Deterministic world gen — corridor geometry and entity placement are pure functions of
(runSeed, rowIndex) via mulberry32 hashing, giving infinite levels, zero level data, and trivial checkpoint respawns.
- 100% synthesized audio — Web Audio oscillators/noise for engine hum (pitch tracks throttle), lasers, detonations, low-fuel warnings, gate alarms, and warp sweeps. Zero assets.
- State flow — engine runs outside React; throttled stat snapshots + typed events drive the DOM HUD, toasts, and menu overlays. Hi-scores persist in
localStorage.
Visual aesthetic
Arcade-noir cosmos: near-black indigo nebulas, 3-layer parallax starfield, procedural basalt asteroid walls with cyan/magenta hazard glow, additive particle explosions, speed streaks, engine flame flicker, screen shake, warp flashes, and a CRT scanline/vignette frame around Orbitron/Share Tech Mono typography.
Progression system
Unlimited sectors with escalating difficulty (channel narrows to a 150px minimum, drone speed/spawn density scale to sector 8), gates as checkpoints (respawn at sector start, fuel floor 60), warp bonuses of 200 × sector + 3 × fuel held, and an extra ship every 10,000 pts.
Platform requirements
Any modern HTML5 browser — zero install, fully offline after load. Keyboard on desktop, multi-touch on mobile (drag left half to steer/throttle, hold right half to fire), with pause (P), mute (M), and auto-pause on tab hide.
Files built: index.html, src/index.css, src/game/prng.ts, src/game/types.ts, src/game/audio.ts, src/game/world.ts, src/game/engine.ts, src/game/render.ts, src/components/GameCanvas.tsx, src/App.tsx