Learn more at http://voxeljs.com
npm install voxel-hello-world
var game =
The first time you set up, you should install the required npm packages:
cd voxel-hello-worldnpm install
Then run the start script:
Then point your browser to http://localhost:8080 and have fun!
voxel.js modules use browserify for packaging modules together into game bundles. This means that every time you change code in your game you have to build a new bundle in order to test it out. Luckily this is very easy and is automated. When you run the
npm start script, it runs a local server: when the browser requests
index.js, it compiles it serverside and then serves up the compiled version.
The upshot is, as long as you're running the
npm start script in the background, you can save your changes to index.js and reload the game to see the new code in action, without having to have a build step in between. (If you'd like to change the start script, it's contained in the
package.json file in the root directory.)