Skip to content

fernforge-arcade/minecraft-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft Clone (Browser / Three.js)

A playable, self-contained Minecraft clone that runs in the browser with no build step. Pure ES modules + Three.js via CDN, procedurally-generated textures and sound (no binary assets).

▶️ Play it live: https://fernforge.github.io/minecraft-clone/

Run it locally

npm install      # only needed once (dev server)
npm run serve    # serves on http://localhost:8080

Open http://localhost:8080 and click the screen to lock the mouse.

Controls

Action Key
Move W A S D
Look Mouse
Jump / Fly toggle Space (double-tap to fly)
Sprint Shift
Mine / Attack Left click
Place / Eat / Open station Right click
Pick block Middle click
Select hotbar 19 / scroll
Inventory + crafting E
Creative toggle G
Respawn R

Features

  • Chunked voxel world with face-culled meshing
  • Procedural terrain: 4 biomes (plains/forest/desert/snowy), caves, water, trees, cacti
  • 5 ores (coal/iron/gold/diamond/redstone) with tool-tier harvest rules
  • Full item/tool registry (16 tools), block hardness + mining times, drops
  • Crafting (2×2 + 3×3 table, shaped/shapeless), furnace smelting
  • Survival: health, hunger, saturation, fall damage, regen, eating, death/respawn
  • Mobs: pig/cow/sheep (passive) + zombie (hostile, burns in daylight); dropped-item pickups
  • Procedural Web Audio SFX; day/night cycle, clouds, night stars
  • All textures and item icons drawn procedurally to canvas

Tests

node test/logic.mjs   # 32 headless logic checks (noise, meshing, physics,
                      # raycast, crafting, inventory, mob AI, ...)

Rendering was verified in real headless Chrome (software WebGL) — world renders, HUD/biome/position update live, inventory toggles, no console errors. See .libs/probe*.mjs for the harness.

Layout

index.html        entry, import map, UI overlay, hotbar
src/main.js       bootstrap + game loop
src/world.js      chunk storage, terrain gen, meshing
src/player.js     controls, physics, raycast interaction
src/blocks.js     block definitions      src/items.js     item/tool registry
src/inventory.js  inventory + crafting + furnace
src/entities.js   mobs + dropped items
src/textures.js   procedural textures    src/noise.js     noise functions
src/sound.js      procedural audio       src/styles.css

About

A playable browser-based Minecraft clone built with Three.js — voxel terrain, survival, crafting, mobs. No build step.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors