Navigation

  • Recent
  • Tags
  • Users
  • Search
  • Login
Colyseus
  • Login
  • Search
  • Recent
  • Tags
  • Users

Documentation GitHub

We're migrating to GitHub Discussions. This forum does not accept new registrations since April 6, 2023.
  1. Home
  2. madki
madki

madki

@madki

Chat Follow Unfollow
3
Reputation
3
Posts
1.4k
Profile views
0
Followers
0
Following
Joined 22 Aug 2018, 12:58 Last Online 6 Sept 2018, 18:14

  • Profile
  • More
    • Continue chat with madki
    • Flag Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups
madki Follow

Posts made by madki

RE: Join vs create room

@endel Now I get it! Thanks so much for the help. I have enough to get started on my project.

Just curious though, why isn't an explicit create call supported? I see it being useful in scenarios where users can create their own game and share it with friends. The rooms can't really be locked when the game starts as the players might change devices during the course of the game. When there are many existing rooms, the creation of new rooms might become expensive. Is it a security concern for the clients to be able to create the rooms, or just not a common scenario?

Regards,
Madki

posted in Questions & Help • 23 Aug 2018, 07:08
RE: Join vs create room

Hi @endel,

Thanks for the quick response and the amazing library!

Thanks for the code references. I have better clarity of the process now. What I'm still trying to wrap my head around is how the create option in the create-or-join-room example is consistently able to create a new room. Once a room has been created shouldn't the second request join the same room? Why isn't the request able to find a suitable existing room? As far as I can see the room created after the first request still satisfies the options for subsequent ones.

Regards,
Madki

posted in Questions & Help • 22 Aug 2018, 19:06
Join vs create room

I've been looking at the colyseus-examples repository. All the examples are very instructive. However, in the create-or-join-room example, I'm unable to figure out how the room creation is happening.

Both for joining or creating the room the code in create-or-join-room.html seems to be calling the client.join function. When additional options are being passed isNewRoom is also being set to true. I'm unable to figure out how it's working. When does isNewRoom set to true? I can also see onInit for the room being called before requestJoin.

Could you please explain the flow of the code? I've looked into the code of MatchMaking.ts but haven't figured out the flow yet.

Thanks,
Madki

posted in Questions & Help • 22 Aug 2018, 13:07

© 2023 Endel Dreyer