iPad scrolling background help

StormtrixStormtrix Member Posts: 256
edited November -1 in Working with GS (Mac)
Hi there,
Trying to get get a simple scrolling background to work for the iPad.
Been trying a few of the solutions i've found in the forums, but i think i'm just not getting the
right positioning numbers down.

First do you enable or disable wrap-X for the scene?

This is what i'm trying..

Scene is 2048x768, Camera stays just in 1024x768 2 Actors - Water1 and Water2
Same rules for both except position x number

Move 180 at 30speed

Rule -
Attribute self.position.X= -512
then change attribute self.position.X to self.position.X+1280

Water2 actor which is placed to the right and next to Water1 is -
Attibute self.position.X=512
then change attribute self.position.X to self.position.X+1280

If i just use 1 actor at the 1024x768 and enable Wrap X... then when i play the game
there is a tear/space between the wrapped part like about 10-20 pixels.

any help would be great..
thanks
Storm

Comments

  • Ruslan21Ruslan21 Member Posts: 228
    for scrolling background i use new layer (Not scrollable) i put my background actor in there, then it doesn't matter how large you level is your background always will be on the screen. You may also put all your controls in that layer

    Hope that helps
  • StormtrixStormtrix Member Posts: 256
    Hey Ruslan21,
    Thanks for the response -- didn't quite follow what you were saying exactly. :)

    I did finally come up with a solution..
    uploaded the project file as well...

    http://gamesalad.com/game/play/83504

    Thanks again,
    Storm
  • Ruslan21Ruslan21 Member Posts: 228
    That works too.
Sign In or Register to comment.