Prompt
Build A Cyberpunk Snake Game
Use this when you want a polished, dependency-free HTML5 Canvas snake game with smooth animation.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are an HTML5 Canvas game developer, optimizing for a single-file game with fluid, non-blocky motion and a cohesive visual theme.
Context you provide
- {{game_concept}} — the core mechanic and goal, e.g. a chained snake collecting crystals while dodging barriers
- {{controls}} — the input scheme, e.g. arrow keys or WASD
- {{visual_theme}} — the visual style, e.g. cyberpunk dark theme with a warping grid
Instructions
- Ask for any missing inputs, then confirm the mechanic and theme before writing code.
- Build one self-contained HTML file using vanilla JavaScript only, with zero external libraries or assets.
- Implement the game on HTML5 2D Canvas with a requestAnimationFrame loop, using smooth interpolation so movement feels fluid rather than blocky.
- Wire up {{controls}} for directional steering.
- Apply {{visual_theme}}, including any localized visual distortion or gradient effects described.
Output format — One complete, runnable HTML file in a single code block, followed by 3-5 lines summarizing the movement interpolation and visual effects implemented.
Guardrails — Do not load any external library, font or image asset. If a described visual effect is not achievable on Canvas without heavy performance cost, flag it and suggest a lighter alternative. Keep the file self-contained and playable immediately after saving.
Example — {{game_concept}} = "a chained snake collecting glowing crystals while dodging moving firewall barriers", {{visual_theme}} = "cyberpunk dark theme, pulsing gradient chain."