Skip to content
prompset

Voxel sandbox game code in three.js, single HTML file

Sound off
0
views
0
copies
Download
MP4 · 1280 × 720 · 19 s
Likes
0
Views
0
Copies
0
Saved
0
Download
MP4 · 1280 × 720 · 19 s

Prompt

Model
Seedance 2.5
Mode
Text to video
Duration
19 s
Resolution
720p
Format
16:9
Audio
On

Please help me write a 3D block sandbox mini-game using three.js that can be played directly in a browser, called "Block World AI Edition". Output only one complete index.html file, with all code in this single file. Import three.js using importmap from, and do not use any external images or assets. Terrain: World size 128×128, maximum height 64 blocks, generated using seeded fractal noise for plains, hills, and mountains. Block types: grass block, dirt, stone, sand, log, leaves, planks, bricks, water, snow block. Surface is grass, below that 3 layers of dirt, then stone further down. Sand appears at water edges. High mountains expose stone, mountain tops covered with snow. Areas below water level are filled with semi-transparent water. Trees are randomly planted on grass, with trunks 4 to 6 blocks tall and a cluster of leaves on top. Display: All textures are drawn procedurally on canvas into 16×16 pixel art style, placed in an atlas, using nearest-neighbor sampling. Grass block sides have jagged green edges on top, planks have wood grain, bricks have offset brick seams. Merge meshes by 16×16 chunks, only generate faces facing air. Top faces brightest, bottom faces darkest, add vertex ambient occlusion. Sky is a gradient from light blue to dark blue, with a square sun, floating cubic clouds, and distant fog. Controls: Click to enter mouse lock, mouse to look around, WASD to move, space to jump, Shift to sprint, F to toggle flight. Has gravity and collision. Crosshair in center of screen, use voxel ray casting to detect the block the crosshair aims at and draw a black outline. Left click to mine blocks and emit same-colored particle fragments, right click to place a block on the aimed face, cannot place on yourself. Bottom 8-slot hotbar: grass block, dirt, stone, planks, bricks, log, leaves, sand. Switch with 1-8 or mouse wheel. Bottom right shows the block in hand, with swing animation when mining and placing. Top left shows game name and control instructions, displays "Click to start" before beginning. Code structure is clear, key parts have Chinese comments. When mining or placing blocks, only rebuild affected chunks. Please provide the complete code directly, without omitting any parts.

About this prompt

A voxel sandbox game in the style of Minecraft, built as a single browser page. It generates a seeded 128×128 terrain with plains, hills, mountains, water, sand, trees, and snow caps, then lets the player walk, jump, fly, mine, and place blocks with pixel-art textures and a crosshair-aimed outline. Useful as a reference for a browser voxel game, procedural world generation, or chunk-based rendering.

Prompt breakdown

AI breakdownClick a part to highlight it in the prompt

Click a part to highlight it in the prompt

How to use this prompt

Three steps from this page to your own video.

  1. 01

    Copy the prompt

    Copy the text as it is, timings and the sound line included.

  2. 02

    Match the settings

    Open Seedance 2.5 on a platform that offers it and use the same settings: text to video, 19 s, 720p, 16:9, audio on.

  3. 03

    Make it yours

    Change the subject or the style, or let Studio adapt it for you.