Is there a way to choose or influence what the roomId will be when a new instance of a room is created?
For example, if I do something like
gameServer.register("chat", ChatRoom).then((handler) => {
handler.
on("create", (room) => console.log("room created:", room.roomId)).
on("dispose", (room) => console.log("room disposed:", room.roomId)).
on("join", (room, client) => console.log(client.id, "joined", room.roomId)).
on("leave", (room, client) => console.log(client.id, "left", room.roomId));
})
and set max clients to 2, when a new client joins the "chat"
room then a new room instance gets created with a unique roomId
. That's great, but the room IDs are not so friendly and so if I want one player to give his room ID to another so they can play in the same game, I would like friendlier room IDs. Can the server (or better yet the client) somehow influence the room ID either by choosing it directly or providing a suffix or prefix?
Thanks.