an open source voxel game building toolkit for modern web browsers


voxel.js is a collection of projects that make it easier than ever to create 3D voxel games like Minecraft all in the browser.

It was written by @maxogden and @substack, two non-game developers that want to make voxel games easy, fun and modular. If you find bugs it is most likely because we don't really know what we are doing when it comes to making games.


Here is a presentation from May 2013 that covers all the exciting stuff happening in voxel.js land!


All of the code is open source! If you find bugs or have ideas for improvements please open issues for them on the related github project, or better yet send code or write new modules. You can also donate to the project on gittip, a site that lets people support open source programmers through small recurring donations.


Instead of making a giant game framework we instead decided to split voxel.js up into a bunch of small building blocks (modules). Modules can be installed with npm, the package manager from node.js. Here are some modules that we have already started working on:

The Core


lets you add some NPC creatures to your game
configure how much debris appears (and debris physics) when you destroy a block
decorate your world with procedurally generated trees
generate voxel worlds using perlin noise
generate voxel worlds using simplex noise (like perlin noise but newer)
a module that makes it easy to get pointer lock in browsers
the velocity and gravity algorithms for players
- add a customizable toolbar that lets players select items
load minecraft skins in as three.js mesh objects
script a virtual nodecopter inside voxel games!
easily load custom textures into voxel games
rotation relative based movement for 3d objects (used in voxel-drone)
create teleport portals textured with the camera view at the destination
save and load voxel games with HTML5 IndexedDB. work in progress
positional audio for objects in voxel games using the HTML5 Web Audio API
a module you can install to get the painterly pack block textures
highlight or manipulate with the voxel that the player is currently looking at
pick up and throw voxels
calculate trajectories for objects. used in voxel-throw
an early version of a portal gun using voxel-portal
generate terrain using a png heightmap
voxel post processor. this is a wrapper for @alteredq's THREE.EffectComposer, which allows you to stack fragment shaders for nice effects such as bloom, blur, mosaic filters and so on
axis aligned bounding boxes. useful for building something that you intend to collide with the world or other objects
a spatially-aware event emitter, designed to work in 3d space with aabb-3d
given a spatial event emitter (with spatial-events) and an axis aligned bounding box (with aabb-3d), creates a new event emitter that emits enter and exit events when spatial events indicate that something has passed into the bounding box
automatically teleports the player back to a known location if they enter a certain region of the world (e.g. fall off the map)
3D side by side rendering to be used with the Oculus Rift
upload screenshots to imgur and post to twitter from inside a game
let it snow, let it snow, let it snow
a color grading module
add labels to your players

The goal for all of these modules is that they are fun, simple and easy to hack.

Tools & Utilities

Voxel Critter Creator
voxel object/creature editor. (doesn't actually depend on any voxel.js modules, uses 2D canvas renderer)
a Vagrant VM for building voxel games
multiplayer voxel games! note: this is still a work in progress and isn't a smooth as it should be yet
make your own minecraft skin. made for minecraft but works with the minecraft-skin module

Making your first game

Making a game from the command line

Here is a handy video screencast from @shamakry that will teach you how to get started in under 10 minutes:

If you don't wanna watch a video you can follow these instructions instead:

To use the voxel.js modules you will need to install node.js (which will also install npm) and be able to use your computer's command line.

Once node.js is installed, you can install the basic voxel.js npm package in your project directory, and then install a basic texture pack. Make a file called package.json in your project directory and give it these contents:

  "name": "mygamename",
  "version": "0.0.1",
  "dependencies": {
    "voxel-hello-world": "0.6.0"

Now you can tell node to install your dependencies:

$ npm install

Next, create mygame.js and put the following code in it:

var createGame = require('voxel-hello-world')
var game = createGame()

Then to build your game you use browserify:

$ npm install browserify -g
$ browserify mygame.js -o builtgame.js

Load builtgame.js into a web page:

<!doctype html>
    <script src="builtgame.js"></script>

Now you should be able to play your game by opening up index.html in your browser.

There are API docs in the voxel-engine readme

Get Involved

Here are some ways to learn and/or get involved with voxel.js:


Repositories you can hack on

New Project Ideas

For more modules check out these voxel.js contributors on NPM


The 0fps blog posts on voxel meshing by @mikolalysenko are the reason voxel.js exists. Highly recommended reading! Definitely check out the meshing toolbox.

mr. doob and three.js are what voxel.js is built on top of.

webgl-meincraft is a great tech demo that showed a lot of this can be done in a browser

Jonas Wagner made a killer demo and gave a great talk about Voxel Worlds on the web that helped to inspire this project.

Fan Art

Here are some of the wonderful things users have made with their voxel worlds. Tweet @voxeljs or email max@maxogden.com your photo to submit your art!

by @jllord
voxeljs logos, BSD licensed by @jllord