I have built a complete, feature-rich browser-based Minecraft-style voxel game (CraftCraft 3D) using React, Three.js, and Tailwind CSS.
Key Features Implemented:
-
Procedural Voxel World Generation:
- Biomes & Terrain: Rolling Plains, Dense Forests, Deserts with cacti, and Snow-capped Mountain peaks generated with Simplex noise.
- Caves & Underground Ores: 3D cave carving with Coal, Iron, Gold, and Diamond ore veins at depth.
- Trees & Vegetation: Oak trees, cacti, red poppies, and tall grass procedurally generated across chunks.
- Chunk System: Dynamic loading and unloading of 16×64×16 voxel chunks around the player.
- Procedural Pixel-Art Textures: Crisp 16x16 pixel textures generated entirely via HTML Canvas for 100% offline reliability.
-
First-Person Controls & Physics:
- Pointer Lock Mouse Look: Smooth camera rotation.
- WASD Movement: Walking, Sprinting (Shift), Sneaking, and Jumping.
- AABB Collision Physics: Solid block collisions, ground detection, step handling, and underwater swimming buoyancy.
- Game Modes: Toggle between Survival (Health, Hunger, Fall damage) and Creative (Fly mode via
F key, noclip/flight).
-
Block Breaking, Placing & TNT Explosions:
- Fast DDA Voxel Raycasting up to 6 blocks away with face highlighting.
- Left-Click: Mines blocks with particle break bursts and sound effects.
- Right-Click: Places selected block against targeted face (ensuring no clipping with player bounding box).
- TNT Explosions: Ignites fuse upon right-click, plays sizzling audio, and detonates destroying blocks in a spherical radius with fire particles!
-
Hotbar, Inventory & Crafting System:
- 9-slot Hotbar (
1-9 keys, scroll wheel, or mouse click selection).
- Expanded Inventory modal (
E key) with a 2x2 Crafting grid.
- Recipe Guide (
R key): 1-click fast crafting for Planks, Crafting Tables, Furnaces, TNT, Torches, Colored Wool, Bricks, and Glowstone.
-
Day-Night Cycle, Sky & Weather:
- Orbiting Sun and Moon with dynamic sky color transitions (Day, Sunset, Midnight, Sunrise).
- Directional light shadows and fog matching sky color.
- Dynamic Weather System (Clear, Rain, Snow).
-
Audio & Web Audio API SFX:
- Synthesized material-specific footstep, break, and placement audio (Grass, Stone, Wood, Sand, Glass, Water).
- TNT fuse sizzling and explosion boom SFX.
- Relaxing ambient background C418-inspired piano tunes.
-
HUD, MiniMap & Debugging:
- F3 Debug Overlay: Displays FPS, X,Y,Z coordinates, Biome, Heading Direction, and World Seed.
- MiniMap Radar: Top-right mini-map and compass showing surrounding terrain elevation and player heading.
- Save World & Reset World features stored in
localStorage.
Files built: index.html, src/game/blockTypes.ts, src/game/textures.ts, src/game/audio.ts, src/game/terrain.ts, src/game/chunk.ts, src/game/particles.ts, src/game/environment.ts, src/game/crafting.ts, src/game/world.ts, src/game/player.ts, src/game/raycast.ts, src/components/Hotbar.tsx, src/components/HUD.tsx, src/components/InventoryModal.tsx, src/components/RecipeBookModal.tsx, src/components/PauseMenu.tsx, src/components/DebugOverlay.tsx, src/components/MiniMap.tsx, src/components/Notifications.tsx, src/App.tsx