Two-player Snake game with neon Flash-era visuals and procedural audio. Built with React, TypeScript, and Vite.
[ --> Play it now <--]
npm install
npm run devOpen http://localhost:5173 in your browser.
npm installinstalls the project dependencies frompackage.json.npm run devstarts the Vite development server for local development.npm run buildcreates the production build indist/and runs TypeScript checks.npm run previewserves the builtdist/output locally so you can test the production build.
Typical local development flow:
npm install
npm run devTo verify the production build locally:
npm run build
npm run preview| Player | Up | Down | Left | Right |
|---|---|---|---|---|
| Player 1 | W | S | A | D |
| Player 2 | ↑ | ↓ | ← | → |
| Mobile | Tap above head | Tap below head | Tap left of head | Tap right of head |
Click Start to begin. One player dying doesn't end the game — the survivor plays on.
Mobile: Single-player works on mobile — tap anywhere on the canvas relative to the snake's head to steer. The canvas scales to fit your screen.
npm run dev # Start dev server
npm run build # Production build
npm run preview # Preview production build
npm test # Run unit tests- React 18 + TypeScript + Vite
- Canvas API for rendering (neon glow, particles, screen shake)
- Web Audio API for procedural sound effects and dynamic background music
- Vitest for unit testing (58 tests)