Disabling collisions: worth it?

This forum is currently in read-only mode.
  • Is it worth it to set collisions to none for objects which never collide with anything (ie.particle sprites)? Even if there are no collision checking events, does it still use cpu time? If so, how much? Is it a negligible difference for say.. 300-500 objects?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm, not sure.

    For physics, I think the answer is definitely yes.

    For other behaviors, I don't really know. It's not like the behavior knows whether or not you've put stuff into the game to collide with, so it's got to check for collisions. The question is, are the behaviors smart enough to skip that if you've selected "None" as the collision type? I suppose only a dev could answer that one, otherwise you could do some tests on your own.

    As for moving your own sprites around without behaviors, I'm pretty sure the only time they're checking for collision is when you tell them to in events, so it wouldn't really matter if you're not colliding them with anything.

  • I've done this, expecting it would be faster.

    I have an object that expels a jet of sprites with physics enabled and collisions disabled. They die after a second.

    It's kind of a zen question: if there is no collision mask, is there a collision check?

  • If no plugins, behaviors or events check for collisions on an object, then there are no collision checks on that object. Therefore, setting the collision mode to 'none' has no effect. What would be the point of checking collisions for an object that doesn't need them anyway?

  • So, for example, when you untick bounce off solids with the ball behavior, It stops checking for collisions completely right?

  • Yes.

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