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

  • Home
  • SEARCH
  • 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 9171771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:12:31+00:00 2026-06-17T16:12:31+00:00

it is my first cocos2d app I try, and I am following example from

  • 0

it is my first cocos2d app I try, and I am following example from book Learning Cocos2d but it seems it refers to an older version of cocos.

I have created a scene, and in its init method I add 2 layers.

Now the tutorial says, that in my delegate.m I should add this line (to be precise change the previous one that strted the HelloWorldScene) :

[director_ runWithScene:[GameScene node]];

But I am getting an error.

The weird thing is that it does not use that code at all,but that one:

[director_ pushScene: [IntroLayer Scene]];

But if I use this, I also get an error:

[director_ pushScene: [GameScene node]];

My GameScene is here:

#import "GameScene.h"

@implementation GameScene
-(id) init{
    self=[super init];
    if (self!=nil){
        BackgroundLayer *backgroundLayer=[BackgroundLayer node];
        [self addChild:backgroundLayer z:0];

        GameplayLayer *gameplayLayer=[GameplayLayer node];
        [self addChild:gameplayLayer z:5];
    }
}

@end

and the errors I get:

EXC_BAD_ACCESS in both cases.

How can I start this scene from my appdelegate?

  • 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-17T16:12:32+00:00Added an answer on June 17, 2026 at 4:12 pm

    Thanks for your help!

    I did use that:

    [director_ pushScene: [GameScene node]];
    

    but the actual problem is that in my GameScene init method I have forgotten to return self.

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

Sidebar

Related Questions

I use CCParallaxNode from cocos2d framework for automatization scrolling. First node is CCSprite, but
first take a look on this picture from localScope app : i have 2
I have task to make simple app from three Views: in first: UITableView (it
I am in the process of learning cocos2d-android. I have been following a tutorial
I make my first app with cocos2d, so I am very new here my
I'm developing my first app for iOS with Cocos2d in Objective C. I'm new
I'm getting an error in an iOS App with Cocos2d. Here it is. First,
In my cocos2d box2d app i have two bodies, the first has one fixture
I had choosen Cocos2d v1.01rc instead of 2.x when starting developing my first game
first off I'm a noob to PHP but here is my problem. I am

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.