'Parallax scrolling', I think I love you. Possibly more than interpolate.

StormyStudioStormyStudio United KingdomMember Posts: 3,989
edited November -1 in Working with GS (Mac)
'Parallax scrolling' or 'Pseudo 3d' as some people call it is so cool.

I think I may love it more than 'interpolate'.

Little tip in the Unofficial GameSalad Book on how to do it.

It's simple to apply, it works and adds so much to a games style..

My lift shaft in game transitions are potentially going to be very cool because I can now hint at the depth of the lift shaft, with pipes and wires passing as you move up at different speeds in relation to the camera move....will perfect it visually tonight.

...

and that's all I've got say on the matter.

Comments

  • cbtcbt Member Posts: 644


    :)
  • FjantIncFjantInc Member Posts: 115
    Did they add parallax scrolling as a function? Or do you create it with the standard rules and behaviors? I'm all ears for any tricks =)
  • simo103simo103 Member, PRO Posts: 1,331
    I created a demo you can download and pick thru if you think it will help.

    http://gamesalad.com/game/3623

    S
  • FjantIncFjantInc Member Posts: 115
    MotherHoose: Yeah, I know what it is, just didn't know of an easy way to do it in GS =)

    Simo103: Thanks, I'll take a look at it when I'm on my Mac!
  • MotherHooseMotherHoose Member Posts: 2,456
    oh...
    you do not create a solid background... you create images of section of your background and place them as layers in GS
    you scroll/move the image layers at different rates for the effect...
    faster for foreground slower for further away...

    the action actors don't scroll out of original scene boundaries...

    like your demo @simo103 ... you got it perfect!

    MH
  • sebababisebababi Member Posts: 51
    Hi

    I'm struggling trying to do Parallax scrolling with Camera Control.

    I tested with Simo103's Demo, very nice by the way.

    Is it possible to do Parallax scrolling with Camera Control?

    If so, how?

    Performance whise, is it better to replicate the backgrounds, or to spawn new ones, and destroy old ones?

    Thanks
    Sebastian
  • PhoticsPhotics Member Posts: 4,172
    sebababi said:
    Is it possible to do Parallax scrolling with Camera Control?

    I wrote about Parallax scrolling in the Pseudo 3D chapter of The Unofficial GameSalad Textbook.

    Basically, The layer movements are constrained - relative to the camera's position. You can't get that data unless you edit an actor in the scene itself, as it's a scene attribute.

    GameSalad... I think that's something that should be fixed. Actors should be able to access scene attributes — like the camera — in the prototype.

    I used to be able to cut & paste such information into the prototype, but that seems to cause problems with the newer version of GameSalad.
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Any global actor can control camera movements if you put a little 'middle-man' instance in.

    You can create one instance and have it constrain a global attribute you created to the camera attributes (or any other scene attributes).

    Then any other actor can control the global attribute you created (which in turn will control the camera)

    On a different note I find that using replicate for my background parallax layers works well.
  • sebababisebababi Member Posts: 51
    Thanks to both,

    Now I get a better perspective.

    I'm very new to GS.

    At the end I made it in a very simple way, just giving different movements to each layer. 5, 10, 15 speeds. Not much.

    As Shaz said, I used replicate.

    I calculated that I only needed 20 times. (480 x 20 = 9600).

    The only problem is that even if I replicate it 100 times or 150, many times if I die in the game, some of my layers disappear.

    I'm not sure if this is related to what Photics said about GS problems.

    Will it affect my performance to replicate 200 times if I need 20?

    thanks again

    P.S. I clicked in "subscribe to topic via email" but didn't get any emails, is this normal?
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    No need to do that :o)

    Just make a rule so that the image resets its position when it goes off screen.

    I replicate twice, one to the left and one the right.

    Yeah I think subscribe to post doesn't work.
  • cbtcbt Member Posts: 644
    Old times..
  • sebababisebababi Member Posts: 51
    Thanks Shaz

    I'll try that sounds a lot better ;o)
  • sebababisebababi Member Posts: 51
    Hi Shaz

    I tried to do what you said, but it's jumping a little bit. what am I doing wrong?

    Here is the project:

    http://gamesalad.com/game/10717

    thanks
    Sebastian
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Yeah I used to get jumping but it's smooth now. Can't remember what I changed but here are the rules i use now.

    image

    This if for an image that is 480 in length
  • sebababisebababi Member Posts: 51
    Thanks a lot Shaz,

    I tested it with your exact number and an image of 480, and still is jumming.

    if feels that it's a micro jump, the moment it changes the X coord.

    I tried with Move & Move to, and also the "stacked" option.

    I'll leave it like this.
Sign In or Register to comment.