Interpolated ?

bluebyu25bluebyu25 Member Posts: 500
edited November -1 in Working with GS (Mac)
Hey guys,

At work just now I thought of something. On my game I use to have clouds floating in the background but removed them to save on memory. Then I thought hey I can interpolate them. I've used interpolate a little here and there but originally I had them changing velocity at 5 going right relative to my scene. How could I accomplish this with interpolate?

Self.velocity?
Self.position.x?

I just want it to go very slow (5 on speed when using change velocity)

Should I just mess with the duration until it's the speed I want? Or is there a more efficient way? Also, if the cloud could
bob up and down while moving right that would be even better, if anyone knows how.

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    If you're moving them left and right, use Interpolate self.position.X to self.position.X+1 over 15 seconds, or whatever.

    You'll have to play with the "+1" and the "15" seconds to get the effect that you want.

    Up and down would be interpolate self.position.y

    Also, as long as they don't have collisions or play a part in the game, then turn Moveable off to save a bit of memory.

    Interpolate is a fantastic behavior in GS. One of my favorite for sure. I use it any chance that I can.

    You'll have to play with the settings to get it exactly how you want.
  • DrGlickertDrGlickert Member Posts: 1,135
    In re-reading your post, yes, to move right do this;

    Interpolate self.position.x to self.position.X+0.5
    over 60 seconds. That'll give it a very slow right movement.

    Start with that and see where it gets ya.

    Don't forget about turning moveable off. :-)
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    DrGlickert said:

    Don't forget about turning moveable off. :-)

    Ah and the real reason interpolate can save you so much memory.
  • bluebyu25bluebyu25 Member Posts: 500
    tenrdrmer said:
    Ah and the real reason interpolate can save you so much memory.

    Yep exactly why I wanted to do this :-)
Sign In or Register to comment.