A WebSocket library optimized for multiplayer JS games, works on WebWorkers with binary data.
Rhubarb is a lightweight WebSocket library for multiplayer HTML5 games. It is originally designed to be used by the ROYGBIV Engine. However it can be used outside of ROYGBIV as well.
Rhubarb is named after this Aphex Twin track.
Rhubarb works both on browsers and NodeJS.
Javascript is slow, therefore we want to have as much main-process-power as we can in order to do game related calculations, graphics rendering and achieving 60 FPS.
For multiplayer games achieving 60 FPS gets even more complicated given that transferring data over WebSockets is a slow operation. It also triggers GC activity by copying the transferred data (if JSON is the preferred way), which eventually slows down the main thread as well.
Rhubarb is designed to overcome these problems by:
For clients: <script src="PATH_TO_Rhubarb.min.js"> </script>
For servers: npm install rhubarb-js
See this tutorial to see how to use Rhubarb.
See here for the API reference.
See here
Rhubarb uses MIT license.