Interpolate VS. Timers

DrGlickertDrGlickert Member Posts: 1,135
edited November -1 in Working with GS (Mac)
How much better is INTERPOLATE on the processor/memory than TIMERS?

Like a lot or a little?

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    interpolate is one of the best things in GS. use it above all else if possible :)
  • DrGlickertDrGlickert Member Posts: 1,135
    Excellent. Interpolate will be my new friend.

    "TIMERS! Be gone!"
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    best thing about interpolate is that you can move / rotate actors after turning off moveable, which significantly reduces the ram usage.
  • DrGlickertDrGlickert Member Posts: 1,135
    I did know that. Thanks Jon! Wish I had a game that I can use Interpolate for my main actors.

    Now, in my 2nd game, I WILL use Interpolate to move actors!
  • steve86steve86 Member Posts: 806
    tshirtbooth said:
    YA interpolate is one of the best things in GS

    Only thing to keep in mind is that it can not be interrupted.
    Other then that its perfect
    ____________________________________________________________________________
    </blockquote

    so suppose I have some sort of health bar that goes down as time passes by. But if I grab a fruit the health bar will increment a bit. Normally i'd use a timer that decrements the width attribute of the health bar every x seconds and If I grab a fruit I will increment the width attribute.. if instead of the timer I use interpolate to decrement the width of the health bar.. will the interpolate attribute care that I'm eating fruit and incrementing sometimes the width or will just go to cero no matter is sometimes (when I eat the fruit) the width attribute increments
  • AppsRacKAppsRacK Member Posts: 346
    tshirtbooth said:
    YA interpolate is one of the best things in GS

    Only thing to keep in mind is that it can not be interrupted.
    Other then that its perfect

    cheers

    +1 learn new things again. Now i know why my actor doesn't stop even with proper boolean set up.
  • DrGlickertDrGlickert Member Posts: 1,135
    I think it was JohnPapiomitis told me that he no longer uses booleans. He uses integers and puts them at 1 or 0 for true/false statements. It allows for more flexibility and you can Interpolate those between 1 and 0.
  • CapCap Member Posts: 225
    DrGlickert said:
    I think it was JohnPapiomitis told me that he no longer uses booleans. He uses integers and puts them at 1 or 0 for true/false statements. It allows for more flexibility and you can Interpolate those between 1 and 0.

    Could you please explain your last sentence?
    Moreover: Shirtie said that Interpolate can't be interrupted. So if I use the pause function, will the interpolation go on?
    Thanks.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    say you have something interpolating to its x to 400. once the interpolating has started, you cant stop the movement half way by switching a attriubte or such
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    to add to what doc said about intergers vs booleans, booleans work great and look clean, but alot of things i find intergers better for and can use them to trigger other events instead of having extra atributes and constrain and a timer

    for example if u had a unlocked actor that you wanted to trigger something when something elses position is whatever , and do something else a certain amount of seconds after

    instead of having another atteribute and constraing to the position
    having a rule when attribute is equal or less then

    and having a rule when attribute = whatever, timer after .5 seconds do whatever;

    you could do when attribute scene layers player position is = or greater to whatever
    interolate attrribute to one
    and have another rule when attribute=.5 do whatever

    that right there will cut out oneconstrain and timer, which will help a ton when used alot
Sign In or Register to comment.