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.
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.
There are a few todo's in the code, as well as anything else that might be cool or fun.
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!