Public
šŸ Insanely juiced neon snake game — mobile-ready, leaderboard
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

šŸ NEON SERPENT

An absurdly juicy arcade snake game. Fully playable on desktop and mobile, with a global SQLite-backed leaderboard.

Play it: the val's HTTP endpoint (main.ts).

Features

  • 3 game modes — Classic, šŸ’€ Hardcore (faster, extra hazards), 🧘 Zen (no death, wrap-around walls, tail-trim mercy)
  • 5 food types — Data Bits, Gold Cores, Prism Shards (trigger a food FRENZY), Corrupted Bits (shrink you), pulsing MEGA Cores
  • 7 power-ups — Shield, Ghost, Magnet, Slow-Mo, Turbo, 2X Score, Trim
  • Hazards — neon firewalls, blinking proximity mines, patrolling AI drones
  • Portal pairs that teleport you across the board
  • Combo system — chain food within the timer for up to a x10 multiplier
  • Infinite levels — 10 named sectors, then endless escalation; every level reshapes the board and shifts the palette
  • Procedural audio — all SFX and the adaptive synthwave soundtrack are synthesized live with WebAudio (zero audio files); music tempo rises with your level
  • Full FX suite — particles, shockwave rings, screen shake, floating combat text, parallax starfield, death slow-mo cascade
  • Mobile-first controls — swipe anywhere (chainable without lifting your finger), optional virtual D-pad, haptic feedback, safe-area aware layout. Gamepads work too.
  • Meta progression — 20 achievements, 6 unlockable skins, lifetime stats, per-mode personal bests (localStorage)
  • Global leaderboard — per-mode top scores stored in the val's SQLite DB, with a server-side sanity check against impossible scores

Architecture

Rendering mermaid diagram...
  • Fixed-timestep simulation with interpolated rendering (buttery at any frame rate)
  • Direction queue buffers two turns so fast inputs never drop
  • DPR-aware canvas sizing for crisp rendering on high-density phone screens

Controls

InputAction
Arrows / WASDsteer
Swipe (mobile)steer — keep your finger down and keep swiping
Space / P / Escpause
D-pad buttonssteer (auto-shown on touch devices)