So i want our room capacity to be 300. Now those 300 can be spectators or players.
So i was trying to set maxUsers=300 and maxSpectators=300. But that made my room capacity to be 600. I do not want that.
What settings should i choose ?
Urgent : maxUsers & maxSpectators
Re: Urgent : maxUsers & maxSpectators
If you want 300 total users, you'd probably have to implement something yourself. I'd probably set them both to 300, use the privilege manager prevent the SFS join room requests. Then create a custom extension handler to implement the join-room request the way that you want. For example:
Code: Select all
if( room.userCount() + room.spectatorCount() < 300 ) {
// Move user to room, remove user from last room, perform other logic
} else {
// Throw exception
}
Re: Urgent : maxUsers & maxSpectators
Before I answer your question I need to warn you that 300 player/watchers in a Room could be way too much for a regular, internet-based game. Unless you have already figured out how to optimize the client updates, firing 300 events for every move of each player is likely to generate too much traffic and the clients won't be able to keep up with it.
Back to your question, players and spectators are two separate entities in a Game Room so you should set a max for each of those.
If you don't need to discriminate between players and watchers then simply do not use a Game Room, use a regular Room instead.
Back to your question, players and spectators are two separate entities in a Game Room so you should set a max for each of those.
If you don't need to discriminate between players and watchers then simply do not use a Game Room, use a regular Room instead.
Who is online
Users browsing this forum: Stevenor and 61 guests