Page 1 of 1

Keyboard control problem online

Posted: 07 Nov 2012, 15:52
by pozeat
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.]

Re: Keyboard control problem online

Posted: 08 Nov 2012, 10:18
by Bax
The problem might be related to network issues... unless you had an older version and you updated it.
Anyway keep us informed.

Re: Keyboard control problem online

Posted: 28 Feb 2014, 17:14
by falcan
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...

Re: Keyboard control problem online

Posted: 11 Mar 2014, 08:14
by Bax
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.