DAVECRAFT

— an infinite voxel sandbox · the complete manual —

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
Tip: clicking anywhere on the title screen locks the mouse and starts the game. Press Esc any time to release the mouse.

☐ FIRST-DAY SURVIVAL GUIDE

  1. Punch a tree — hold left-click on a trunk until it breaks. Collect the Wood Log.
  2. Press E, put the log in the 2×2 grid → craft Planks.
  3. Craft Sticks (2 planks stacked), then a Crafting Table (4 planks in a square).
  4. Place the table, right-click it, craft a Wooden Pickaxe.
  5. Mine stone for a Stone Pickaxe, then hunt coal and iron.
  6. Before dark: craft torches and a sword. Night brings zombies and creepers.

02CONTROLS

InputAction
ClickLock the mouse / dismiss the title overlay
MouseLook around
WASDMove (relative to where you're facing)
SpaceJump — also swims upward in water
Shift / CtrlSprint (1.5× walking speed)
LMB (hold)Mine the targeted block / attack a mob
RMBPlace the selected block / open a crafting table
1–9Select a hotbar slot directly
WheelCycle hotbar slots
EOpen / close inventory (with the 2×2 crafting grid)
PPause menu — options, difficulty, save / load
EscRelease 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

BiomeWhat you'll find
PlainsGentle grassland, scattered oaks, animals
ForestDense oaks — great for wood
RainforestTall jungle trees with huge canopies
DesertSand, no trees
BeachSand around sea level
OceanWater to a sand floor — walk the seabed
Rocky HighlandsStone terrain, steep ground
Snowy MountainsHigh snow-capped peaks

Biomes blend smoothly; rivers wind across the world as sand-lined channels connecting lakes and oceans.

04BLOCKS

BlockHardnessBest toolDrops
Grass0.7ShovelDirt
Dirt0.6ShovelDirt
Stone2.2PickaxeCobblestone
Cobblestone2.4PickaxeCobblestone
Coal Ore3.0Pickaxe1–2 Coal
Iron Ore3.2Stone pick+1 Iron
Sand0.6ShovelSand
Wood Log1.6AxeWood Log
Planks1.4AxePlanks
Leaves0.3any— (8% Stick)
Snow0.5ShovelSnow
Crafting Table1.4AxeCrafting Table
Torch~instantanyTorch
Glass0.4anyGlass (smelt sand)
Sandstone1.6PickaxeSandstone
Stone Bricks2.6PickaxeStone Bricks
Glowstone0.4anyGlowstone (light 15)
Bed0.3anyBed
Furnace3.2PickaxeFurnace + contents
Diamond Ore3.5Iron pick+1 Diamond
Wool0.8anyWool
Water——not minable, no collision
Bedrock∞—indestructible
Mining speed: time ≈ hardness ÷ multiplier × 0.45 s. A matching tool gives wood 2× / stone 4× / iron 6×. Pickaxe-blocks mined bare-handed take 3.5× longer (iron ore even more — it effectively requires a stone pickaxe).

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).

ToolCrafted fromDamageDurabilityNotes
Wooden Pickaxe3 planks + 2 sticks2602× on stone-family
Stone Pickaxe3 cobble + 2 sticks31324×; can mine iron
Iron Pickaxe3 iron + 2 sticks42506× — fastest
Wooden Sword2 planks + 1 stick460
Stone Sword2 cobble + 1 stick5132
Iron Sword2 iron + 1 stick6250strongest weapon
Wooden Axe3 planks + 2 sticks3602× on wood/planks
Wooden Shovel1 plank + 2 sticks2602× on dirt-family
Stone Shovel1 cobble + 2 sticks31324×
Iron Shovel1 iron + 2 sticks42506×
Diamond Shovel1 diamond + 2 sticks56009×
Stone Axe3 cobble + 2 sticks41324× on wood
Iron Axe3 iron + 2 sticks52506× on wood
Diamond Axe3 diamonds + 2 sticks66009× on wood
Diamond Pickaxe3 diamonds + 2 sticks56009× — fastest
Diamond Sword2 diamonds + 1 stick7600strongest weapon
Diamonds are the end-game material: rare ore below y ≈ 24, needs an iron pickaxe. Also new: glass (smelt sand), sandstone & stone bricks (building blocks), glowstone (craft from 4 coal — shines at light 15), and wool from sheep for beds.
Durability: one point per block mined or mob hit — tools break when it runs out. A small bar on the item shows remaining life. Iron gear lasts ~4× wood.

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

Click an ingredient, click a slot to place; click a filled slot to remove.

INGREDIENTS

➜
Place ingredients…

CRAFTED

Nothing yet — craft something!

🔥 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.

SmeltResultFuelBurns
SandGlassCoal32 s (8 items)
CobblestoneStoneLog / Planks6 s
Wood LogCoal (charcoal)Stick2 s
🛏 BEDS: sheep drop wool — craft a bed (3 wool over 3 planks), place it, and right-click at night to sleep: time skips to dawn, hostile mobs burn away, and your spawn point moves to the bed.

▤ 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.
Watch out: the red vignette flash means damage. Hear a hiss? A creeper is counting down — run.
Pro tip: torch the area around your base — mobs only spawn where light < 7.

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

MobBehaviour
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.
Too dark? The pause menu's Gamma slider (0.6–2.2) brightens shadows globally — great for deep caves and night play.

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)

OptionEffect
ResumeUnpause and re-lock the mouse
Difficulty — Easy / Normal / HardMob 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 gameStores position, health, inventory, time of day and every block you've changed in browser localStorage
Load gameRestores that save exactly — even after closing the page
Remember: the world only saves when you click Save — make it a habit before closing the tab. Settings save automatically.

🎲 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.
This page has sounds too — click things! Toggle with the ♪ button up top.

15TROUBLESHOOTING

ProblemFix
Blank/blue world, only UI visibleHard-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 screenInternet is needed the first time so Three.js can load from its CDN.
Stuck inside terrain after loadingYou rise out automatically. If not: save, reload the page, Load again.
Too darkPause (P) → raise Gamma.
Too many / few monstersPause (P) → Difficulty.
Save goneSaves 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 (constant WORLD_SEED at the top of the file) — change it for a whole new world.
Files: davecraft.html — the game · readme.html — this manual · README.md — the plain-text manual