I'm making an iPhone game that runs at 50 fps per second. I'm thinking of implementing multiplayer in my game using Game center. But first I have a question how fast I can send data using gamecenter. I will only send a struct with three floats. Is it possible to send data fast enought to make me receive data every 20ms (1/50)?

有帮助吗?

解决方案

It could at best take around 15 milliseconds send data.

其他提示

The only thing you can depend on when sending stuff across the network from a mobile device is that the connection will be slow and intermittent.

If you assume anything else then you will run into problems.

You should always program for the case where the data takes a "long" time to come through and may not come through at all.

For instance, if you're making a real time multiplayer game then have some way of the opponents character moving in a "best guess" way until the next bit of data comes up. Etc...

Also, your games should be running at 60fps not 50.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top