Do unused behaviors take up ressource/slow down the game?

0 favourites
  • 8 posts
From the Asset Store
Set of tiles to create a map for top-down games with island theme
  • Let's say I want platforms that move and some that don't using the Sine behavior.

    -I could either make 2 different object types, one with the sine behavior and one without the sine behavior.

    -I could also have just one type of object, with the sine behavior, and to platforms that don't move put all the "Sine stuff" to 0 (or just disable the behavior on them).

    So my question is simple: are platforms with Sine behavior set to 0 (doesn't move) taking any more resource than a platform with no sine behavior at all?

  • I think they get loaded in ram, but not used.

  • A behavior sine with a magnitude of 0 still takes up calcul time, to be exact, even disabled behavior take up calcul time.

    however, that will matter only when a lot of objets are concerned ("a lot" depending on the target platform, but I would say under 100 you should not see much difference, but test it.)

  • Thanks for the quick replies!

    I don't think I'll have as much as 100, but even if it won't make much difference, I'd rather stay safe and optimize it.

    Thanks again!

  • thnx Aphrodite good to know.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It's a give and take though, you may use a fraction less memory but you'll also have more objects which means bigger download etc.

  • Thanks for the quick replies!

    I don't think I'll have as much as 100, but even if it won't make much difference, I'd rather stay safe and optimize it.

    Thanks again!

    the point was "the optimisation at this scale is probably a waste of time, as something else would probably eat more ressources", I said 100 but it would not surprise me if even at 1000 it would not be a big deal compared to other things that might happen in a game.

  • Yeah but even if it's just a little bit, a bit here and there at the end can add up if I let every single little thing pass. Didn't take much time to change anyway, so all good.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)