Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

colyseus.js

Package Overview
Dependencies
Maintainers
1
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colyseus.js

JavaScript client for Colyseus Multiplayer Game Server

  • 0.4.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.1K
decreased by-18.27%
Maintainers
1
Weekly downloads
 
Created
Source

colyseus.js for the browser Join the chat at https://gitter.im/gamestdio/colyseus

JavaScript client for colyseus - a Minimalistic MMO Game Server for Node.js.

Usage

var client = new Colyseus('ws://localhost:2657');
var roomName = "room_name"
var room = client.join(roomName)

room.on('join', function() {
  console.log(client.id, "joined", roomName)
})

room.on('error', function() {
  console.log(client.id, "couldn't join", roomName)
})

room.on('leave', function() {
  console.log(client.id, "leaved", roomName)
})

room.on('data', function(data) {
  console.log(client.id, "received on", roomName, data)
})

room.on('patch', function(patches) {
  console.log(roomName, "will apply these changes:", patches)
})

room.on('update', function(newState, patches) {
  console.log(roomName, "new state:", newState, "changes applied:", patches)
})

License

MIT

Keywords

FAQs

Package last updated on 31 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc