Can you make one actor Wrap, rather than the whole scene.

JamesNobleJamesNoble Member Posts: 19
edited November -1 in Working with GS (Mac)
I am creating a game of a birds-eye view of a road where your car has to dodge other cars going the opposite direction. The image I am using for the road in the background is 640x960 and I need it to repeat. Normally I would check 'Wrap Y' in the scene attributes, but because I am spawning other cars at the top of the scene which need to be destroyed at the bottom of the screen, this won't work... (If that makes any sense)

At the moment I have a rule that changes the velocity of the road to 400 in a downward direction. I have one road in the center of the screen, and one directly above it.

Then I have a rule (which applies to both roads) that says: When Self Position Y = -240
Change attribute Self Position Y to 720.

This works fairly well, but after a while of playing the game a gap starts to appear between the two road actors. This usually happens when the game lags a little bit. You can make it happen by changing the volume on the phone, which makes my game lag a little. Is there a better way to have a repeated background when you can't use horizontal and vertical wrap?

I tried to be as clear as possible so I hope you understand :) I am testing on an iPhone 4, so I hate to think of how it will work on older, under performing devices. Ideally, there needs to be an attribute that makes a single actor wrap vertically, but I can't seem to find one.

Thanks in advance,

James

Comments

  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    I have the same problem! Hope someone got a nice solution :D
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    I have a solution for this.
    If you will only playing in a 480 x 320 size, you make the scene bigger, like 600 x 320.
    You make Warp x, and the objects you want to warp will warp, and the other ones you make them to dissaperar when there are between 480 and 600.

    Did I explained clear naught?
  • JamesNobleJamesNoble Member Posts: 19
    Yeah, I get you, I'll give it a shot, thanks :)
Sign In or Register to comment.