npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

blk-server

v2012.12.31-2

Published

BLK game server.

Downloads

24

Readme

blk-game

THIS IS NOT MINECRAFT. This is my 20% project attempt at creating a fully modifiable multiplayer voxel world in JS that can run efficiently in the browser and learning what the pain points are in doing a project of this scale. It's just a tech demo of a high-fidelity 100% JavaScript game. Enjoy it for what it is!

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!

Tech

This project uses anvil-build as a build system and builds atop the low-level web game framework games-framework.

Underlying this demo is a highly modularized library I wrote for this project, games-framework, that sits atop Google Closure, using the Closure Library as a base and the Closure Compiler to build the tiny output Javascript files. Designed to be a set of tools to enable rapid high-quality games, it's not an engine (like Unity) or scene graph (like three.js), but more like XNA or SDL. Pick what you need, get started quickly, and spend timing writing game code vs. platform abstractions.

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.

Setup

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.

Contributing

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.

License

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!

Credits

Code by Ben Vanik. See AUTHORS for additional contributors.

Audio

Sound effects: Sean Dunn

Music: Knuck Beatz So Many Blocks, So Little Time (Minecraft Soundtrack)

Fonts

Bitmap font used in game: Lord Nightmare/IBM's EGA Font (from The Dwarf Fortress Wiki)

TTF font used in UI/etc: Volter (Goldfish)

Textures

The Painterly Pack