Weird Player Synchronosation (Player direction)

Posted by Snowland
My movement code is simple:
My android game has virtual analog controller on screen. Player object simply moves towards the direction of the analog.

player.speed = 10;
player.direction = (analogs_direction_of_whatever)

When I connect two devices, movement is pretty cool; except player objects spin like crazy. I guess sync. of direction value has some bugs ?

I use the latest gamemaker server with GMS 1.4

Replies (7)

Last message on 5 Nov 2017

Size43 (Administrator) on 25 Sep 2017, 16:54:47
Apologies for the delay.

Can you check if you experience the same kind of issues when running on Windows?
Snowland (Topicstarter) on 28 Sep 2017, 23:15:25
On Windows, player coordinates are sent better than Android although both have the optimal 40 fps.

Syncing direction is still a problem. Players' directions are not synced correctly when moving. It's like they spin and spin when their direction value changed often
Size43 (Administrator) on 30 Sep 2017, 15:26:10
Does it work normally if you lower the speed to 4?
Snowland (Topicstarter) on 30 Oct 2017, 13:43:03
Hi, sorry for the delayed reply :(
Yes the problem still persists. Btw, I get around 70-90 ping due to I'm being away from servers, could it be the reason ?
Size43 (Administrator) on 5 Nov 2017, 11:34:32
70-90 ping is still pretty good, and should not cause any issues.

This might be an issue with the (All) version of GameMaker Server. Can you try switching to the (Windows) version? Please let me know if the problem still exists when running that on Windows. You might have to temporarily comment out gms_network() in the async networking event.

Secondly, do you have any additional code in the other player object that might be affecting movement?
Snowland (Topicstarter) on 23 Sep 2017, 18:37:34
Okay, I've fixed the issue of syncing player positions. I used gms_optimize_set_spc(spc_none); for this.

"I've tried other spc_ values, but the spc_none worked best for me". Now, the only problem remains is the player's direction. It doesn't synced correctly as it spins randomly when I move my character.
Snowland (Topicstarter) on 16 Sep 2017, 01:01:46
Also I noticed that player x and y positions are not correctly synched when player changes it's direction.