What is more efficient?

hackmodfordhackmodford Member Posts: 48
edited November -1 in Working with GS (Mac)
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?

Comments

  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I would change the linear velocity rather than using accelerate but 55 fsp is definitely nothing to worry about!

    Personally though, I would untick moveable and use interpolate.

    Ace
  • hackmodfordhackmodford Member Posts: 48
    Oh i know it's fine... it's just ugly when you're doing 60 and then it drops to 55 and then goes back to 60

    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
  • hackmodfordhackmodford Member Posts: 48
    Bump
  • DrGlickertDrGlickert Member Posts: 1,135
    I'm curious to hear this answer. My game has a framerate of around 8-10. So I need all the efficiency help I can get!!
  • hackmodfordhackmodford Member Posts: 48
    I've been trying like mad to have an actor that uses the physics engine, and then simply constrain the other actors X and Y Values in relation to that actor.

    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
Sign In or Register to comment.