What is more efficient?
hackmodford
Member Posts: 48
Basically I'm creating an endless game were objects come from the bottom of the screen and move up.
Right now each object (powerup, obstacle, etc.) Is using the accelerate ^ to determine their speed. The all have the same attributes in regards to physics... When I want to speed them up I simply change the max speed (which is a global value)
Now My framerate sticks right around 60 but will drop to 55 every now and then...
Would it be better to just have one actor which acc. up and loops endlessly, and then just constrain the actors attributes in relation to that one actor? Would that be more efficient?
Right now each object (powerup, obstacle, etc.) Is using the accelerate ^ to determine their speed. The all have the same attributes in regards to physics... When I want to speed them up I simply change the max speed (which is a global value)
Now My framerate sticks right around 60 but will drop to 55 every now and then...
Would it be better to just have one actor which acc. up and loops endlessly, and then just constrain the actors attributes in relation to that one actor? Would that be more efficient?
Comments
Personally though, I would untick moveable and use interpolate.
Ace
How would I use interpolate to move objects constantly... and then have them gradually speed up?
interpolate x to object.x + 5
Is that the idea?
Or is it better to do
every .01
set x to object.x + 5
I've got it so that if the obstacles hits the end of the screen first it loops back and resets the relation and everything is peachy, but as soon as the reference object loops back I lose it.
I can't seem to wrap my head around why it would work when you start the scene and it doesn't when the actual reference object loops...
Uggghhh