Skip to content

Userman1242/Autocreations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voxel Craft

A from-scratch, Minecraft-inspired voxel sandbox built with vanilla JS and Three.js. Procedurally generated terrain, first-person movement/physics, and block breaking & placing - all original code with procedurally generated pixel-art textures (no Mojang assets involved).

How to play (easiest way)

  1. On the GitHub page for this project, click the green <> Code button, then click Download ZIP.
  2. Find the downloaded ZIP file (usually in your Downloads folder) and unzip it (double-click it, or right-click and choose "Extract All").
  3. Open the unzipped folder and double-click index.html.
  4. It opens in your web browser - click "Click to start" and play!

That's it - no installs, no terminal, nothing else needed. Everything (the 3D engine included) is bundled into this project, so it works completely offline.

Run it from a local server (optional, for developers)

If you'd rather serve it over HTTP (e.g. while editing the source files):

npm run dev

Then open http://localhost:8000 in your browser.

If you change any file in js/, rebuild the bundle that index.html actually loads:

npm run build

(or npm run watch to rebuild automatically while you work.)

Controls

  • WASD - move
  • Mouse - look around (click the screen to lock the pointer)
  • Arrow keys - look around (fallback if pointer lock isn't available)
  • Space - jump
  • Shift - sprint
  • Left click - break the targeted block
  • Right click - place the selected block
  • 1-6 - select a block from the hotbar

Project layout

  • index.html / style.css - the page, UI overlay, hotbar, crosshair
  • dist/game.bundle.js - the built game (generated by npm run build - this is what index.html actually loads)
  • js/noise.js - seeded Perlin-style noise used for terrain generation
  • js/textures.js - procedural pixel-art texture atlas (grass, dirt, stone, sand, wood, leaves, water, bedrock)
  • js/world.js - chunked voxel world: terrain/tree generation and mesh building with face culling
  • js/player.js - first-person controller with gravity and AABB collision
  • js/main.js - scene setup, raycasting for block interaction, hotbar UI
  • js/vendor/three.module.js - vendored copy of Three.js (bundled in by npm run build)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors