Object vs. Family Collision

Discussion and feedback on Construct 2

Post » Sat Aug 24, 2013 10:19 pm

I you have 4 different bullet sprites and 1 enemy sprites, does it change the performance at all if you were to have individual "on collision" checks per each sprite INSTEAD of putting all 4 bullets in a family and have 1 collision check?
B
38
S
12
G
1
Posts: 526
Reputation: 4,085

Post » Sun Aug 25, 2013 1:39 am

It doesn't have any change in effect I don't think. I've used both of the ways you described and I didn't see any change.
B
4
Posts: 5
Reputation: 262

Post » Sun Aug 25, 2013 1:53 am

@ry2009 - Thanks for the response.

@Ashley - can you confirm this please? I just want to make sure before I rip apart my code.

Thanks!
B
38
S
12
G
1
Posts: 526
Reputation: 4,085

Post » Sun Aug 25, 2013 5:33 am

If Ashley is out for the weekend, you could grab one of the samples to perform tests on.
B
226
S
60
G
33
Posts: 902
Reputation: 39,975

Post » Sun Aug 25, 2013 1:48 pm

It should perform exactly the same. You could even verify this by checking the collision checks per second count is the same in the new debugger.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,228

Post » Sun Aug 25, 2013 8:15 pm

Thank you!
B
38
S
12
G
1
Posts: 526
Reputation: 4,085


Return to Construct 2 General

Who is online

Users browsing this forum: jakezinis and 5 guests