Performance difference in simulator and device in my game. Why ?

Discussion in 'iOS Programming' started by srikanthrongali, May 20, 2010.

  1. srikanthrongali macrumors newbie

    Joined:
    Apr 30, 2010
    #1
    Hi, I am writing a small shooting game using cocos2d. It's working good in simulator. But when testing in the device, the animations of sprites are slow and they are stucking. The images I used are CCSprites. And I used CCAnimation for the animation of the images. Why the game acting different in simulator and device ?

    Thank you.
     
  2. sammich macrumors 601

    sammich

    Joined:
    Sep 26, 2006
    Location:
    Sarcasmville.
    #2
    You can wait for someone who has actual experience, but from what I know, the simulator apps are compiled for Intel, and I guess would run as fast as it can on the host hardware, which is your computer. Which is more powerful than the phone.
     
  3. srikanthrongali thread starter macrumors newbie

    Joined:
    Apr 30, 2010
    #3
    Thank You,
    So, how can we bridge the gap between them. I mean how do we know how much size of images should be there, how much animation time should be there ?
    If you find any guidelines please post the link .
    Thank you.
     
  4. sammich macrumors 601

    sammich

    Joined:
    Sep 26, 2006
    Location:
    Sarcasmville.
    #4
    Sorry, this is where I can't be of any help. I haven't actually programmed for the iPhone before.

    Someone will be along to answer your question properly.

    (can't you run instruments/dev tools on your app on the iPhone while it's tethered?)
     
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    Yes.

    A more expansive answer would be that the simulator simulates the APIs of the iPhone only: it does not simulate the hardware. It has access to the full computing resources of your Mac. In general it is way faster at everything that any iPhone. There are some OpenGL edge cases where this is not true (I suspect API translation from OpenGL-ES to full OpenGL is the reason).

    The only way to be sure how fast something runs on a device is to run it on the device. Ideally if you are writing something performance critical you should test on a few devices as the 3GS is way faster than the 3G for example...
     
  6. karlth macrumors regular

    Joined:
    Apr 13, 2010
    #6
    The simulator is considerably faster than a iPhone 3G device but when it comes to the faster devices like the 3GS and specifically the iPad performance seems more equal, at least in Open GL 2D graphics.
     

Share This Page