parallax scrolling and camera control

fenix66fenix66 Member Posts: 59
edited November -1 in Working with GS (Mac)
Is it possible in GS to use parallax scrolling when the main actor has camera control behavior?

Comments

  • PhoticsPhotics Member Posts: 4,172
    fenix66 said:
    Is it possible in GS to use parallax scrolling when the main actor has camera control behavior?

    Yes
  • fenix66fenix66 Member Posts: 59
    Can you tell me something more? how to do it?
    I'm sure that the solution is very easy but I feel i'm missing something.
  • PhoticsPhotics Member Posts: 4,172
    As mentioned in The Unofficial Gamesalad Textbook (Pseudo 3D chapter) the trick is to control the parallax scrolling with camera data — not main character data. Otherwise, the backgrounds can scroll when the main actor isn't moving or when not appropriate... like when the camera has reached the edge of the scene.

    To access camera data, scene attributes have to be used.
  • RedlerTechRedlerTech Member Posts: 1,583
    EASY :) http://gamesalad.com/forums/topic.php?id=22891
    Sorry couldn't write earlier,
    Matt
    _________________________________________________________________________________
    GameSalad Community Project
    Quality Game Making Service
    1 On 1 Project Help
  • SparkyidrSparkyidr Member Posts: 2,033
    oo ta.

    Yeah, 2 really straight forward ways to do parallax scrolling in that template :)
  • kapserkapser Member Posts: 458
    I'm not really familiar with GS yet so I didn't expect this to be simple. Gonna have to buy this template :)

    Does it grab a lot of juice? I'm scared of performances so I didn't want to add backgrounds (big scenes so it would require big sprites in my game), but that would add a nice touch of polish. It's not expensive but I'd like to know if this is code heavy.

    I'm not sure I could get this to work myself and it looks pretty smooth from the videos. thanks for making this!
  • SparkyidrSparkyidr Member Posts: 2,033
    It is actually a lot smoother than it looks in the youtube. My macbook was really laggy when I recorded it.

    In real world situations I have found :
    Using the camera to do parallax takes more from your frames than just doing different speeds. (but it depends on the sort of game you are doing)
    Even so, you can do 3 layers pretty easy and still keep 60fps on a 3GS

    Using different speeds/velocities seems easier on the processor and is an easier way of doing it if you are just doing a constant scrolling game.
Sign In or Register to comment.