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 6724833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:44:10+00:00 2026-05-26T09:44:10+00:00

Cocos2d templates and the usual sample projects initialize cocos openGL ES view and other

  • 0

Cocos2d templates and the usual sample projects initialize cocos openGL ES view and other stuff in the applicationDidFinishLaunching / application:didFinishLaunchingWithOptions: method. In relation to the last method, Apple iOS Programming Guide states that:

“Apps that use OpenGL ES should not use this method to prepare their
drawing environment. Instead, they should defer any OpenGL ES drawing
calls to the applicationDidBecomeActive: method.”

So, my question is, is application:didFinishLaunchingWithOptions: really the proper place to initialize cocos2d? or should we be doing that in applicationDidBecomeActive: ?

If you think that applicationDidBecomeActive: is the way to go, what would be the consequences in relation to background execution? i.e. what should we do to avoid a sort of double initialization when the app comes to foreground from being inactive?

Thanks in advance

  • 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-05-26T09:44:11+00:00Added an answer on May 26, 2026 at 9:44 am

    Good question … so far 99.9% of all cocos2d apps do it the way cocos2d does it and I haven’t heard of a single issue.

    Since Apple doesn’t really explain why this is particularly important for OpenGL ES apps, I would assume the following:

    • OpenGL ES apps tend to take a relatively long time to initialize their view. In particular when loading lots of assets. This could lead to the App being killed by the system if it takes too long. That means the Cocos2D first scene should load fast, and in particular it shouldn’t load all the game’s assets unless loading of the first scene is deferred to applicationDidBecomeActive. The latter requires an additional check to make sure there’s no other scene already running.
    • Apps are supposed to perform common tasks in applicationDidBecomeActive. This is generally good advice because some settings can now change while the app is suspended. For example the user might change the device language, or enter Airplane Mode and the app needs to respond to that when it becomes active again. Some changes may affect OpenGL ES apps in particular, like for example reloading all bitmap fonts if the user changed locale from english to japanese.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Cocos2D defines the static method 'actions' for the Sequence class as such: +(id) actions:
Can Cocos2D create non-game apps like, for example, a finger painting application, a questionnaire
In cocos2d, I'm trying to call a method on the Parent of a CocosNode.
I'm using Cocos2D, and I need to access a parent method in a UIView
After using 'cocos2d-iphone' in one of my projects, I am trying to decide which
Are cocos2d-iphone and cocos2d-Android the same thing? in other words, can I make a
In cocos2d game development, CGRectContainsPoint method often used to detect if touch on a
I am using cocos2d-iphone to place Sprites onto a Layer to setup a game
I want to study Cocos2d, seems it's a good framework for iPhone game programming.
I am using Cocos2D for my main framework. In some cases, I want Cocos2D

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.