Does anyone find particular FORMULAS or expressions to be really expensive on performance?
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
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
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.