Parallax scrolling - anyone had luck with it?

skottskott Member Posts: 172
edited November -1 in Working with GS (Mac)
Hi,

As the title says, does anyone had luck making parallax scrolling using gs 8.6

I have now tried any possible solutions found on the forum beside my own ideas.. The scrolling images glitches and the images disappears random..

If anyone have managed to do a working parallax - please tell me how to..

Comments

  • Rob2Rob2 Member Posts: 2,402
    theres an excellent example of what can be done here http://gamesalad.com/game/play/33976
  • skottskott Member Posts: 172
    Yes that is perfect - wish I could download it.. I've have tried to do it the way he has done it, but without any luck..
  • AfterBurnettAfterBurnett Member Posts: 3,474
    I'm having the same issues.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Here is my game using paralax:
    http://gamesalad.com/game/play/35456

    it was pretty simple to do, lets say you're play area is 480 wide (landscape view). Create an image 960 wide and cut it in half, so you have two 480px sections. Position the first image at 0, and the other at 480. Then put rules on each that says when positon.y is >= 720 move to -240. that should wrap everything around.

    does that make sense? I'll see if I can throw together a quick demo
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
  • EastboundEastbound Member, BASIC Posts: 1,074
    Oh very nice Mulcahy! Never thought of that approach.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Sweet, thanks! I might do that. At the moment I have wrap enabled and I just kill enemies I don't want to reappear when they hit invisible walls... seems to work ;)
  • quantumsheepquantumsheep Member Posts: 8,188
    mulcahy said:
    ok, here's my parallax demo:
    http://gamesalad.com/game/play/14201

    you should be able to download it and see what I'm doing.

    Doesn't show up for me :(

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • AfterBurnettAfterBurnett Member Posts: 3,474
    Hmmm... problem with this method.... the images stop when they get to their target...
  • AfterBurnettAfterBurnett Member Posts: 3,474
    I can't find it either...
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Okay, here's what I've done... probably wouldn't work with detailed gfx but mine is an Atari 2600 homage so it's fine. Basically, I have a timer inside an actor that spawns a new actor (the scrolling BG) every couple of seconds. Takes a while to get the timing precise but it's working for me. Obviously you have to set the linear speed of the actor to whatever you want too.
  • bladeolsonbladeolson Member Posts: 295
    I have done it. The trick is to make the layers move at different speeds the ones in the back move the slowest. Tie everything to the left or right movement. I made the screen wrap on X too so it wraps around.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Yeah but that doesn't help when you have bullets flying around ;) Don't want them to wrap back! I used a timer and spawner... working well in my game :)
  • skottskott Member Posts: 172
    mulcahy: Cool, i'll take a look at it when i'm back home from work..
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Has anyone got this going smoothly? Works okay for me (changing self.position X) but every now and then it jumps and then I have a gap between my png files... there is no particular time it happens... sometimes it doesn't but it's annoying nonetheless.
  • Rob2Rob2 Member Posts: 2,402
    I'm not trying to be clever again Poly (sounds so sweet) but that link I posted at the top of the thread is the best example I've seen, you don't get the vertical flickers on a device that appear in safari, I'm sure JC would mail it to you.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Yeah, I had a look at that... but can't download it... I shall track him down... thanks.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Although... that is a pretty basic demo... nothing coming in from off screen etc so he may have just wrapped the X axis... which doesn't help me... if he didn't use wrap though, I'm very impressed and intrigued!
Sign In or Register to comment.