Skip to content

About

๐ŸŽ๏ธ NEON DRIFT โ€” a browser-based 3D synthwave kart racer (Three.js + Vite). Glowing neon karts, a Tron grid, 80s sunset bloom, AI rivals, item pickups, and three tracks. Pick up and play.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

16 Commits

Folders and files

Repository files navigation

๐ŸŽ๏ธ NEON DRIFT

A browser-based 3D synthwave kart racer. Glowing neon karts, a Tron-style grid floor, an 80s sunset sky with bloom, AI rivals, item pickups, and three progressively gnarlier tracks. Buckle up. ๐ŸŒ†โœจ

๐ŸŸช๐ŸŸฆ๐ŸŸง Steer with the arrow keys, drift through the neon, and beat the clock. MVP โ€” and very playable.


๐ŸŽฎ Just want to play?

You only need two things: Node and pnpm (see Prerequisites). Then, from a terminal in this folder:

pnpm install      # one-time setup
pnpm dev          # then open the http://localhost URL it prints

That's it โ€” your browser opens the title screen. Pick a track, wait for the 3โ€‘2โ€‘1โ€‘GO, and race! ๐Ÿ

๐Ÿ’ก Not sure what a "terminal" is? It's the text-command app on your computer (Terminal on Mac, PowerShell on Windows). Copy the commands above, paste them in, press Enter.

โŒจ๏ธ Controls

Press L in-game to toggle the controls legend any time.

Action Keyboard Mouse
๐ŸŽ๏ธ Steer โ† โ†’ / A D move pointer (hold L-click)
๐Ÿš€ Throttle โ†‘ / W hold left-click
๐Ÿ›‘ Brake / reverse โ†“ / S โ€”
๐Ÿ’จ Drift Space โ€”
๐ŸŽ Use item Shift / Ctrl right-click
โธ๏ธ Pause Esc โ€”

๐Ÿ•น๏ธ What to expect

  • ๐Ÿ—บ๏ธ 3 tracks, each longer with more laps: NEON CIRCUIT (3), SUNSET LOOP (5), GRID RUNNER (8).
  • ๐Ÿค– 3 AI opponents that share your top speed โ€” no cheating, just close racing.
  • ๐ŸŽ Item pickups โ€” the shape tells you the bonus:
    • ๐Ÿ”บ cone = Boost
    • ๐Ÿ”ท octahedron = Shock (spins nearby rivals)
    • ๐Ÿ”ถ icosahedron = Oil (drop a slick behind you)
  • ๐Ÿ A glowing start/finish line you cross each lap โ€” it flips to a neon checkerboard on the final lap.
  • ๐Ÿ“Š HUD tracks lap, position, total time, current-lap time, best lap, and the time remaining before the per-track timeout.
  • โšก Top speed โ‰ˆ 325 km/h.

โœ… Prerequisites

Tool Version Why
๐ŸŸข Node.js >= 26 Runs the dev server and build tooling
๐Ÿ“ฆ pnpm >= 11 Package manager โ€” this repo enforces it (npm is blocked)
๐ŸŒ Browser Modern Any recent Chrome / Firefox / Edge / Safari with WebGL

Don't have them yet?

Check what you have:

node -v     # should print v26.x or higher
pnpm -v     # should print 11.x or higher

๐Ÿš€ Getting started (developers)

pnpm install            # install dependencies
pnpm dev                # hot-reloading dev server

Build and preview a static production bundle:

pnpm build              # outputs to dist/
pnpm preview            # serve the built bundle locally

๐Ÿ› ๏ธ Scripts

Command Purpose
pnpm dev / pnpm build Vite dev server / production build
pnpm test Vitest unit tests (physics, race/timing, items, track)
pnpm e2e Playwright smoke test (Chromium)
pnpm typecheck TypeScript type-checks the JS (checkJs)
pnpm lint / lint:fix ESLint (flat config) โ€” :fix autofixes
pnpm format / :check Prettier write / verify
pnpm audit / :fix CVE audit / fix
pnpm check typecheck + lint + format:check + test (CI gate)
pnpm fix lint:fix + format
pnpm deps:outdated list outdated deps
pnpm deps:update upgrade within semver ranges (compatible)
pnpm deps:update:latest upgrade to latest (may cross majors)

The Playwright e2e drives Chromium (its bundled SwiftShader gives WebGL on headless/GPU-less CI); fetch it once with pnpm exec playwright install chromium.

CI (.github/workflows/ci.yml) runs the full check + audit + build plus a Chromium e2e job on Node 26 / pnpm. Dependabot keeps deps and Actions current.

๐Ÿงฑ Architecture

Pure game logic (src/game/physics.js, race.js, items.js, and the track sampling in track.js) has no Three.js imports and is unit-tested. Rendering modules under src/render/ own all Three.js objects. src/game/world.js orchestrates a race; src/main.js is the title โ†’ select โ†’ race โ†’ results state machine.

See docs/superpowers/specs/ and docs/superpowers/plans/ for the design spec and implementation plan.


๐Ÿ“š Sources & tech stack

The shoulders this game stands on:

Tech Role Link
๐ŸŽฒ Three.js 3D rendering / WebGL scene graph https://threejs.org/
โšก Vite Dev server + production bundler https://vite.dev/
๐ŸŸข Node.js JavaScript runtime https://nodejs.org/
๐Ÿ“ฆ pnpm Fast, disk-efficient package manager https://pnpm.io/
๐Ÿงช Vitest Unit testing https://vitest.dev/
๐ŸŽญ Playwright End-to-end browser testing https://playwright.dev/
๐Ÿ“ TypeScript Type-checking (checkJs over JS) https://www.typescriptlang.org/
๐Ÿ” ESLint Linting (flat config) https://eslint.org/
๐Ÿ’… Prettier Code formatting https://prettier.io/
๐Ÿ”Š Web Audio API Sound effects https://developer.mozilla.org/docs/Web/API/Web_Audio_API
๐Ÿ–ผ๏ธ WebGL Hardware-accelerated graphics https://developer.mozilla.org/docs/Web/API/WebGL_API

๐Ÿ“„ License

Released under the MIT License โ€” free to play, fork, and remix.

๐ŸŒŒ Built for casual gamers who want to drift, and for vibe coders who want to read clean game logic. Have fun out there. ๐Ÿ

About

๐ŸŽ๏ธ NEON DRIFT โ€” a browser-based 3D synthwave kart racer (Three.js + Vite). Glowing neon karts, a Tron grid, 80s sunset bloom, AI rivals, item pickups, and three tracks. Pick up and play.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages