So with performance in mind, I started experimenting UDP calls.
Originally, when a client moves, I send a request to the server like so:
userVariables.Add(new SFSUserVariable("x", (double)pos.x));
userVariables.Add(new SFSUserVariable("y", (double)pos.y));
userVariables.Add(new SFSUserVariable("z", (double)floor));
Server handles it from UserVariableHandler request and updates the user position
mmoApi.setUserPosition(user, pos, getParentRoom());
Works fine, no problem, all clients are in synced.
Now with UDP, I updated the client to be like this so it uses UDP:
sfs.Send(new ExtensionRequest ("player.m", playerMoveObj, sfs.LastJoinedRoom, true));
created a new request handler on the server to handle this new extension and from server, i update the user's user variables.
the position on the server for the player is updated, however, clients no longer receive user variable updates! proximity is still updating, but no user variables event so i am unable to update user positions client side..
ive been playing around for an hour and is about to give up UDP position updates as i am stumped why updating user variable from the server doesn't notify clients...
Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 25 guests