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. gioragutt
  3. Posts
  • Profile
  • More
    • Continue chat with gioragutt
    • Flag Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

Posts made by gioragutt

RE: Creating a room from another room?

Found sort of a solution - use RegisteredHandler's create event to subscribe to the room's event.
The changes can be found here.

I wanna make an important note here:

Creating an async main method in index.ts and awaiting gameServer.register was crucial.

posted in Questions & Help • 12 Nov 2018, 00:23
Creating a room from another room?

I have a flow that when a client enters the game, I use getAllAvailableRooms to get all game lobbies a client can join, or allow him to create a new one (See the PR I sent to colyseus).

After they join a game lobby, they basically join a GameLobby room, which waits until all clients are ready and the owner presses Start and the game should then start.

My idea is that I should be able to create a room from inside the onMessage function,
which would in turn give me the newly created roomId, which I can broadcast to my players with a start_game action.

But unfortunately, a room cannot access the matchmaker...

Given that - how would you go and make something like that?

Btw, this is the repo for code example and references.

posted in Questions & Help • 11 Nov 2018, 23:47
Metadata is not readable on Unity3D client

As stated here, When trying to get AvailableRooms in the unity client, the metadata field does not deserialise correctly.

posted in Questions & Help • 9 Nov 2018, 13:59

© 2023 Endel Dreyer