Collaborative gameboy emulation powered 100% by JavaScript. IO service
1.9K
Install with
$ npm install
Then run it with the following ENV vars:
WEPLAY_PORT - pointing to the port you want to listen on (3001)WEPLAY_REDIS - redis uri (localhost:6379)WEPLAY_SERVER_UID - unique persistent identifier for this server's
instance. Used for keeping track of # of clients in redis
(defaults to WEPLAY_PORT)WEPLAY_IP_THROTTLE - the least amount of time in ms that need to
pass between moves from the same IP address (100)$ node index
This will set up the IO server for weplay. It's necessary that you also launch the other services:
The weplay-emulator service runs a JavaScript-based gameboy color emulator that gets painted to an instance of node-canvas.
Upon each draw an event is emitted and the PNG buffer is piped through Redis to all the IO instances of weplay (this project).
With Socket.IO 1.0 binary support, we can seamlessly transfer the image
data contained in the Buffer to all the connected clients, in addition
to all the JSON datastructures to make chat and commands work.
This makes weplay a 100% JavaScript project!
weplay IO node, clients can be rerouted
to another instance and reconnect automatically thanks to
socket.io-client.
weplay-presence service that aggregates the
connection counts of all servers.weplay-emulator, the next time it boots up
it restores the virtual machine state that gets persisted by default
every 60 seconds (for performance reasons).If you have ideas or contributions, join #weplay on Freenode.
MIT
Content type
Image
Digest
Size
348.1 MB
Last updated
almost 9 years ago
docker pull iromu/weplay