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));
sfs.Send(new SetUserVariablesRequest(userVariables))
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:
playerMoveObj.PutDouble("x", (double)pos.x);
playerMoveObj.PutDouble("y", (double)pos.y);
playerMoveObj.PutShort("z", (short)floor);
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.
sender.setVariables(vars);
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...
no OnUserVariableUpdate event
Who is online
Users browsing this forum: Stevenor and 119 guests