Collision checks when collisions are disabled

Discussion and feedback on Construct 2

Post » Mon Apr 24, 2017 3:18 pm

Message: ankas can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi, everyone!

I have this issue: a simple menu with 5 raster images and background, collisions are set to 'disabled'. In spite of this, I have 600 collisions checks/sec and high processor utilization. What is wrong? Any ideas?

Image

Image

Thank you.

DropBox link (not sure, whether it works or not):
https://www.dropbox.com/s/0c25tp4fhk3dwzl/menu.capx?dl=0
Last edited by ankas on Mon Apr 24, 2017 3:49 pm, edited 3 times in total.
B
16
S
6
G
1
Posts: 23
Reputation: 1,707

Post » Mon Apr 24, 2017 3:30 pm

It's impossible to comment without seeing your project file.

You have probably added something that is making those collision checks, possibly a behavior.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Mon Apr 24, 2017 3:51 pm

Thank you for the response. I updated the link at the end of my first post. It does not look like a link though.
B
16
S
6
G
1
Posts: 23
Reputation: 1,707

Post » Mon Apr 24, 2017 4:29 pm

@ankas

It's your Mouse: Cursor is over events, they are a collision of sorts.

You can check this by disabling them.

You have 2 per menu item, which is why there are 10 checks per tick.

You can reduce the number of collision checks by using Else, but I'm not sure it's worth it unless you're planning on adding a huge amount of objects and events to the menu and need to eek out every last ounce of performance (which this wouldn't improve much, if at all)
Find all the Construct 2 games that were on Steam Greenlight here
B
35
S
9
G
7
Posts: 467
Reputation: 6,864

Post » Mon Apr 24, 2017 4:46 pm

OddConfection wrote:@ankas
It's your Mouse: Cursor is over events, they are a collision of sorts.


I found that this is different. When I hover the mouse over the text, 'Poly checks' started to increase, while 'collision checks' remains at 600/sec.

OddConfection wrote:@ankas
You can check this by disabling them.


I will try, thank you.
B
16
S
6
G
1
Posts: 23
Reputation: 1,707

Post » Mon Apr 24, 2017 4:59 pm

ankas wrote:
OddConfection wrote:@ankas
It's your Mouse: Cursor is over events, they are a collision of sorts.


I found that this is different. When I hover the mouse over the text, 'Poly checks' started to increase, while 'collision checks' remains at 600/sec.


The collision check won't change just by putting your mouse over the text, the events creating the collisions are still running!

Poly checks increased when you mouse over because it first does a bounding box check (which is now true) then compares against the objects collision polygon.
Find all the Construct 2 games that were on Steam Greenlight here
B
35
S
9
G
7
Posts: 467
Reputation: 6,864


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests