Keyboard control problem online

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

User avatar
pozeat
Posts: 18
Joined: 04 Oct 2012, 13:53
Location: France
Contact:

Keyboard control problem online

Postby pozeat » 07 Nov 2012, 15:52

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.]
User avatar
Bax
Site Admin
Posts: 4387
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Keyboard control problem online

Postby Bax » 08 Nov 2012, 10:18

The problem might be related to network issues... unless you had an older version and you updated it.
Anyway keep us informed.
Paolo Bax
The SmartFoxServer Team
falcan
Posts: 43
Joined: 04 Mar 2009, 12:55

Re: Keyboard control problem online

Postby falcan » 28 Feb 2014, 17:14

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...
User avatar
Bax
Site Admin
Posts: 4387
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Keyboard control problem online

Postby Bax » 11 Mar 2014, 08:14

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.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 2 guests