Skip to content

(Project) Externally controlled Node.js Pong server and Three.js WebGL client.

Notifications You must be signed in to change notification settings

nicovalencia/nodejs-pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Pong

This is a Node.js driven Pong game that a friend and I are using for a Hack and Tell demo. The idea came around when we wired up Wii-mote controllers to and Arduino, and wanted a visual game to connect their output to.

All Pong logic is calculated server-side and published to clients via WebSockets. Event emitters on the server manage data publishing/subscribing.

You can use the subscriber module to wire up any sort of controller you want.

Demo

Setup

Install the latest Node.js (I like to use NVM for version management):

curl https://raw.github.com/creationix/nvm/master/install.sh | sh

Set the active version of Node.js:

nvm use

Install Node packages:

npm install

Start the server:

npm start

In another window, build and watch the development assets:

grunt

Grunt.js is used for development builds, so make sure to have that installed.

Todo

There are a few todo's in the code, as well as anything else that might be cool or fun.

Credit

Eli and I built this stuff. We found the SkyBox CubeMaps from this guy. The board images were found on Google Images, if we ever make this something bigger, I'll switch them out for some OS content. Everything else is pretty much hacked together JAYSCRIPT YO!

About

(Project) Externally controlled Node.js Pong server and Three.js WebGL client.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published