Problem with Scrolling background

InceptionDeveloperInceptionDeveloper Member Posts: 50
edited August 2016 in Working with GS (PC)

Hi, I've developed game for android and i'm almost finished but i'm having problem with my scrolling bacground... see i have my scrolling background and my main running actor is accelerating but when my actor gets power up for speed then my scrolling background moves left side completely.. i tried spawing method as well as moving it's position method but they both are failed in fast speed... please help me , how can i get scrolling background in slow as well as fast speed ....

Comments

  • NNterprisesNNterprises Member, PRO Posts: 387

    There's a lot of things that could go wrong with that..... you would have to post your codes or more info to tell how the background moves if you want any assistance

  • InceptionDeveloperInceptionDeveloper Member Posts: 50

    see this pic.. this is code of my skyline..it's 5400 because i've added 6 copies of skyline in order to create a long loop.. one skyline width is 900 so 900x6= 5400..hope you understand and help me

  • NNterprisesNNterprises Member, PRO Posts: 387

    Understand and makes sens so far. But how are they SCROLLING.

    Like how does the image even got to x<= -self.width/2? It has to be constantly moving somehow then right?

  • NNterprisesNNterprises Member, PRO Posts: 387

    Also maybe just change it to 5400 instead of self.x + 5400.

  • InceptionDeveloperInceptionDeveloper Member Posts: 50

    it's moving with constant speed in 180 direction and relative to actor and with speed of 250

  • NNterprisesNNterprises Member, PRO Posts: 387

    Why is it moving two different ways?

    There are many ways to do it, but in your case I would just change the linearvelocity.x attribute for the protype and instance actors to -180, and do the rule you have screenshotted above but change position to 5400

    And get rid of all that stuff in the > @InceptionDeveloper said:

    it's moving with constant speed in 180 direction and relative to actor and with speed of 250

  • InceptionDeveloperInceptionDeveloper Member Posts: 50

    seriously , please elaborate , i can't undersstand what you're saying..:(

  • NNterprisesNNterprises Member, PRO Posts: 387

    @InceptionDeveloper said:
    seriously , please elaborate , i can't undersstand what you're saying..:(

    .
    ...
    ...
    Go to your background actor prototype and go to attributes. Under MOTION there should be "linearvelocity.X" change that to -180. Do this for your prototype and ALL instances on you're screen if they are unlocked.
    Then do THIS rule on all of the background actors again:> @InceptionDeveloper said:
    >

    But instead of Change self.position.x to 5400 NOT self+5400

    There's a million videos and threads on scrolling backgrounds. Just google Gamesalad Scrolling Background and youtube it too and billions of things come up

Sign In or Register to comment.