Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (32 sloc) 1.284 kb

Whatajong

This is an example of an html5 multiplayer game with nodejs and socket.io.

Installation

git clone https://github.com/masylm/whatajong
npm install
cp default.conf.js conf.js

Edit the conf.js file with your specific configuration and you are ready to go!

How does it work?

Half the game work in the client, and the other half in the server. Both parts are communciated via socket.io exchanging events and state.

.-----------.                   .-------------.
| Server    |                   | Browser 1   |
+-----------+                   +-------------+
|           |                   |             |
|           | <=== Events ======| public/js/* |
|           |                   |             |
|           |                   '-------------'
|           |
| serverjs  |===== State (broadcast) ====>
|           |
|           |                   .-------------.
|           |                   | Browser n   |
|           |                   +-------------+
|           |                   |             |
|           | <=== Ecents ======| public/js/* |
|           |                   |             |
'-----------'                   '-------------'
Jump to Line
Something went wrong with that request. Please try again.