Do Overlap checks require Collisions enabled?

0 favourites
  • 6 posts
  • I've read that performance can be noticeably improved by disabling Collisions on all sprites that don't use them. My game doesn't have any "on collision with" checks, but it does have a whole lot of overlapping checks. Do those checks require collisions to work, or can I go ahead and disable absolutely all collisions?

    My games runs at 60fps on my PC normally, 30fps in debug mode (making that mode confusingly pointless for usual performance measurement?), 25fps on my Galaxy S6, and 2fps on my third gen iPad. I'm aiming for 60fps on modern phones, and 20-30fps on my old iPad.

    Bonus Question: I'm resizing images where I can. If I have a sprite and image sized at 1024x256, resize the image to 512x128, but keep the sprite sized at 1024x256 (so slightly blurred image quality) would that improve performance because the image is now much smaller, or make no difference to performance since the sprite is the same size as it was before?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I wasn't aware there was a way to disable collisions. An "on collision" is basically a "is overlapping" with a trigger once. Collisions are only detected with a object if it either has the solid behavior or you use one of those events.

    The image size doesn't affect the performance. It just reduces the amount of vram used which can be important for mobile devices.

  • I was wondering about overlapping using collisions as well, so I took a simple project that has overlapping triggers and disabled collisions to see, those triggers didn't fire anymore. So I'm willing to bet "is overlapping" uses the collision mesh.

    There might be a trick with selectively enabling the collision, like in my case, I only really check for an overlap after dragging and dropping, maybe it would be worth enabling collision only then and then disabling it again.

    But short answer, overlap checks require collision be enabled.

  • And what about disabling all the collisions? Does the game run faster after this? Isn't it pointless to create events to disable collisions?

  • Thanks for the replies!

    You can disable collisions for sprites in their Properties window. It's not like I'm creating events to disable them at run time. There are a few threads I found through the search function that claim disabling collisions on sprites that are only used for decoration improves performance.

    And thanks for the clarification that overlap checks do indeed require collisions enabled. I've disabled collisions for all sprites that don't use overlap checks (still almost half of them) so hopefully that helps performance in some small way

    The image size doesn't affect the performance. It just reduces the amount of vram used which can be important for mobile devices.

    Awesome, thanks. I'm hoping to release this game on mobile too, but PC is my primary focus for now. Still, even if it only affects VRAM, am I correct in thinking that it's the image size that matters, not the sprite size? So a foggy mist sprite sized 512x512 using an image size of 256x256 has no noticeable (or any) performance/VRAM difference over a 256x256 sprite using a 256x256 image?

  • If you're not checking for performance with the sprite then disabling the collisions won't matter.

    Yeah, only the image size affects the amount of vram used. The size of the sprite doesn't matter. Also, there is no performance difference.

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