Sign in to follow this  

Game protocol for mobile games over GPRS/UMTS

This topic is 3663 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

Hi, I'm thinkig what is the best approach for game protocol for mobile phones. The goal is to have soluton, which will not need from operators to install any HW or to make any changes in their existing infastructure. Problem - NAT ============= The major problem to be solved is the NAT. Mobile phones have unroutable IP addreses assigned from private range, so they cannot directly communicate with each other... There are some solutions, how to overcome this like STUN, TURN, etc. UDP? ==== Solutions like STUN (UDP hole punching) works nicely in 90% of networks for the UDP (this is the way how for example Skype works). But I do not think that UDP is the best for games, as packets could be lost, could arrive in different order, so all gaming client have to implement kind of jitter buffer to arrange incoming packets and it needs some application level protocol above the UDP (something like request response) to inform the A side, that packet arrives - in other words something, which has TCP protocol by nature. Using UDP for Skype or video sharing is O.K., because when packet is lost the voice/video quality just becomes worse for a moment - but imagine that you lost you opponent movement... TCP? ==== For TCP it is much more difficult to deceive firewalls and NAT, but on the other side a lot of complications are solved by using TCP. Relay ===== Anyway - it can still happend that the operator will use Symetric NAT or from some other reason it simply will not be possible to communucate directly, so there should be TCP relay server to which both clients will connect and it will simply resend the communication between both endpoints. Such server should be used to know if the opposit side id on-line and also to exchange information beween both clients, about, what game (or chat) they have on their mobiles and also to initiate the connection (something similar like e.g. SIP INVITE). I will welcome any ideas or comments, links to materials... Thanks for helping me Best regards, STeN

Share this post


Link to post
Share on other sites
Actually, UDP is great for games, because it provides lower latency on average than TCP, and lower jitter. You can structure a game communications protocol to use the latest available data, and ignore out-of-order packets. (The Forum FAQ has some more on this)

The biggest problem on cell phones, that I've found, are:
1) Latencies. The networks use phone provider based gateways, which are terminally overloaded. Expect ping times measured in seconds.
2) Power. CPU cycles on a phone come from the battery. The battery is very small. Trying to run something that continually uses the CPU, redraws the screen AND uses the radio will draw down battery fast. Also, because of battery, most cell phones have anemic CPUs.

Share this post


Link to post
Share on other sites

This topic is 3663 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this