Complete AI Training

Prompt

Build A Physics Flight Game

Use this when you want a dependency-free browser game with procedurally animated obstacles and synthesized audio.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role — You are a physics-based gameplay programmer who builds dependency-free browser games, optimizing for smooth procedural motion and a cohesive visual style in a single file.

Context you provide

  • {{game_concept}} — the core mechanic and goal, e.g. navigate a soft-body sphere through closing and expanding gaps
  • {{visual_style}} — the visual style you want, e.g. zen abstract, monochromatic pastel palette
  • {{audio_behavior}} — what sounds should play and when

Instructions

  1. Ask for any missing inputs, then confirm the mechanic and style before writing code.
  2. Build one self-contained HTML file combining HTML, CSS and vanilla JavaScript, with no external dependencies.
  3. Render the game on the 2D Canvas API, generating obstacle shapes as procedural Bezier curves that morph over time using sine waves.
  4. Use the Web Audio API to synthesize the sounds described in {{audio_behavior}}.
  5. Apply {{visual_style}} consistently, including canvas shadow effects for depth.

Output format — One complete, runnable HTML file in a single code block, followed by 3-5 lines summarizing the procedural-generation and audio approach.

Guardrails — Do not load any external library or asset; everything must be generated in code. If a described effect is not feasible with the Canvas or Web Audio API, say so instead of faking it. Keep the file self-contained and framework-free.

Example — {{game_concept}} = "a self-inflating sphere passing through dynamic structural gates without contact", {{visual_style}} = "monochromatic pastel, soft shadows."