BLK game server.
Want to see pretty graphs? Log in now!
npm install blk-server
|6||downloads in the last week|
|24||downloads in the last month|
|Last Published By|
|Version||2012.12.31-2 last updated a year ago|
|Dependencies||abbrev, options, ws, microtime|
I wanted to do something productive with my 20% time at Google. I've been preaching that the web is finally ready for real games, so I figured I'd try to make one. This is the result. Heavy inspiration comes from Mojang, of course: Minecraft is cool, but more importantly it's technically difficult to get running well, especially in the browser.
All of the code for this project, including the voxel world client and server, the game framework, and the build system used to produce the final output are all open sourced. I'll be continuing to develop the game framework and build system, and if I have time throw some more features into this demo (like real gameplay, for example). Feel free to fork! Have fun!
The server portions of the demo are written such that they share code with the client and can run both on node.js and in the browser. This enables a great deal of code reuse and the ability to do things like a local game server when running offline or multiplayer over the network using node. The Closure Compiler ensures that code that's used exclusively on the server isn't included in the code sent for the client and works great in all environments.
Wanna play around?
# Ensure you have python, pip - on OSX, get homebrew or macports! git clone https://github.com/benvanik/blk-game.git cd blk-game/ # Run the setup script to initialize the repo and dependencies ./scripts/setup.sh # This must be run each session: source blkrc # Build debug - do this when changing soy/gss/glsl/etc, but js is edit-reload anvil build -j1 :debug # Start a web server, open http://localhost:8080/client/index.html?dev anvil serve & # Start a debug node game server ./server/server-uncompiled.js # Do a release build anvil build -j1 :release # Run a release node game server ./server/server.js # CD someplace else and npm install the server to get a standalone copy: cd /tmp/my-blk-server/ npm install [path to git checkout]
NOTE: you must pass -j1 to anvil when building. I'll fix this eventually.
- Add a map generator: map-generators
Have a fix or feature? Submit a pull request - I love them! Note that I do keep to the style_guide, so please check it out first!
As this is a Google project, you must first e-sign the Google Contributor License Agreement before I can accept any code. It takes only a second and basically just says you won't sue us or claim copyright of your submitted code.
All code except dependencies under third_party/ is licensed under the permissive Apache 2.0 license. Feel free to fork/rip/etc and use as you wish!
Sound effects: Sean Dunn
Music: Knuck Beatz So Many Blocks, So Little Time (Minecraft Soundtrack)
TTF font used in UI/etc: Volter (Goldfish)