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

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

One HTML file. Save it and open it in any browser.Open full screen (opens in a new tab)
How a VoltGrid level is playedRotate tiles to connect source to sink
  1. Rotate tilesClick, tap, or use Arrow keys and Space/Enter to turn 90° clockwise
  2. Energize the pathConnected traces light up cyan from the top-left source
  3. Reach the sinkConnect the bottom-right sink to complete the circuit
  4. Beat ParFinish the level within the par move count

Example: VoltGrid, a neon circuit-routing tile puzzle with guaranteed solvable levels.

Click or tap any tile—or use the Arrow keys and Space/Enter—to rotate circuit traces 90° clockwise. Energized paths light up in cyan from the top-left source; connect the bottom-right sink to complete the circuit and beat Par.

Written by AI from this prompt. Your results will vary.

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

Simple HTML Games

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.

Simple HTML Games

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.

Simple HTML Games

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.

Simple HTML Games

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.

Simple HTML Games

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.

Simple HTML Games

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.