Build an Isometric Voxel Island Day-Night Scene on Canvas
Get one offline HTML file that draws an isometric voxel island on plain canvas, runs a day-night cycle where lights switch on at dusk, and turns in 90-degree steps.
Text prompt for Claude and ChatGPT
You get: one complete HTML file in a single code block, then 3 short ideas to extend it.
The prompt
You are a creative front-end developer. Build Lanternfall Isle: an isometric voxel island diorama in one HTML file, drawn with the plain 2D canvas API only (no Three.js, no WebGL, no libraries, no CDN, no images).
The island sits on a 14x14 heightmap ringed by sea: sand beaches, stepped grass hills, a stone path, three small houses with windows, trees, lamp posts and a red-and-white lighthouse. Draw every voxel as three shaded faces sorted back to front so overlaps stay correct.
Rules:
1. Day-night cycle of about 40 seconds: the sky gradient, sea and face shading change through dawn, day, dusk and night, with a sun, a moon and night stars.
2. At dusk, the windows, lamps and lighthouse switch on with a soft radial glow, and they switch off at dawn.
3. Drag left or right (mouse or touch), arrow keys or two buttons turn the island in 90-degree steps with an eased turn.
4. A Pause/Play button (Space also works) freezes the clock; a readout shows the phase and time, e.g. Dusk 18:50.
5. prefers-reduced-motion: rotation snaps, no shimmer or twinkle, and the clock starts paused at dusk with the lights on.
6. Fit the canvas to the window with devicePixelRatio; show a title and a controls legend.
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
- Plain 2D canvas with three shaded faces per voxel and back-to-front sorting gives a real 3D look with no Three.js, so it runs in any sandboxed preview.
- One time value drives the sky, shading, stars and light switch, so pausing at any hour shows a coherent scene.
- Rotating in 90-degree steps keeps the isometric angle exact, so faces line up and the drag gesture never feels mushy.
Paste into Claude and it renders as a live artifact preview on any plan; ChatGPT or Gemini canvas also work. Or save the code as an .html file and open it in a browser. No Three.js or internet needed.
Common edits
- Swap the island for a snowy village or a desert oasis by changing the heightmap rows and the palette.
- Shorten the cycle to 20 seconds, or add rain voxels and a wind sound made with the Web Audio API and a mute toggle.
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 an Animated Dawn-to-Night Landscape Scene in a Single HTML File
You get one HTML file that draws a canvas valley village whose sky, sun, moon, stars, clouds and window lights all follow a single time-of-day scrubber with autoplay.
Build an Interactive Double-Pendulum Chaos Visualizer in HTML
Create a single-file HTML5 Canvas double-pendulum simulator with RK4 physics, draggable bobs, gravity presets, trail controls, and a twin-pendulum divergence mode.
Build an Interactive Flocking Boids Physics Playground in HTML
A ready-to-use prompt that generates a self-contained HTML5 canvas boids simulation with real-time flocking sliders, cursor attract/scatter modes, and live telemetry.
Build a Click-to-Launch Fireworks Celebration Animation in One HTML File
A prompt that produces a single HTML page where clicks, taps or keys launch fireworks with gravity, fading trails, soft synthesized pops and a mute toggle.
Build an Interactive Particle Network Background in HTML
You get one HTML file with a full-screen canvas particle network that links nearby dots, follows mouse or touch, and has density, color and low-power controls.
Build a Confetti and Fireworks Celebration Effect in a Single HTML File
A ready-to-paste prompt that builds a reusable canvas confetti and fireworks layer with color theme presets, burst size control, Web Audio pops and automatic particle cleanup.
- Build a Parallax Starfield Night Sky Hero Section on Canvas in One HTML File
- Build a Beat-Synced Kinetic Typography Quote Animation in One HTML File
- Build a Self-Drawing SVG Lighthouse Line Animation in One HTML File
- Build an Animated Heart Blood Flow Diagram in HTML
- Build an Animated Gradient Glitch Title Hero Header in One HTML File
- Build an Animated Nonprofit Impact Stats Counter Section in One HTML File