Jump to content
  • Advertisement
Sign in to follow this  
lerno

Mobile clients - performance suggestions?

This topic is 2411 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


In TCP, once you drop a packet, any newer, un-dropped packets, will be delayed in the kernel, not delivered to you, until the dropped packet has been detected and re-sent. This causes burstiness.

In UDP, any packet that makes it through, gets delivered, and any packet that doesn't, doesn't.

The "speed" is the same, but the "latency" or "jitter" for game use cases that can stand dropped packets is higher for TCP and UDP.


Ok, that makes sense. There isn't much use for me using UDP then, as in my game the player really needs the response from the last command. There is no good way of predicting the result of an action even if I hadn't the need for information hiding.

You spoke of multiple connections. What about opening two connections, sending identical data across with message numbering? Server/client discards the messages that comes last. Would that help any in real world situations?

In one iPhone game I wrote, I'd have a http request for every time the player did something. I then used a message numbering scheme, and a timeout of about 2 seconds. If the request didn't complete in 2s I'd immediately send the same request again, with the same message number. I did this up to 3 times.

That scheme worked well for avoiding cases when connect would randomly stall on the phone - usually things would work on the second try.

Share this post


Link to post
Share on other sites
Advertisement
Multiple connections *may* help in some real-world scenarios. Specifically, if just one random packet gets dropped, you will still keep on running uninterrupted. However, a lot of problems are in the form of "hiccups" where *all* traffic gets blocked for some amount of time -- this would block both connections at the same time. Also, the cost of this work-around is high, because you double the amount of bandwidth used.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!