Build a Neon Circuit-Routing Tile Puzzle Game in One HTML File
Create VoltGrid, a self-contained neon circuit-routing puzzle game with guaranteed solvable levels, par tracking, and Web Audio lock-in clicks.
Text prompt for ChatGPT and Claude
You get: one complete HTML file in a single code block, then 3 short ideas to extend it.
The prompt
Act as a senior front-end game developer and UI designer. Build VoltGrid, a single-file neon circuit-routing tile puzzle game in HTML, CSS, and JavaScript.
Core mechanic: Players rotate square circuit tiles 90 degrees clockwise to connect a glowing power source at the top-left to a target node at the bottom-right. Every generated level must be built from a valid solved path first, then scrambled, guaranteeing 100 percent solvability and calculating a fair par move count.
Rules and requirements:
1. Controls: Support mouse click, touch tap, and keyboard navigation using arrow keys with Space or Enter to rotate.
2. Visuals: Render crisp SVG circuit traces on a dark slate background with bright cyan for energized paths, muted slate for unpowered paths, and emerald for the completed target.
3. HUD and states: Display current level, moves versus par, grid size selector for 4x4, 5x5, and 6x6, a reset button, and a clear level-complete banner.
4. Audio: Synthesize subtle Web Audio API lock-in clicks and a completion chime on first user interaction, with a visible mute toggle.
5. Accessibility and layout: Fit cleanly within 360px to 1280px viewports without horizontal scroll, and respect prefers-reduced-motion.
Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.Example output
Tips and common edits
Why this works
- Generates a valid spanning path before scrambling tiles, guaranteeing every level is 100% solvable.
- Uses inline SVG traces and CSS custom properties for crisp scaling across 360px–1280px screens.
- Initializes Web Audio API only after the first click or keypress, avoiding browser autoplay blocks.
Paste this prompt into Gemini, ChatGPT, or Claude, then save the generated code as an .html file and open it in any browser—or preview it directly in Canvas or Artifacts.
Common edits
- Add a timer mode or streak counter for consecutive levels solved at or under par.
- Swap the cyan-and-emerald neon palette for amber-and-crimson in the CSS variables.
Reuse it: Use in a workflowTurn into a skillAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Build a Word-Chain Ladder Puzzle Game with Hints in One HTML File
Create RungCraft, an offline word-ladder puzzle game with a built-in dictionary graph, BFS shortest-path par, step-by-step hints, and move efficiency ratings.
Build a Match-Three Tile Swapping Puzzle with Cascades and Combo Scoring
Generates a complete single-file match-three puzzle with swap validation, gravity refill, chain-reaction combo scoring and an automatic reshuffle when no moves remain.
Build an Orbital Gravity Slingshot Game in a Single HTML File
Create Perihelion, an offline HTML5 canvas arcade game with inverse-square gravity physics, live trajectory previews, and slingshot combo scoring.
Build a Color Sequence Memory Game with Synth Tones in One HTML File
A ready-to-paste prompt that builds Echo Garden, a four-pad color-and-shape sequence memory game with Web Audio tones, a strict mode and rising speed.
Build a Daily Five-Letter Word Guessing Game with Colorblind Mode in One HTML File
A ready-to-paste prompt that produces Quillmark, an original daily five-letter word game with correct duplicate-letter coloring, an on-screen keyboard and a colorblind mode.
Build a Four-Lane Rhythm Tap Game with a Generated Beat in One HTML File
A ready-to-paste prompt that builds a complete four-lane rhythm tap game with a live Web Audio beat, Perfect/Good/Miss timing grades, combo scoring and a results screen.
- Build a Garden Caterpillar Snake Game with Swipe and Wrap Mode in HTML
- Build a Gnome-Popping Whack-a-Mole Game With Decoys in One HTML File
- Build a One-Button Fox Endless Runner Game in a Single HTML File
- Build a Paddle and Bricks Game with Power-Ups and Levels in One HTML File
- Build a Reaction Time Tester Game with False-Start Detection in One HTML File
- Build a Sliding Number Puzzle Game with Solvable Shuffles in One HTML File