Delay with photon objective c client.

Options
Shakthi Prasad G S
edited April 2014 in Native
Hi all,
We are trying to integrate photon objective c api in our iOS game.

We got values " 576 2000 162" for [mLoadBalancingClient RoundTripTime],[mLoadBalancingClient TimePingInterval], [mLoadBalancingClient RoundTripTimeVariance] respectively.

However with another game which uses photon unity network, RoundTripTime:90.

Did anybody try photon objective c APIs? How is the network performance?


Thanks
-Shakthi

Comments

  • Kaiserludi
    Options
    Hi Shakthi.

    The round trip time and variance of the objC clients should be about the same as with the PUN ones.

    Please check, that you connect to the same server address / cloud region with the objC client as you do with the PUN one. Please also check that you are calling service() frequently enough.
  • Hi Kaiserludi,

    Thanks for the quick response.

    What is optimum frequency of calling service. In my code its 10/second.
    [NSTimer scheduledTimerWithTimeInterval:0.1f target:self selector:@selector(run:) userInfo:nil repeats:true];

    -Shakthi
  • Kaiserludi
    Options
    The optimum depends a lot on your custom game logic.
    You could try to set it to 20 times a second and see if it makes a difference on your rtt. If the rtt is still that bad, then it's not an issue caused by too few service() calls.
  • Changing service rate does not help
    [NSTimer scheduledTimerWithTimeInterval:1.0/20.0f target:self selector:@selector(run:) userInfo:nil repeats:true];

    Still RoundTripTime: 214
  • Kaiserludi
    Options
    With calling service() 10 times a second you have had a rtt of 576, now with 20 times you have one of 214ms? Well, I would say, that it's definitely helping then, just 20 times still seems not to be enough in your case. Play a bit more around with that rate. 50 times a second would probably drop your rtt down to a value similar to the one that you have had in PUN.
  • I can't confirm that. Actually, its varying in a range 197-300
  • Kaiserludi
    Options
    OK, what ping are you getting, when you are directly pinging the url to which you connect from the terminal?
  • Ping app-asia.exitgamescloud.com
    round-trip min/avg/max/stddev = 111.298/264.921/406.982/68.746 ms


    AVG 264 ms. Do you think problem with network?
  • Kaiserludi
    Options
    So you have a ping of 264 without Photon, but your PUN client has a rtt of 90? Then your PUN client obviously connects to a different server address!
  • OK. I will recheck and get back to you.
  • Thanks,

    We found service request WAS the issue.
  • Kaiserludi
    Options
    Thanks for the update.