Is 3G slower?

Discussion in 'Public Game Developers Forum' started by rhansson, Nov 25, 2009.

  1. rhansson

    rhansson Well-Known Member

    We are experiencing some weird lag in our games only on the iPhone 3G. Even the 2G is working really nice and smooth.

    Has anyone else had the same experience? By doing a google search there seems to be some issues with the 3G phone?!
     
  2. hackdirt

    hackdirt Well-Known Member

    Oct 26, 2009
    73
    0
    0
    Game Dev
    New Zealand
    Specifically just the 3G? Are you seeing similar problems with the 3GS?
     
  3. rhansson

    rhansson Well-Known Member

    Only 3G. Seems that performance is a little weaker than the other phones. 3GS and 2G works great without lag.

    Maybe the OS version for 3G (3.0)?
     
  4. hackdirt

    hackdirt Well-Known Member

    Oct 26, 2009
    73
    0
    0
    Game Dev
    New Zealand
    What are you using for timing? NSTimer or a thread? If you're using a thread, Apple engineers suggest you avoid using CFAbsoluteTimeGetCurrent() for timing, and instead use CACurrentMediaTime(). This is because CFAbsoluteTimeGetCurrent is sync'd with the network, while CACurrentMediaTime is not.

    Actually, I recommend you get on to the developer forums on Apple's iphone development site and search around. There are some really good threads on the differences between the different devices, and Apple engineers will pop up from time to time to give advice (this is where I heard not to use CFAbsoluteTimeGetCurrent, for example).

    HTH
     
  5. NomaD

    NomaD Well-Known Member

    Jun 29, 2009
    1,506
    0
    36
    California
    sometimes i find that my ipod touch 1g is faster than my iphone 3g
     
  6. arkanigon

    arkanigon Well-Known Member

    Dec 24, 2008
    439
    0
    0
  7. JoshCM

    JoshCM Well-Known Member

    Aug 11, 2009
    4,250
    23
    38
    Game Designer
    Upstate NY
    yes the 2G is much faster - we noticed that too.
    The 2G sometimes even seems better than 3GS.
     
  8. Hmar9333

    Hmar9333 Well-Known Member

    Jul 11, 2009
    2,585
    0
    0
    Book Salesperson/Student
    Melbourne, Australia
    Err... no, just no...
     
  9. mobilainteractive

    mobilainteractive Well-Known Member

    Mar 6, 2009
    174
    0
    0
    iPhone 3G runs at 412Mhz while iTouch 2G is under-clocked to 533Mhz...
    so no wonders there..
     
  10. Hmar9333

    Hmar9333 Well-Known Member

    Jul 11, 2009
    2,585
    0
    0
    Book Salesperson/Student
    Melbourne, Australia
    I think he's talking about the iPhone 2G
     
  11. TrueAxis

    TrueAxis Well-Known Member

    Sep 7, 2009
    610
    0
    0
    Before firmware 3.0 you could list the devices in this order...Pre 3GS and iPod 3rd generations.

    1. iPod 2nd gen
    2. iPhone 3G
    3. Iphone 2G
    4. iPod 1st gen

    This is now wrong with firmware 3.0. The order is now in performance:

    1. iPod 3rd gen (top because of no phone functions running in the background)
    2. iPhone 3GS
    3. iPod 2nd gen and low memory iPod 3rd gen (same hardware as 2nd gen)
    4. iPhone 2G
    5. iPod 1st gen
    6. iPhone 3G (push notifications and other background tasks ruin the framerate)

    The iPhone 3G is not so good for games now.
     
  12. hackdirt

    hackdirt Well-Known Member

    Oct 26, 2009
    73
    0
    0
    Game Dev
    New Zealand
    You sure about that?

    Video on the 3GS is undoubtedly faster, but the 3GS has a deprecated VFP unit that runs more slowly on the 3GS than 2G devices. Thus, if a game uses VFP optimizations for heavy duty floating point operations (such as matrix operations), the game will certainly run more slowly on the 3GS.

    If the physics engine is struggling at 20Hz on the 3GS because the matrix operations were optimized for only the VFP unit, it doesn't really matter if the video is running at 60fps; it's still going to be jerky and laggy and overall a shitty experience for the player.
     
  13. bomber

    bomber Well-Known Member

    Nov 9, 2008
    942
    1
    0
    iPhone 3G is exactly the same speed as iPhone 2G and iPod 1G, if there are differences then it must be some device-depending thing (email push or pull enabled or similar).

    The iPhone 3GS is much faster than the previous generations, especially if you compile for armv7 (iPhone supports universal binaries).
     
  14. c0re

    c0re Well-Known Member

    Apr 15, 2009
    444
    0
    0
    Hello,

    your statement is very interesting, can you elaborate a bit much about VFP deprecation for 3GS ?

    I heard that Neon native instructions would surpass VFP for 3GS, is it true ?
     
  15. hackdirt

    hackdirt Well-Known Member

    Oct 26, 2009
    73
    0
    0
    Game Dev
    New Zealand
    #15 hackdirt, Nov 26, 2009
    Last edited: Nov 27, 2009
    The NEON chip is certainly quicker than the VFP unit. In the fact the 3GS VFP has been shown to be slower than even standard compiled code! Unfortunately there are not many benchmarks out there comparing the two, but here is one benchmark showing the VFP to be a order of magnitude slower than the NEON on the 3GS. My own benchmarks show similar results.

    Here is another interesting about the differences between the two chips.

    There's one thing I want to point out though:

    A game with decent NEON optimizations will run beautifully on the 3GS. What you need to do is create a fat binary with one code branch for armv7 which supports NEON, and the other for armv6 (VFP), and then you'll be golden. bomber mentioned this in a previous post. However, the universal binary presents you with a new problem. While you can target both the NEON and VFP unit from within the universal binary, you will have to target OS 3.0 as the minimum OS in your Info.plist before you can submit the binary to Apple. You can not submit anything with a minimum target OS less than 3.0. Try it on iTunes Connect and see - you'll just get an error.

    In other words, you can certainly have a universal binary with NEON optimizations for 3GS and VFP optimizations for everything else, but you will not be able to sell to the millions of iPod Touch owners who are still running OS 2.x. This is a policy decision by Apple. There's no technical reason behind it because the universal binary will work fine on all the devices. I think it is a terrible policy decision by Apple because it means 3GS owners will not be able to enjoy all the benefits of their device (unless you submit a 3GS specific version, but I somehow doubt this will be accepted into the store). But, I digress.
     
  16. mobilainteractive

    mobilainteractive Well-Known Member

    Mar 6, 2009
    174
    0
    0

Share This Page