Realtime Game Message Sending Strategy
Posted: 10 Dec 2019, 07:13
We've started developing realtime games using unity3d and smartfox server v1.6 for mobile phones
and we've been experiencing synchronization problems between the server and the client
we want to send a command (we'll call it X) to the server every 200ms while the game is ongoing, we're testing it in our
local development system, it works well but when the game starts and there are a lot of peer to peer(P2P) messages sent to other the players (a message every 100ms) to notify that player's location, speed and force.
the server receives those X commands with a changing delay and sometimes receives two requests within 10ms difference,which leads me to a few questions,
1. If I send P2P messages to other players (movement, etc..) and also sending messages to the server (player lost, collected powerups etc..) are all these messages being pushed into a queue in the smartfox core level? if so, is there any way to separate the it in a way that the regular commands will have priority over the P2P messages or be sent right away?
2. Is there a big difference in latency between sending messages to players peer to peer vs through the server?
3. are there any more pointers that will help building a realtime game that will support low end mobile devices?
Thanks!
and we've been experiencing synchronization problems between the server and the client
we want to send a command (we'll call it X) to the server every 200ms while the game is ongoing, we're testing it in our
local development system, it works well but when the game starts and there are a lot of peer to peer(P2P) messages sent to other the players (a message every 100ms) to notify that player's location, speed and force.
the server receives those X commands with a changing delay and sometimes receives two requests within 10ms difference,which leads me to a few questions,
1. If I send P2P messages to other players (movement, etc..) and also sending messages to the server (player lost, collected powerups etc..) are all these messages being pushed into a queue in the smartfox core level? if so, is there any way to separate the it in a way that the regular commands will have priority over the P2P messages or be sent right away?
2. Is there a big difference in latency between sending messages to players peer to peer vs through the server?
3. are there any more pointers that will help building a realtime game that will support low end mobile devices?
Thanks!