Problem with scrolling background with moving actor

dotsonj23dotsonj23 Member Posts: 316
edited November -1 in Working with GS (Mac)
Here is the setup. I have a scrolling endless background that moves left based on the accelleramator. My actor can move left/right and up/down within the screen area (again based on the accelleramator) but only between X=0 and X=900. I did that by putting in a nonscrollable collidable wall at X=0 and X=900. Now the problem. When I hit the X=900 with the actor it stops as expected but the background scroll speed instantly doubles or triples for about .5 seconds then starts scrolling normally again. Any idea how to fix this.

My other issue (Just a personal comment not a GS issue). When I know there is a glitch in a portion of the game I am working on I obsess with getting it fixed before I do anything else in the game even though there are plenty of things I know how to do that also need to be done. I guess that is good in the sense that at the end I won't have as many bugs but boy does it slow overall game progress down. I just have to let the perfect get in the way of the good. Anyone else have that problem?

Comments

  • mangaroomangaroo Member Posts: 419
    i would create a rule in the otherwise for the scrolling endless background so that when the actor collides with the wall (at 900) it changes the speed of the bg to whatever (could even be the accelerometer speed at x=899)

    second point = i do to an extent i have some bugs that i just get tired of and push to the back but i always prefer to attempt to solve it a couple times before adding anything else so that i dont have to work with a mix of bugs..
  • dotsonj23dotsonj23 Member Posts: 316
    I figured out the problem in case anyone else has this issue. It was so basic I just was overlooking it. Since my actor that moves controls the camera and since the actor never leaves the "first" screen on my IPAD (i.e., never goes beyond X=1024 and everything instead moves to it from off screen I just unchecked scrollable for every layer. Problem solved. Sometimes solutions are so easy and right there in front of me I just look past them. But I took a couple hour break and the solution just popped into my head when I wasn't even thinking about it.
Sign In or Register to comment.