The multiplayer framework you were looking for

What is it?

SSMMS is a lightweight library to create and join rooms, and, to send messages in them.
SSMMS is built on top of NodeJS, Express and Socket.io, the whole thing is then hosted on a Heroku Dyno.

How do I use it?

Usage is very simple, include the library in your index.html file like so:
<script src="https://ssmms.herokuapp.com/"></script>
Then initialise the library by calling the SSMMS constructor, specifying whether you want to log debug messages on the console:
var server = SSMMS(debug);
then initiate a connection passing your server:
server.Connect(server);

Is that it?

While this is enough to get a connection going, you may want to setup your handlers for the various events that happen:

  • Messages Handler : var MessageHandler = function(type, message){}
  • OnConnected Handler : var OnRoomsReceivedHandler = function(roomsOnServer){}
  • OnUserDisconnected Handler : var OnUserDisconnected = function(){}
  • OnError Handler : var OnError = function(errorCode, errorDescription){}

Error codes are of two types:

CNC for could not connect errors
CNJ for could not join errors

Functions

OTHER STUFF I'VE DONE:

If you feel like helping me out, feel free to make a donation to support development, any amount is appreciated :)