picking and collision cells

0 favourites
  • 3 posts
From the Asset Store
Perfect Particles
$2 USD
80% off
Particles support animations, collisions, effects and etc.
  • Ashley

    I have been disussing optimization of collision with some other users and wondered if this is still true, from my quick test picking before the collision check seems to be faster in c3.

    Just want to confirm. ty!

  • What the blog post describes is still the case.

    It's not guaranteed to be faster to check for collision first, but I would suspect it usually is. If you have thousands of spread-out instances and a series of conditions that are costly to check followed by an overlap check, it will likely be much faster to do the overlap check first. However if you have thousands of instances all in the same place (hence in the same collision cell) and a cheap condition that can quickly filter them down to just a few, then it's probably a bit faster to do the collision check last. However the first case will potentially make a big difference and the latter case probably only a small difference, hence the advice to prefer the former. As ever the only way to get the correct answer on performance questions is to measure it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for the answer! :)

    Really helps alot to know for the default approach of writing collision events.

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