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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:34:22+00:00 2026-05-27T10:34:22+00:00

I am newbie programmer in cocos2D…. I wanted to create the Endless Background using

  • 0

I am newbie programmer in cocos2D…. I wanted to create the Endless Background using the Parallax Scrolling.. I am trying to learn the Parallax but it doesn’t update with the time and sprites doesn’t keep on rotating from top to bottom! The snippet i tried is as below

-(id) init 
{
    if((self = [super init])) 
    {        
        CGSize wSize = [CCDirector sharedDirector].winSize;
        self.isTouchEnabled = YES;
        CGPoint topOffset = CGPointMake(wSize.width, 0); 
        CGPoint midOffset = CGPointMake(wSize.width/2,0);
        CGPoint downOffset = CGPointZero;        
        CCSprite *para1 = [CCSprite spriteWithFile:@"Default.png"];
        CCSprite *para2 = [CCSprite spriteWithFile:@"Icon.png"];
        CCSprite *para3 = [CCSprite spriteWithFile:@"Default.png"];
        CCSprite *para4 = [CCSprite spriteWithFile:@"Icon.png"];

        paraNode = [CCParallaxNode node];
        [paraNode addChild:para1 z:1 parallaxRatio:CGPointMake(0.5f, 0)
        positionOffset:topOffset];
        [paraNode addChild:para2 z:2 parallaxRatio:CGPointMake(1, 0) positionOffset:topOffset];
        [paraNode addChild:para3 z:4 parallaxRatio:CGPointMake(2, 0) positionOffset:midOffset];
        [paraNode addChild:para4 z:3 parallaxRatio:CGPointMake(3, 0) positionOffset:downOffset];
        [self addChild:paraNode z:0 ];
        [self scheduleUpdate];
     }
     return self;
}

-(void) update : (ccTime) dt
{   
//Need to move the Parallax Node with the repetition of the background
}

This is the Implementation file… I am stuck here for moving the contiunous moving of the background in the Horizontal or Portrait mode.

Thanks for the Help 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-27T10:34:23+00:00Added an answer on May 27, 2026 at 10:34 am

    CCParallaxNode doesn’t support endless scrolling, unless you modify its code. I have an example for endless parallax scrolling in my Learn Cocos2D book. From that link you can also download the book’s source code where you’ll find the parallax class in chapters 6 to 8.

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

Sidebar

Related Questions

Newbie to C++ but I am a Java programmer. Trying to learn C++ now.
I'm a newbie programmer doing his best to self learn PHP. I'm trying to
Hello I'm a newbie web programmer. My background is writing Windows applications with sql.
Newbie C++ programmer here. I'm trying to write a command line application that takes
PHP Redirect with Post Data Hi, I am a newbie PHP programmer and trying
I'm a newbie programmer trying to jump in to Python by building a script
newbie programmer and lurker here, hoping for some sensible advice. :) Using a combination
I'm a newbie programmer trying to build a demo PHP site on my computer
I'm a newbie JavaScript programmer who wants to experiment with server side JavaScript using
I am a newbie servlet programmer. I am trying to do this right. I

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.