Is this collision check count normal / reasonable?

0 favourites
  • 7 posts
From the Asset Store
Be quick and count the cards and choose the right number!
  • I have attached a capx and screenshots showing what I am seeing.

    The red circles called "Segments" have the platform behavior and pin behavior using Rope style.

    The blue squares have Solid behavior.

    There is a total of 60 objects, but I am getting 50K-60K+ collision checks per second.

    Is this normal / reasonable?




  • It's something to do with having so many objects with the platform behaviour... I'm not exactly sure what, but I've come across some threads were people were saying it caused problems to have too many platform behaviour objects.

    EDIT: oh, and to actually answer your question (sorry).. that might be a bit high, but it really only matters if it's causing problems on whatever device you're targeting...

  • So 9 objects with Platform behavior is considered a lot?

  • well.. whether it is or not, that's where your collision checks are coming from...

  • The use of the platform behavior was just to add "gravity" to those segments... as it turns out just lerping the segments down on the Y axis every tick accomplishes the same thing and reduces the collision checks to zero.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Because its exponential, the more objects you have on screen that has behaviors or physics or anything that requires checking for collisions, the more it has to check between each iteration of the object.

    The best way is to filter out, but using instance variables and don't check for overlap or collisions until required (trigger). But it depends on the game design.

  • This has something to do with using the pin behavior mixed with the platform objects. If you remove the pin events and just create the segments then the collision checks reduce to 1/4 what there was before.

    Why not use physics behavior....?


    I checked a previous project of mine that had 6500 objects on one layout (mostly solids) and, with a tiny bit of optimization (turning the behavior off when outside a certain range etc) there were approx 250 collision checks per tick. If you can get the effect you want on the hardware you're targeting then there's no problem with what you've done....

    Here's an optimized version using platform behavior that disables collisions that are far away from the objects that use rely on it.


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