01GETTING STARTED
DaveCraft is an infinite, Minecraft-style 3D voxel sandbox that runs entirely in one HTML file in a modern browser (Chrome or Firefox). The world is procedurally generated from a seed, streams in around you as you walk, and never ends in any direction.
- File:
davecraft.html— everything lives in this one file - Needs: Chrome or Firefox + internet on first load (Three.js comes from a CDN)
- No install, no build tools, no accounts
☐ FIRST-DAY SURVIVAL GUIDE
- Punch a tree — hold left-click on a trunk until it breaks. Collect the Wood Log.
- Press E, put the log in the 2×2 grid → craft Planks.
- Craft Sticks (2 planks stacked), then a Crafting Table (4 planks in a square).
- Place the table, right-click it, craft a Wooden Pickaxe.
- Mine stone for a Stone Pickaxe, then hunt coal and iron.
- Before dark: craft torches and a sword. Night brings zombies and creepers.
02CONTROLS
| Input | Action |
|---|---|
| Click | Lock the mouse / dismiss the title overlay |
| Mouse | Look around |
| WASD | Move (relative to where you're facing) |
| Space | Jump — also swims upward in water |
| Shift / Ctrl | Sprint (1.5× walking speed) |
| LMB (hold) | Mine the targeted block / attack a mob |
| RMB | Place the selected block / open a crafting table |
| 1–9 | Select a hotbar slot directly |
| Wheel | Cycle hotbar slots |
| E | Open / close inventory (with the 2×2 crafting grid) |
| P | Pause menu — options, difficulty, save / load |
| Esc | Release the mouse / close an open screen |
03THE WORLD
INFINITE TERRAIN
The world is divided into chunks of 16 × 16 blocks, 96 blocks tall, generated on demand from the seed. Sea level is y=48; snow appears above roughly y=78.
Terrain streams in up to 8 chunks (128 blocks) around you and unloads behind you; fog hides the edge. Walk 1,000+ blocks in any direction and new terrain keeps generating — there are no boundaries, walls, or barriers.
The same seed always produces the same world: leave and return, and the terrain regenerates identically — plus your edits, which are remembered.
CAVES & ORES
- Winding spaghetti tunnels + larger caverns, denser the deeper you go; some open at the surface as natural entrances.
- Caves are never flooded — only open sky (oceans, lakes, rivers) fills with water.
- Coal — common, veins of 3–8, most depths. Iron — rarer, veins of 2–6, richer the deeper you dig. Both often exposed on cave walls.
- Bedrock — indestructible — forms a ragged 1–3 block floor at the bottom of the world.
BIOMES
| Biome | What you'll find |
|---|---|
| Plains | Gentle grassland, scattered oaks, animals |
| Forest | Dense oaks — great for wood |
| Rainforest | Tall jungle trees with huge canopies |
| Desert | Sand, no trees |
| Beach | Sand around sea level |
| Ocean | Water to a sand floor — walk the seabed |
| Rocky Highlands | Stone terrain, steep ground |
| Snowy Mountains | High snow-capped peaks |
Biomes blend smoothly; rivers wind across the world as sand-lined channels connecting lakes and oceans.
04BLOCKS
| Block | Hardness | Best tool | Drops |
|---|---|---|---|
| Grass | 0.7 | Shovel | Dirt |
| Dirt | 0.6 | Shovel | Dirt |
| Stone | 2.2 | Pickaxe | Cobblestone |
| Cobblestone | 2.4 | Pickaxe | Cobblestone |
| Coal Ore | 3.0 | Pickaxe | 1–2 Coal |
| Iron Ore | 3.2 | Stone pick+ | 1 Iron |
| Sand | 0.6 | Shovel | Sand |
| Wood Log | 1.6 | Axe | Wood Log |
| Planks | 1.4 | Axe | Planks |
| Leaves | 0.3 | any | — (8% Stick) |
| Snow | 0.5 | Shovel | Snow |
| Crafting Table | 1.4 | Axe | Crafting Table |
| Torch | ~instant | any | Torch |
| Glass | 0.4 | any | Glass (smelt sand) |
| Sandstone | 1.6 | Pickaxe | Sandstone |
| Stone Bricks | 2.6 | Pickaxe | Stone Bricks |
| Glowstone | 0.4 | any | Glowstone (light 15) |
| Bed | 0.3 | any | Bed |
| Furnace | 3.2 | Pickaxe | Furnace + contents |
| Diamond Ore | 3.5 | Iron pick+ | 1 Diamond |
| Wool | 0.8 | any | Wool |
| Water | — | — | not minable, no collision |
| Bedrock | ∞ | — | indestructible |
Other notes: mining shows a cracking animation; broken blocks drop as spinning item cubes that fly to you; you can't place a block inside yourself; torches only go on top faces of solid blocks.
05ITEMS & TOOLS
Non-placeable materials: Coal, Iron, Stick, Raw Meat, Feather (drops from chickens).
| Tool | Crafted from | Damage | Durability | Notes |
|---|---|---|---|---|
| Wooden Pickaxe | 3 planks + 2 sticks | 2 | 60 | 2× on stone-family |
| Stone Pickaxe | 3 cobble + 2 sticks | 3 | 132 | 4×; can mine iron |
| Iron Pickaxe | 3 iron + 2 sticks | 4 | 250 | 6× — fastest |
| Wooden Sword | 2 planks + 1 stick | 4 | 60 | |
| Stone Sword | 2 cobble + 1 stick | 5 | 132 | |
| Iron Sword | 2 iron + 1 stick | 6 | 250 | strongest weapon |
| Wooden Axe | 3 planks + 2 sticks | 3 | 60 | 2× on wood/planks |
| Wooden Shovel | 1 plank + 2 sticks | 2 | 60 | 2× on dirt-family |
| Stone Shovel | 1 cobble + 2 sticks | 3 | 132 | 4× |
| Iron Shovel | 1 iron + 2 sticks | 4 | 250 | 6× |
| Diamond Shovel | 1 diamond + 2 sticks | 5 | 600 | 9× |
| Stone Axe | 3 cobble + 2 sticks | 4 | 132 | 4× on wood |
| Iron Axe | 3 iron + 2 sticks | 5 | 250 | 6× on wood |
| Diamond Axe | 3 diamonds + 2 sticks | 6 | 600 | 9× on wood |
| Diamond Pickaxe | 3 diamonds + 2 sticks | 5 | 600 | 9× — fastest |
| Diamond Sword | 2 diamonds + 1 stick | 7 | 600 | strongest weapon |
06CRAFTING
Two tiers: the 2×2 grid in your inventory (E) and the 3×3 grid of a placed Crafting Table (right-click it). Recipes match by shape anywhere in the grid — only the arrangement matters.
⇪ TRY IT — INTERACTIVE CRAFTING TABLE
INGREDIENTS
CRAFTED
🔥 FURNACE — SMELTING
Craft a Furnace (8 cobblestone in a ring) and right-click it when placed: smeltable item on the left, fuel below, result on the right. Smelting takes 4 s per item and keeps going while the UI is closed.
| Smelt | Result | Fuel | Burns |
|---|---|---|---|
| Sand | Glass | Coal | 32 s (8 items) |
| Cobblestone | Stone | Log / Planks | 6 s |
| Wood Log | Coal (charcoal) | Stick | 2 s |
▤ ALL RECIPES (hover any slot)
07INVENTORY
- 36 slots — 9 hotbar + 27 storage; stacks up to 64.
- E opens / closes; the mouse is released while open.
- Left-click — pick up / place / swap a stack.
- Right-click — pick up half a stack, or place one item.
- Closing returns crafting-grid contents (and cursor stack) to your inventory.
- Drops stack into existing piles first, then empty slots; full inventory → items stay in the world.
- Hotbar always visible; selected slot highlighted, item name flashes on switch.
HOTBAR PREVIEW
↑ 10 hearts = 20 HP. Hover the slots!
08HEALTH & DAMAGE
- 10 hearts (20 HP) shown above the hotbar.
- Fall damage from drops over ~3 blocks — water breaks your fall.
- Zombies damage on contact; creepers explode for up to 14 damage at point-blank and destroy terrain (blocks drop as items).
- Health regenerates — 1 HP / 3 s after 8 s without damage.
- Death → "You died!" screen → click to respawn at your spawn point with full health. Inventory is kept.
09MOBS
PASSIVE ANIMALS
Cows, pigs, sheep and chickens spawn on grass in plains, forest and rainforest. They wander, pause, and flee when hit. Kills drop raw meat (chickens drop feathers). All mobs are blocky, have gravity + collision, hop one-block steps, and animate their legs.
HOSTILE MOBS
| Mob | Behaviour |
|---|---|
| Creeper | Approaches; within 3 blocks starts a 1.5 s flashing fuse, then explodes — damages you and destroys terrain. Back away to reset the fuse! |
| Zombie | Chases within 24 blocks with one-block step-up; 3 damage on touch (1 s cooldown) with knockback. |
SPAWN RULES
- Hostiles spawn where effective light < 7 — on the surface at night, or in unlit caves during the day.
- Torch-lit areas are safe.
- At dawn, hostiles exposed to daylight burn away; ones in darkness survive.
- Mobs never spawn inside blocks or water; they despawn when far away or when their chunk unloads.
- Total mobs are capped — difficulty sets the caps (Easy 4 / Normal 10 / Hard 18 hostile; 8/10/14 passive).
10LIGHTING
- Sky light — open sky is fully lit; light spreads down and sideways into overhangs and cave mouths with falloff, so deep caves fade to near-black.
- Block light — torches emit light level 14, losing one level per block outward.
- A surface's brightness is the max of the two; sky light scales with time of day — the surface dims at night while torch light stays constant, and caves are dark even at noon.
- Placing or breaking blocks (especially torches) recomputes lighting in the affected area.
11DAY / NIGHT
- A full cycle is 10 minutes by default — configurable from 1 to 30 minutes in the pause menu.
- Sunrise → noon → sunset colours → dark night with a visible moon; sun and moon travel the sky; sky and fog shift through sunset oranges.
- Night is when hostile mobs appear on the surface; dawn clears them.
10 real minutes = 1 game day (default)
12OPTIONS & SAVING (press P)
| Option | Effect |
|---|---|
| Resume | Unpause and re-lock the mouse |
| Difficulty — Easy / Normal / Hard | Mob numbers: hostile cap 4 / 10 / 18, passive cap 8 / 10 / 14 |
| Gamma (0.6–2.2) | Brightens dark areas — caves & night. 1.0 = default |
| Day length (1–30 min) | Real-time length of a full day/night cycle |
| Save game | Stores position, health, inventory, time of day and every block you've changed in browser localStorage |
| Load game | Restores that save exactly — even after closing the page |
🎲 NEW WORLDS — RANDOM SEEDS
The title screen and pause menu both have a New World button: fresh terrain from a random seed, reset inventory, new dawn. The current seed shows in the debug HUD (top-left), and saves store their seed — loading restores that exact world.
13HUD
- Crosshair — centre of the screen; the targeted block gets a wireframe outline.
- Hotbar — 9 slots with icons + stack counts.
- Hearts — health above the hotbar.
- Held item — first-person view bottom-right; bobs while walking, sways on turns, swings on mining/attacks.
- Debug text (top-left) — FPS, chunk, XYZ, mob & drop counts.
14POLISH — PARTICLES & SOUND
- Block-break particles coloured to match the block; mob hit flashes; explosion smoke and sparks; torch embers flickering above lit torches.
- All sound is synthesised at runtime (Web Audio): break/place crunches, footsteps, pickup pops, hurt sounds, zombie groans, creeper hiss, animal noises.
15TROUBLESHOOTING
| Problem | Fix |
|---|---|
| Blank/blue world, only UI visible | Hard-refresh (Ctrl+F5) — an old cached build may be running. If it persists, check the tab title: errors are reported there (ERR: / CONSOLE:). |
| Page won't load / black screen | Internet is needed the first time so Three.js can load from its CDN. |
| Stuck inside terrain after loading | You rise out automatically. If not: save, reload the page, Load again. |
| Too dark | Pause (P) → raise Gamma. |
| Too many / few monsters | Pause (P) → Difficulty. |
| Save gone | Saves live in localStorage per address — http://… and file:// are different storages. Load from the same address you saved from. |
🔗 HIDDEN TESTING OPTIONS (URL hash)
#tp=X,Z teleport · #ty=Y set height · #t=0.5 start at a time of day (0 = midnight, 0.5 = noon) · #test=1 start with a small kit
16TECHNICAL NOTES
- One file, no build step: HTML + CSS + vanilla JavaScript, Three.js from a CDN.
- All textures generated at runtime as 16×16 pixel canvases in a single atlas (nearest-neighbour filtering) — including the ones on this page.
- Voxel lighting (sky + torch flood-fill) baked into chunk meshes as vertex attributes; a shader uniform scales sky light with time of day.
- Chunk data in typed arrays; generation & meshing budgeted per frame — no freezes while streaming.
- Terrain is a pure function of
(seed, chunkX, chunkZ); player edits are an override map reapplied after generation (the Save option persists it). - World seed is
1337(constantWORLD_SEEDat the top of the file) — change it for a whole new world.
davecraft.html — the game · readme.html — this manual · README.md — the plain-text manual