GitHub Documentation

Room creation and handling philosophy

  • Hello I'm Daniel, I'm new here. I just discovered this framework last weekend, it looks very interesting I'd like to use it in a card game that I'm building.

    I'd like to have a room for "connected players" or sort of channel that updates "client's player list" every time a client connects with the server.

    So I have a server that defines a Room Handler for the room name of "connected_players".

    Then in the client I installed "colyseus.js" and I attempted to make the client join this room by name, but apparently the room doesn't exists... so I thought I have to create it and changed the method for joinOrCreate, that worked.

    So what's the question ? My first thought was that the server when defines a room it make it already available but apparently the client has to created...

    Is that the purpose of joinOrCreate method ? Do you have another approach to broadcast the connected users ?

    Thank you in advance.


© 2021 Lucid Sight, Inc