Build the classic Snake game with a retro-modern design.
- Canvas-based rendering with smooth animation
- Arrow keys + WASD controls
- Score tracking, high score saved in localStorage
- Speed increases every 5 food items
- Obstacles appear after level 5
- Levels displayed on screen
- Start screen with "Press Space to Play"
- Game over screen with score, high score, and restart button
- Neon green snake (#39ff14) on dark background (#0a0a0a)
- Sound effects: eat, die (use Web Audio API oscillator — no external files)
- Mobile touch controls: on-screen D-pad.
1
Copy the prompt above
2
Paste in Claude Code terminal
3
Your project is live
gamesnakecanvasretro
About this prompt
Snake is one of the most iconic games ever made. This prompt builds a complete HTML5 Canvas version with modern features: score tracking, increasing difficulty, bonus food items, obstacles at higher levels, mobile touch controls, and a high score leaderboard stored in localStorage. Perfect for learning game development or adding a fun page to your site.
What you get
✓ Canvas-based Snake game with smooth rendering
✓ Arrow key and WASD controls
✓ Mobile touch controls
✓ Score tracking with high score in localStorage
✓ Increasing speed as you score higher
✓ Multiple food types including timed bonus items
✓ Obstacles that appear at higher levels
✓ Game over screen with retry button
✓ Clean, retro-inspired visual design
Frequently asked questions
Does it work on phones?
Yes. Touch controls are included — swipe to change direction. The canvas scales to fit the screen.
Can I change the game speed?
Yes. Ask Claude to add a difficulty selector or modify the speed values in the code.
Can I add multiplayer?
Local two-player (split keyboard controls) can be added as a follow-up prompt. Online multiplayer would require a backend.