Creating a Hidden Room on the Server Side

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
ciaoamigos
Posts: 70
Joined: 05 Sep 2021, 16:57

Creating a Hidden Room on the Server Side

Post by ciaoamigos »

Hello everyone,

I am trying to find a way to create a server-side room in SmartFox Server and make it hidden so that it doesn't appear when I call sfs.roomManager.getRoomList() on the client side. I have gone through the SmartFox Server documentation, but I haven't found a clear solution. Could someone kindly guide me on the correct way to achieve this?

Thank you in advance for your assistance!
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Creating a Hidden Room on the Server Side

Post by Lapo »

Hi,
you can create the Room and associate it with a Room Group that is not auto-subscribed by Users. This way it will not appear on the client side. Players can still join the Room if they know its name or Room id, which, is unlikely from their.

This works well in those cases where the join request is done from the server side, where you can create the "hidden" Room and keep a reference to it in the Extension to join selected/authorized Users. You can also make the Room private for extra security, if required.

If you need a refresher on Rooms and Room Groups see here:
http://docs2x.smartfoxserver.com/Develo ... chitecture

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply