Game · Claude Opus 5.5

Three.js Voxel Game: Movement and Block Editing

A single-file browser game brief that makes controls, procedural terrain, block editing, shaders, and frame rate explicit.

Reusable prompt

Original prompt wording has not been verified. Use this as a starting point and consult the linked source for the creator’s instructions.

Build a voxel sandbox game in one HTML file. Use Three.js from a pinned CDN.

Include first-person WASD controls, mouse look, jumping, procedural hills, water, trees, and five block types that can be placed or removed. Add a moving sun, soft shadows, fog, ambient occlusion, and water reflections.

Keep the experience smooth on a typical laptop. Test movement, collision, block editing, world generation, and resize behavior. Fix every blocking bug, then make one final visual-polish pass.

Adapt this example

Editorial guidance based on the listed brief and source. These steps have not been tested as a reproduction of the displayed result.

What to prepare

Specify the Three.js version, world dimensions, five block types and a target laptop. The brief uses a pinned CDN, so this single HTML file still needs that network dependency.

Suggested workflow

  1. Start with terrain, camera movement and collision before adding water effects.
  2. Add placing and removing blocks, including the block under the player.
  3. Introduce sun, shadows and water effects one at a time while checking responsiveness.

What to check

  • WASD, mouse look and jumping work together.
  • Block editing does not trap the camera inside geometry.
  • Resizing does not stretch the scene or lose controls.

If the result needs work

If the scene slows down, first reduce world size and effect cost. Keep functional movement and editing as the baseline before restoring visual effects.