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?
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!