Problem with Scrolling background
InceptionDeveloper
Member Posts: 50
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
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
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
my games >> https://play.google.com/store/apps/developer?id=TheAnonyDeveloper
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?
Also maybe just change it to 5400 instead of self.x + 5400.
it's moving with constant speed in 180 direction and relative to actor and with speed of 250
my games >> https://play.google.com/store/apps/developer?id=TheAnonyDeveloper
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:
seriously , please elaborate , i can't undersstand what you're saying..:(
my games >> https://play.google.com/store/apps/developer?id=TheAnonyDeveloper
.
...
...
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