is onUserVariablesUpdate 100% guaranteed?

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

poppop
Posts: 57
Joined: 07 Jul 2007, 10:24

is onUserVariablesUpdate 100% guaranteed?

Postby poppop » 22 May 2008, 14:24

Hi,

Im just wanting to check...

If i use onUserVariablesUpdate to recive x and y positions of other users in the room. -- let's be thinking in the future, say there are 3000 people in the room, and they are walking about using the onUserVariablesUpdate x and y

Are all users in the room 100% going to recive the persons moving variables?

Otherwise they would just appear to be standing still and could get killed???

Cheers.

Cheers.
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

Postby patso » 22 May 2008, 18:48

Depends. SFS can drop messages.

In the server config file <MaxAllowedDroppedPackets> says how much messages can be dropped before the client is disconnected. If you want all messages to be delivered then set it to 1.

Please refer to the docs 2. Server configuration 2.Advanced settings for more info.

3 000 users in one room is too much. Maybe it's better to put the users on separate rooms.
Usually the client doesn't need to know what happens in areas that are not visible by the user.
So you can break your world into separate rooms and when the user move from one area to another it just joint to another room.
Also in order the moving to be more transparent for the user he/she could be connected in the room that represent the area where the player is and also in the rooms that represent the areas next to the current one.
User avatar
eggs
Posts: 46
Joined: 28 Apr 2008, 13:37
Contact:

Postby eggs » 03 Jun 2008, 11:06

Hi Patso,

Also in order the moving to be more transparent for the user he/she could be connected in the room that represent the area where the player is and also in the rooms that represent the areas next to the current one
.

Does this mean the user would be receiving all updates from the rooms next too the users current room? (in which case he would still be receiving updates for areas that are not visible). I am curious, because it sounds like this solution may solve a problem I am having.
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

Postby patso » 03 Jun 2008, 13:55

eggs wrote:Does this mean the user would be receiving all updates from the rooms next too the users current room? (in which case he would still be receiving updates for areas that are not visible). I am curious, because it sounds like this solution may solve a problem I am having.


The user receives updates only from the rooms where he/she is joined. It's up to you to decide in which room(s) to join the player. You can join the user to more than one room and the client will receive updates from all rooms where the user is joined.

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 6 guests