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

Posts made by DinhNguyen

RE: Joining specific rooms, playing against friends

@endel said in Joining specific rooms, playing against friends:

One thing I've forgotten to mention is how to connect to the "private" room from the client-side. You'd have this call in your client:

import { Client } from "colyseus.js";

const client = new Client("ws://...");
client.join("private", { password: "someUniqueCode" })

I have a problem with private room. If same password and this room is fully connected=> new Room'll be created with this same password. I don't want this, that I warning for user "This room is fully, plz...."

Do you have any solutions for this problem?

posted in Questions & Help • 1 Apr 2019, 08:36
RE: onLeave timeout

I have same question. How do you resolve it?
"Should I set a timeout for each client?"

I have read source code in here:

const DEFAULT_SEAT_RESERVATION_TIME = Number(process.env.COLYSEUS_SEAT_RESERVATION_TIME || 5);
...
// seat reservation & reconnection
protected seatReservationTime: number = DEFAULT_SEAT_RESERVATION_TIME;
...
public setSeatReservationTime(seconds: number) {
	this.seatReservationTime = seconds;
	return this;
}

Variable "DEFAULT_SEAT_RESERVATION_TIME" for change time with this problem?

posted in Questions & Help • 28 Mar 2019, 06:35

© 2023 Endel Dreyer