Multiplayer Real Time Game

0 votes
I first time develop the Real Time Multiplayer Game using appwarp, I was using Japan server and my current location is in Malaysia, but i found that, every milisec i send out a message about the player location  and rotation, but sometime another client receive the message slow, anyone have idea about receive the message from server lag problem?
asked Jul 11, 2014 in AppWarp by admin (10 points)
recategorized Oct 26, 2014 by sushil

1 Answer

0 votes
Hey,

Latency depends on network. Latency is present on every network though it might be very low. But again that depends on the network you are using. AppWarp tries to reduce this latency as much as it can.

You can also try using UDP for sending messages. AppWarp supports sending messages over UDP through sendUDPUpdatePeers() method.
answered Jul 11, 2014 by Suyash Mohan (900 points)
Hi Suyash Mohan,
I tested the sendUpdatePeers and SendChat no problem, just the sendudpupdatepeers have problem.

Thanks
Hey, We have updated our SDK with keep alive support for UDP. Now your UDP connection should not break after few minutes.

Here is the new Unity SDK https://github.com/shephertz/AppWarpUnity/tree/master/v1.7.4

Hope this will solve your problem :)
Hi Suyash Mohan,

I want to ask some additional question, which is what kind of "movement algorithm" to make the the character move smooth(other player avatar) in UNITY, as i pass the position and rotation through UDP, now i using
Vector3.Lerp(transform.position, position,Time.deltaTime*10);(position)
Quaternion.Slerp(transform.rotation, target, Time.deltaTime*20);(rotation)
but the result is not synchronize, any suggestion to improve?, thanks
Hi Suyash Mohan,

I try the new sdk, and it solve the UDP problem, but when i use my ipad to test sendchat to another client for a around 2-3min, after that the player(ipad) disconnect from the server, and i try use unity to test the send chat, it work fine, any idea what cause this problem?
On mobile devices, network sometimes breaks when your network changes between 2G, 3G or Wifi.

To handle these situations we provide a connection resiliency feature. With connection resiliency if there is a connection error, you can recover your connection. You can read more about it here http://appwarp.shephertz.com/game-development-center/connection-resiliency/
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...