Colyseus: is it possible to allow client actions from server?

Created on 21 Apr 2020  路  3Comments  路  Source: colyseus/colyseus

I have a complex and large game state that I want to split to several servers. I would like to create / destroy rooms from within the server.
My idea is to open colyseus.js from within the server and connect it to itself. Is it possible? is there another way, lighter performance-wise?

All 3 comments

Hi @amir-arad, glad to see you're still here :) I think you can use the matchMaker to perform these actions.

import { matchMaker } from "colyseus";

matchMaker.createRoom(/*...*/) // create a room
matchMaker.remoteRoomCall(roomId, "disconnect"); // destroy the room

Let me know if that's enough for you! Cheers

yeah I've had lots of "life" going on and I'm trying to get back to the important stuff :)

worked nicely. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oyed picture oyed  路  7Comments

BjoernRave picture BjoernRave  路  6Comments

endel picture endel  路  5Comments

DenisNP picture DenisNP  路  5Comments

dengzhaofun picture dengzhaofun  路  6Comments