Problems with Scrolling Background
ookami007
Member Posts: 581
I am trying to get my scrolling background to work but I keep getting gaps.
The first time the scrolling background scrolls by, everything seems fine. BUT.... if I do alot of firing of my weapon, a gap seems to develop... if I keep firing, eventually it grows.
For the scrolling background, I have two actors... both moving at the same speed (100 to the left)
Each has a rule that goes off when self.position.x <= -self.width/2
When that happens, it sets self.position.x to self.size.width+(self.size.width/2)-10
Both are 480x320, the same size as the scene.
To start, both overlap slightly.
Comments
Use replicate command incase if same image is used and then use move.. or create a universal attribute and make them move according to universal game attribute e.g. Game Real attribute = x; background 1= x+10; background 2 = x + 20; put only one calculation in game attribute x..
Current Projects I am working on: Stupid Duck, Zango's Shark Adventure, AoD: Age of Dragons, Rocket Jump: The Pixel Invaders
Facebook: https://facebook.com/reflectivebytegamestudios
Web: reflectivebyte.com