Hi,
I use the keyboard to control my avatar, in the localhost it works fine (excepted : when you move to a tile touching your actual tile, the animation isn't smooth compared to control with mouse)
But once online, on my dedicated server, when I press the keyboard control to move to one tile touching mine, sometimes the avatar doesn't stop until it reachs the end of the map or a non walkable tile.
Did you experience that ?
I can give you the url of the online test if you wish.
Openspace : v2.0.4
SFS2X : v1.1.1
Thank you
[EDIT : It seems the problem disappeared... I really don't know why, because I didn't change anything... I will delete this post if the problem doesn't show up again.]
Keyboard control problem online
Re: Keyboard control problem online
The problem might be related to network issues... unless you had an older version and you updated it.
Anyway keep us informed.
Anyway keep us informed.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Keyboard control problem online
Same problem happens here. The avatar keeps wandering until hitting obstacle. The final reason seems obvious from the log, even I'm not sure why it even comes to that. On localhost I can see a large path is first returned(towards the first obstacle or end of map) in the direction the key is pressed. That path is received but then also this is sent to the server:
[Sending - JSON]: {"b":{"c":"_os_stop","p":{"tx":24,"dir":0,"tz":0,"ty":3,"trim":22},"r":1,"x":"__$OpenSpace$__"},"t":"xt"} , which apparently stops the avatar for following the path.
The stop is never sent in case of my online test from the Flash logs, so the avatar keeps following the long path. I don't understand why this is happening(probably timing issues due larger than expected lag?). But also I don't get why it's so complicated to move 1 square, ie why to send the whole path and then send stop commands etc. Why not just compute path to one square left/right/up/down, then you don't need to "stop". If the target square is end of map or obstacle hopefully the pathfinding should deal with that by returning empty path or something...
[Sending - JSON]: {"b":{"c":"_os_stop","p":{"tx":24,"dir":0,"tz":0,"ty":3,"trim":22},"r":1,"x":"__$OpenSpace$__"},"t":"xt"} , which apparently stops the avatar for following the path.
The stop is never sent in case of my online test from the Flash logs, so the avatar keeps following the long path. I don't understand why this is happening(probably timing issues due larger than expected lag?). But also I don't get why it's so complicated to move 1 square, ie why to send the whole path and then send stop commands etc. Why not just compute path to one square left/right/up/down, then you don't need to "stop". If the target square is end of map or obstacle hopefully the pathfinding should deal with that by returning empty path or something...
Re: Keyboard control problem online
It is quite difficult to reproduce this issue. In fact it is not clear why the "stop" command isn't sent. Are you using the DEBUG Flash Player? If not, maybe an error is thrown but swallowed by the Flash Player? Also I'm assuming you are using the latest version of OpenSpace.
If you can provide more details or show a reproducible test case, we will further inspect this. Thank you for your help.
If you can provide more details or show a reproducible test case, we will further inspect this. Thank you for your help.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 37 guests