Minecraft 7
By Just Sparrow
Based on the following code

Minecraft 6
Just Sparrow
11 views · 2h ago
About
This project is a recreate of Minecraft 6 — built by clicking "Recreate" and giving Claude (by Anthropic) an additional prompt. While the gameplay stays the same, the rendering engine has been completely overhauled for performance optimization. Individual block meshes have been replaced with InstancedMesh, and per-face culling ensures that buried faces are never sent to the GPU. This means the same 32×32 procedural terrain now renders much faster and smoother.
Prompt Used
Optimize rendering performance by replacing individual block meshes with an InstancedMesh approach combined with per-face culling:
Per-face culling: For each block, check its 6 neighbors. Only emit a face (quad) if the adjacent block in that direction is absent (i.e. the face is exposed and visible). Buried faces should not be sent to the GPU at all. Face-oriented InstancedMesh: Instead of instancing full cubes, create a single unit quad geometry. For each combination of block type (grass, dirt, stone, wood) and face direction (top, bottom, north, south, east, west), create one InstancedMesh. Each instance is a single exposed face, positioned and rotated to its correct world location. This means roughly (block types × 6 directions) InstancedMeshes total. Material assignment: Each InstancedMesh should use the appropriate face material (e.g. grass top texture for grass+top, grass side texture for grass+east, etc.). Reuse the existing procedural texture generation system but create one material per (block type, face direction) pair. Raycasting: Implement raycasting against InstancedMeshes. On hit, use the instanceId to look up which block was hit and which face direction it belongs to, so block placement and removal still work correctly. Dynamic updates: When a block is added or removed, rebuild only the affected InstancedMeshes (or at minimum, update the instance matrices and count for the affected block type + face direction combinations). Also re-evaluate neighbors, since removing a block may expose new faces on adjacent blocks, and adding a block may hide faces on adjacent blocks. Keep all existing functionality intact: first-person movement, gravity, collision, jumping, block placement/removal, highlight, inventory, and procedural terrain generation should all work as before.
How to Use
Movement
- W — Move forward
- A — Move left
- S — Move backward
- D — Move right
- Space — Jump
Camera
- Click + drag on the canvas to look around
Block Selection
- Click an inventory slot at the bottom of the screen, or press 1 (Grass), 2 (Dirt), 3 (Stone), 4 (Wood)
Building & Breaking
- Left-click on a block face to place the selected block type
- Right-click on a block to remove it
- A crosshair in the center of the screen shows where you're aiming
Everything works the same as before — just faster.
Want to take it further? Click "Recreate" to build on this optimized version — try expanding the world size, adding water, or implementing chunk loading!
More
If you enjoyed this, please hit the like button and subscribe! Your support helps us create more cool stuff on Coddie.
Loading comments...
Other Codes
No other codes yet