newRoom = helper.createRoom(currZone, map, null, true, true);
UserA - in lobby (non-game room)
UserB- in game room
UserC-About to join game room. But before that when his request arrives at the server side, I am creating a new gameroom in handleInternal event. After room creation, only User C and User A got the onRoomAdded event fired at the client side...Is it how helper.createRoom(....) works?????.
How to make all users in a zone synchronized after room creation???????? helper.sendRoomList(....)????? But this will send the entire room list and also this call invokes onRoomListUpdate in the client I dont want this to happen. Is there any other better approach.....???
onRoomAddedHandler is not fired on client side
Re: onRoomAddedHandler is not fired on client side
Hi.
Yes, that's the expected behaviour. You can read more about room's behaviour on these white papers.
On the Tris example, when a client leaves the game, the client requests the roomList again from the server. If you think that it is using too much bandwidth, you can always do it yourself, by sending manually from a server-side extension a custom roomList with, for example, only the games that still have empty slots, etc, which will save some bandwidth. In the last case, you can always use regular rooms instead of game-rooms, as they receive the onRoomAdded and onRoomRemoved events.
Yes, that's the expected behaviour. You can read more about room's behaviour on these white papers.
On the Tris example, when a client leaves the game, the client requests the roomList again from the server. If you think that it is using too much bandwidth, you can always do it yourself, by sending manually from a server-side extension a custom roomList with, for example, only the games that still have empty slots, etc, which will save some bandwidth. In the last case, you can always use regular rooms instead of game-rooms, as they receive the onRoomAdded and onRoomRemoved events.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: onRoomAddedHandler is not fired on client side
Hi,
We have solved that problem by making the user stay both in lobby as well as in game room. I have set the lobby limit to around 500000.
So he will be getting the roomAdded event all the time....Do you think this is a better approach????
We have solved that problem by making the user stay both in lobby as well as in game room. I have set the lobby limit to around 500000.
So he will be getting the roomAdded event all the time....Do you think this is a better approach????
Re: onRoomAddedHandler is not fired on client side
Well, it depends on your application. If games just take around 1-2 minutes, then yeah, it is better if you also handle the onRoomAdded event. But even in that case, i don't think the room will be capable of handling such a number of users - remember that if the room has 500.000 players, each time you create or remove a room, it has to send a message 500.000 times.
So my suggestion is to follow the flow as SFSTris suggests, and to maybe send a custom list of rooms, showing only the available games.
So my suggestion is to follow the flow as SFSTris suggests, and to maybe send a custom list of rooms, showing only the available games.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 26 guests