Does anyone find particular FORMULAS or expressions to be really expensive on performance?

HymloeHymloe Member Posts: 1,653
edited October 2012 in Working with GS (Mac)
Are there any specific formulas that people avoid using, because they're bad for performance?

Just wondering if there's particular ones that people have found Game Salad to do slowly, versus other ones that they prefer to use instead?

For example, I've got about 50 monsters in my level. And if I get them all to do this one behaviour, it goes from 53 frames per second to 16 frames per second. That kind of shocked me, that "magnitude" seems to be so inefficient.

Display Text: magnitude(self.positionX - game.PlayerPosX, self.position.Y - game.PlayerPosY)

- Murray

Comments

  • HymloeHymloe Member Posts: 1,653
    Ahh, well, upon further investigation, I have realised that the performance hit I get seems to be largely caused by using the actor "Display Text", because it is effectively enforcing a "Constrain" rule on that equation, even though I'm not using a "Constrain" rule anywhere. (I'm actually only wanting to update the Magnitude equation every 3 seconds).

    Hence the extreme slowdown, because it's calculating that equation every frame, so it can display the text!

    Once I removed the Display Text, the performance is more like what I expected.

    Despite that, I'd still be keen to know if people have particular FORMULA types they like to use, or avoid.

    :)
Sign In or Register to comment.