Complex collision mask = more CPU usage?

This forum is currently in read-only mode.
  • With the physics behaviour you can edit the custom collisionmask.

    Should i try to keep it simple or is the diffrence in performance so low that it does not matter.

    I have over 50 large sprites with complex shape that i will put collision mask on.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've heard someone mention that a complex/custom collision mask will produce some slow-down, but I don't know if it will be significant on its own. Best bet is to use box or elipse wherever you can though.

  • the fastest shape is ellipse, polygonal shapes are generally more computationally expensive as they become more concave and/or more complex as in # of vertices.

  • From my personal experience, custom collision masks for the physics behavior can have a big influence. When working on a fluid simulation I first used a custom collision mask with only 4 points and could use 300 instances. With the help of the community I found another method where I could use ellipse collision. The result was 6 times the number, or 2400 objects.

    The more objects with custom collision and the more points in the collision mask, the more influence on the frame rate. On the other hand you might only have 50 objects in total, so it's hard to tell, when exactly it is unusable for you.

    You will need to test it. Just create a sprite of the intended size and a collision mask with the number of intended points. Create 50 instances and watch the framerate.

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