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. Scopique
S

Scopique

@Scopique

Chat Follow Unfollow
0
Reputation
3
Posts
1.0k
Profile views
0
Followers
0
Following
Joined 7 May 2021, 20:52 Last Online 28 Jul 2021, 01:35

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

Posts made by Scopique

RE: Dynamic Rooms (sovled)

@endel Excellent, thank you! I'll check these out.

posted in Questions & Help • 8 May 2021, 00:19
Dynamic Rooms (sovled)

Hi folks; long time reader, first time caller.

I'm going through the docs to learn about Colyseus for a concept I'm considering. In this concept, I'd need to create many, many, many "rooms". Each room would hold a small number of players who could then move between rooms.

Each room would actually provide the same logic, but the data that I pull from the database would be the differentiating factor.

Specifically, each room would represent a "sector" in space, and each sector would have different features: stars, planets, stations, etc.

Using Colyseus, is there a way to "template" a room and spawn an instance onJoin, assigning it an identifier/ID based on the options passed in from the client? Specifically, a room would represent a "sector", and I'd like to have several dozen sectors. As you can imagine, creating several dozen static rooms means duplicating code several dozen times, and any change to one would require a change to all. Instead, I'd like to be able to create a room and instantiate it based on data from a database (If a player wants to enter "sector 112", the server would spin up a sector instance and query the datastore for all info on "sector 112" when building that room).

Thanks!

posted in Questions & Help • 7 May 2021, 21:03

© 2023 Endel Dreyer