Skip to content

DataMinerUK/voxeljs-vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrant VM for voxel.js development

A Vagrant VM for developing voxel.js games.

Getting Started

Install VirtualBox and Vagrant if not already available.

Create the voxeljs VM instance:

vagrant up

Wait while the VM image in downloaded(first time only) and configured for node.js development.

The VM run a NGINX to serve games, examine the voxel.js getting started example at:

http://localhost:8080/games/example/

Compiling Your Own Games

You can develop your own games on your host machine in the games directory and use the VM to compile and serve them.

To compile a game in games/new-game, first ssh to the VM:

vagrant ssh

Then change to the directory location, shared from your host:

cd /vagrant/games/new-game

Install any necessary node modules from the packages.json description:

npm install

Then compile the game using browserify:

browserify new-game.js > new-game-compiled.js

The generated Javascript can be fairly large so you may want to run it through uglifyjs.

uglifyjs -c new-game-compiled.js > new-game-compiled.min.js

HTML files in games/new-game will be served from the VM via port forwarding to your host machine at, e.g.:

http://localhost:8080/games/new-game/index.html

Export Configured VM Image

You can package and export the configured Vagrant VM into a new VM image:

vagrant package --output export/voxeljs.box

There is a Vagrantfile in export that can be used to create new VM instances from this packaged VM.

About

A Vagrant VM for building voxel.js games.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published