# One-Shot Prompt

**Theme**: Deep Sea Bioluminescent
**Generated**: 2026-04-05

## Prompt

Write a complete Snake game called "Abyssal" using HTML5 Canvas with all HTML, CSS, and JavaScript in a single self-contained file themed around a deep-sea bioluminescent ocean floor.

Visual treatment: The canvas background is a dark ocean gradient (near-black navy to deep teal) with slow-drifting particle plankton that float upward at varying speeds and opacities. Subtle caustic light patterns ripple across the sea floor. The overall palette is restricted to: #0a0e27 (abyss), #0d2847 (deep water), #00e5ff (bioluminescent cyan), #7b2ff7 (jellyfish purple), #ff6b9d (coral pink).

Snake appearance: The snake is a bioluminescent deep-sea creature. The head is a slightly larger rounded rectangle with two small glowing cyan "eyes". Each body segment is a rounded rectangle with a subtle radial gradient — brighter at the centre, fading to translucent at the edges — creating a glowing chain effect. The segments pulse gently in brightness. A soft cyan glow trail lingers behind the snake for 5-8 frames, fading out.

Food design: Food items are small animated "jellyfish" — a pulsing dome shape with trailing tentacle lines beneath. They glow in alternating coral pink and purple, with a soft outer glow halo. On spawn, they fade in over 300ms. A subtle bob animation moves them up and down by 2-3 pixels.

Particle effects on food collection: When the snake eats, 12-18 small luminous particles burst outward from the food position in random directions, each with a random colour from the palette. Particles fade and shrink over 600ms. A brief ring-pulse expands outward from the collection point.

Background treatment: Slow-rising ambient particles (30-50 on screen) drift upward at 0.1-0.5 px/frame, wrapping from bottom when they leave the top. They vary in size (1-3px), opacity (0.1-0.4), and colour (cyan or purple). Every few seconds a larger "deep flash" blinks somewhere on the canvas — a brief radial gradient that appears and fades, simulating distant bioluminescence.

Game states:
- Start screen: Game title "ABYSSAL" in a thin sans-serif font with letter-spacing, glowing cyan text-shadow. Subtitle "feed in the dark" below in smaller coral pink. "SPACE or TAP to dive" hint. Background particles still animate.
- Playing: Score in top-left as "DEPTH: [score]" in glowing cyan. Subtle vignette darkening at canvas edges.
- Paused: Semi-transparent dark overlay with "SUSPENDED" text and "P to resume".
- Game over: Screen dims, "SURFACED" title fades in, final depth and best depth shown, "SPACE to dive again".

Transitions: Fade transitions between states over 400ms using alpha overlay.

Mechanics: Arrow keys and WASD control. Snake speed starts at 8 moves/sec, increasing by 0.3 per food eaten, capping at 14. Direction input buffer queues one ahead. 180-degree reversal prevented. High score in localStorage. Mobile swipe support. Canvas scales responsively using devicePixelRatio. Grid is 20x20 cells. prefers-reduced-motion disables particles and glow trails.

The file must be complete — no placeholders, no truncation, no code elision. Target 600-900 lines.

## Notes

- Canvas rendering with devicePixelRatio for retina crispness
- requestAnimationFrame with fixed timestep accumulator for consistent speed
- Inline SVG favicon (fish emoji style)
- Touch/swipe support for mobile play
- localStorage high score persistence
- Hosting: static file, drop into any host
