# One-Shot Prompt

**Theme**: Neon Arcade Snake with Crisp Grid Feel
**Generated**: 2026-04-18

## Prompt

Create a complete, polished Snake game in a single HTML file using HTML5 Canvas. The theme is a neon arcade aesthetic with a crisp grid feel — think synthwave meets electric arcade cabinet.

**Visual Identity:**
- Color palette: Deep void (#0a0a1a), electric cyan (#00f0ff), hot magenta (#ff2d75), laser purple (#a855f7), grid blue (#1a1a3e)
- Snake: Glowing cyan segments with additive-blend trail effect. The head has a forward-facing chevron shape with hot magenta eyes.
- Food: Pulsing neon orb at center with concentric ring animation that ripples outward
- Background: Subtle perspective grid lines receding to vanishing point. The grid should pulse outward from food collection points with a satisfying ripple effect.

**Canvas Technical Requirements:**
- Set up canvas with proper HiDPI/Retina support using devicePixelRatio
- Use `shadowBlur` and `shadowColor` on every draw call for the neon glow effect
- Trail effect: don't fully clear canvas each frame — use semi-transparent overlay with the void color at 0.15 alpha
- CRT-style vignette overlay as radial gradient at edges

**Game Mechanics:**
- Arrow keys AND WASD to control direction
- Direction input buffering (queue up to 2 moves so fast inputs aren't lost)
- Prevent 180-degree reversals (can't go left if moving right)
- Snake speed starts at 100ms per move and gradually increases (cap at 60ms)
- Eating food grows snake by 1 segment
- Collision with walls or self = game over
- Score displayed prominently in-canvas with glow effect
- High score persisted in localStorage

**Game States:**
- **Start screen**: Large title "LUMINOUS COIL" with cyan glow, subtitle "Neon Arcade Snake", "Press SPACE to Start" pulsing text
- **Playing**: Active gameplay with score at top-left, crisp grid visible, smooth interpolated snake movement
- **Paused**: Press P or ESC to pause — dark overlay with "PAUSED" text
- **Game over**: Final score, high score, "Press SPACE to Restart", subtle screen shake effect

**Particle Effects:**
- On food collection: 10-15 particles burst outward with physics-based fade
- Particles are small glowing orbs matching the food color (cyan/magenta mix)
- Particles have slight gravity and fade over 1-2 seconds

**Mobile Support:**
- Touch controls: swipe to change direction
- Canvas scales responsively to viewport
- Tap anywhere on start/game over screens

**Polish Details:**
- Smooth `requestAnimationFrame` game loop with fixed timestep
- Snake segments interpolate between grid positions (no teleporting)
- Food spawn animation: scale from 0 to 1 with elastic ease-out
- Page title: "Luminous Coil - Neon Snake"
- Favicon: inline SVG data URI with snake emoji
- Grid ripple effect radiates from food collection point outward across the perspective grid
- Subtle ambient grid pulse even during gameplay

Name the game "Luminous Coil". No external images — all visuals rendered via Canvas API. Single self-contained HTML file.

## Notes

- Uses Canvas `shadowBlur` extensively for the neon glow effect
- Trail effect achieved via semi-transparent overlay rather than full clear
- Perspective grid drawn with vanishing point at canvas center-top
- Grid ripples implemented as expanding concentric rings with fade
- Mobile touch detection with 30px minimum swipe threshold
- All game logic, rendering, and styling in one file
- Hosting: CodePen, Vercel, Cloudflare Pages, or local file
