Its a tiny app to make an experiment with WebSockets. It uses Node as application manager, and Sinatra as front server.
In order to run this app you need to have installed:
- Ruby
- Sinatra
- Node
- CoffeeScript
Just clone the repository.
git clone git://github.com:wilkerlucio/ws.squares.git
You need to run the two servers:
ruby game.rb
coffee ws-server.coffee
Them open some browser windows (prefer Chrome 4+ which supports websockets natively) and access:
http://localhost:4567
Use the keyboard arrows to move your square, when you move, your square position will be automatically updated on other screens at real time :)
For purists, I exported a js version of ws-server. You can run this without coffee.