Should I interpolate or move?????
Portyman
Member, PRO Posts: 409
I have a game that requires platforms to move upward. I have them set using the move behavior . Shpuld I rework gem use interpolate to save on game overhead?
Has anyone seen a significant improvement?
Thanks
Has anyone seen a significant improvement?
Thanks
Comments
Hope this helps
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Thanks
Does anyone have a sample of using interpolate for that?
Interpolate is 2nd fastest cpu usage, middle complex to implement, easing functions provide smoother motion.
Move is 3rd fastest, easy complexity, linear unnatural motion.
Accelerate, most cpu intensive, easy complexity, very realistic motion.
I have actors that use the move attribute with the speed set to a multiple of the player's score. This seems to result in a smooth movement and means all the different actors keep to the same speed. Also, the speed will be updated while the actor is moving as the player's score goes up or down.
I used to have the actors change velocity every 0.01 seconds (using self.time, not a timer attribute) to a multiple of the current player score. But this gave a jerky movement and worse fps than using the move attribute.
Could you give an example of how I could achieve the same thing using constrain with game.time?
Cheers!
If i put 4 walls up around the screen... how would you have the actor bounce around when usually interpolate is just moving to one spot. Timers and rules for when you reach a certain spot on screen?
While the logic might still be worth it from a CPU prospective, it did generated some jerky movement while moveTo was fairly smooth (at least until it reaches it's destination and have a small correction jump...).
GR
Interpolate is a attribute to an attribute over time.
so in my lets say ball actor i put -
Interpolate: self.position.x to 300 - duration: 4 sec.
Interpolate: self.position.y to 340 - duration: 4 sec.
it'll start to move at a upper right angle on landscape screen.. once
it hit's the wall it should just bounce? don't see that happening. it wants to just move to that spot and doesn't bounce.. even if it did bounce it just doesn't seem like interpolate would give it the velocity to keep going?
maybe i'm thinking this wrong
i'm trying to have letters bounce around the screen without using the Moveable selected and Change Velocity feature to have it move.
even with restitution at 2 and ball at 0
kind of thinking there isn't a clean way to do it in place of using a 'moveable' actor with change velocity.