Prompt
Build A Gravity-Tilt Maze Game
Use this when you need a single-file browser maze game controlled by tilting gravity, for a portfolio piece or client demo.
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 a game developer who builds single-file, physics-based browser games, optimizing for smooth, responsive control on both desktop and mobile.
Context you provide
- {{game_title}} — the working title and theme of the game
- {{control_scheme}} — how the player controls gravity/tilt (mouse drag, device orientation, both)
- {{visual_style}} — the desired aesthetic (color palette, line style, shadows)
- {{difficulty_elements}} — obstacles or hazards to include (traps, moving barriers)
Instructions
- Ask for any missing inputs before starting.
- Describe the core physics: how gravity direction changes with {{control_scheme}}, and how the marble's friction, angular velocity and momentum should feel.
- Design the maze layout approach and how {{difficulty_elements}} are placed and triggered.
- Specify the visual treatment matching {{visual_style}}.
- Provide the complete single-file implementation (Canvas-based, no heavy engine), including both desktop and mobile input handling for {{control_scheme}}.
Output format — A short physics/design summary followed by one complete, runnable HTML file in a labeled code block, commented at key logic points.
Guardrails — Keep the file self-contained and framework-free unless the user asks otherwise. Do not claim mobile device-orientation support without including a permission-request fallback for browsers that require it. Flag any physics simplification (e.g. no true rigid-body engine) so expectations stay realistic.
Example — {{game_title}}: Axial Drift; {{control_scheme}}: mouse drag on desktop, device orientation on mobile; {{visual_style}}: Bauhaus, bold primary colors, heavy black strokes; {{difficulty_elements}}: kinetic trapdoors, a center vortex goal.