Virtual SFS Room

Post here your suggestions for new possible features in SmartFoxServer 2X.

Moderators: Lapo, Bax

Hassan Khallouf
Posts: 41
Joined: 06 Jul 2017, 04:35

Virtual SFS Room

Postby Hassan Khallouf » 20 Mar 2022, 12:12

Hello SFS folks,

I have talked about this before with one of the SFS team, we had an issue before that we got resolved over email, we asked for this feature and they said they will consider it, it's been a while now but I thought I should throw this out again.

the problem was that we had a lobby room that everyone joins when they first connect to the game servers, this made the room generate so much traffic for thousands of users in it and thousands of continuous join/leave event

we temporarily solved the issue by disabling all join/leave event on this room, but SFS still syncs the entire user list when the user joins the lobby room every-time, this information is useless to our use case and we don't need it to be sent at all, someone could say then why do you need a room in the first place?

now here is where the virtual room concept came to be, we have several pieces of game logic that depends on wether the player is in the main lobby or not, so we need nothing more than a list of users!

however, SFS room has everything taken care of already, thread safety for joins and leaves, integration with the already used everywhere api of join/leave requests, seemless integration with User.IsInRoom, and the cherry on the top, auto sync for room variables (which we use)

so all what we need to do is a mechanism to disable sending the users list for players when they join the room, other wise we will have to reinvent the wheel to what SFS already does best.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Virtual SFS Room

Postby Lapo » 21 Mar 2022, 11:23

Hello,
we haven't forgotten about this :) In fact we have an update coming up in the a few weeks and we're going through a number of items in our TODO list. One of which is the so-called "Virtual Room".

now here is where the virtual room concept came to be, we have several pieces of game logic that depends on wether the player is in the main lobby or not, so we need nothing more than a list of users!

You mean a list of Users on the server side only? Right? Because on the client side, once this is active, there will be no User list.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Hassan Khallouf
Posts: 41
Joined: 06 Jul 2017, 04:35

Re: Virtual SFS Room

Postby Hassan Khallouf » 21 Mar 2022, 11:55

I'm really glad to hear it, this will definitely help us build a better architecture.

You mean a list of Users on the server side only? Right? Because on the client side, once this is active, there will be no User list.


yes I mean a users' list in the server side, all what the client needs to know is that it's in the room
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Virtual SFS Room

Postby Lapo » 21 Mar 2022, 14:17

This could be done with a specific flag on the CreateRoomSettings object, server side, let's say it is called suppressUserList.
By default this would always be set to false. When it's set to true this would return an empty User List upon ROOM_JOIN event and disable the USER_ENTER and USER_EXIT events (since it wouldn't make sense to keep those two ON anyways).

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
Hassan Khallouf
Posts: 41
Joined: 06 Jul 2017, 04:35

Re: Virtual SFS Room

Postby Hassan Khallouf » 22 Mar 2022, 11:13

yes this is exactly what we are looking for, but I assume you are saying this is what will be released not the state right now correct?

also this room is setup in the zone config before the server runs, so will this flag be available in the admin tool as well ?
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Virtual SFS Room

Postby Lapo » 22 Mar 2022, 14:57

Hassan Khallouf wrote:yes this is exactly what we are looking for, but I assume you are saying this is what will be released not the state right now correct?

Yes that's how we plan to implement it.

also this room is setup in the zone config before the server runs, so will this flag be available in the admin tool as well ?

Yes

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
Hassan Khallouf
Posts: 41
Joined: 06 Jul 2017, 04:35

Re: Virtual SFS Room

Postby Hassan Khallouf » 29 Mar 2023, 09:19

Hello Lapo,
we have been using this feature since its release, and it's working like a charm for us

however, we noticed that one request we do (Change NickName) does not update the client and the name stays when he is in a room with USER_VARAIBLES_UPDATE_EVENT disabled

so we thought, that's simple the room is already using the supressUserList so enabling the variables update event will only send to the one user and it should work, so I enabled the event in the room and the dropped packets shot up from 0% to 4%

is there any explanation for this?

and why do we have to turn on this event for the user to receive updates about his own variables ?

Return to “2X Features Wish List”

Who is online

Users browsing this forum: No registered users and 10 guests