Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8068879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:49:45+00:00 2026-06-05T12:49:45+00:00

Situation: cocos2d on iOS. In the simulator my FPS shows 60 when in standard-resolution

  • 0

Situation:
cocos2d on iOS. In the simulator my FPS shows 60 when in standard-resolution device mode, and 30 (exactly half) when in retina device mode. Googling yielded no immediate results…Any reasons why?

Code:

- (void) applicationDidFinishLaunching:(UIApplication*)application
{
    // Init the window
    window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    // Init the View Controller
    viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
    viewController.wantsFullScreenLayout = YES;


    // Try to use CADisplayLink director
    // if it fails (SDK < 3.1) use the default director
    if( ! [CCDirector setDirectorType:kCCDirectorTypeDisplayLink] )
        [CCDirector setDirectorType:kCCDirectorTypeDefault];

    // Create glview
    EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
                                   pixelFormat:kEAGLColorFormatRGBA8
                                   depthFormat:0
                        ];

     // make the OpenGLView a child of the view controller
     [viewController setView:glView];

     // make the View Controller a child of the main window
     [window addSubview: viewController.view];
     [window makeKeyAndVisible];

    // Create director
    director = [CCDirector sharedDirector];

    // attach the openglView to the director
    [director setOpenGLView:glView];

#if GAME_AUTOROTATION == kGameAutorotationUIViewController
    [director setDeviceOrientation:kCCDeviceOrientationPortrait];
#else
    [director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft];
#endif

    [director setAnimationInterval:1.0/60];
    [director setDisplayFPS:YES];
    [director setDeviceOrientation:kCCDeviceOrientationPortrait];

    // Set premultiplied alpha
    [CCTexture2D PVRImagesHavePremultipliedAlpha:YES];

    // Default texture format for PNG/BMP/TIFF/JPEG/GIF images
    // It can be RGBA8888, RGBA4444, RGB5_A1, RGB565
    // You can change anytime.
    [CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA8888];

    // Enable High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
    [director enableRetinaDisplay:YES]

    [self removeStartupFlicker];

    [SceneManager goLoadingScreen];
}

Update:
Maybe it’s just a simulator issue? See http://www.cocos2d-iphone.org/forum/topic/20367

Why not just test on a device?
And I can’t just test on my retina device because I ignorantly upgraded my iPhone4 to the newest version of iOS and I’m not ready to shell out $30 for the Lion update yet…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T12:49:47+00:00Added an answer on June 5, 2026 at 12:49 pm

    Reason might be there’s no explicit GPU hardware acceleration of the iPhone simulator. Test on device, everything should be fine.

    My game is 8fps on iPad retina simulator, but 60 FPS in real device. Test game performance with real device and don’t worry about simulator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Situation: (Large) PDFs are stored on an iOS device The PDFs are encrypted using
I'm new to cocos2d and my game situation is below. In top-down shooter game
Situation: I'm using both OpenFeint/Game Center in a cocos2d game. OpenFeint has a 'dashboard'
Engine: Cocos2D Test Hardware:iPhone 4 SDK:3.2.5 final FPS is stable on 60 in DEBUG
Situation: My iPhone communicates to an external device through Wi-Fi. The app has also
Situation: I have some persons with certain skills and they can/might belong to more
Situation is you have to develop an application against an Active Directory Tree. Want
Situation: I want to provide a website service where users can enter some data
Situation: I am working to populate text entry boxes in a webpage with data
Situation: I am creating a database user interface for a client's website. I know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.