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
40
S
12
G
1
Posts: 532
Reputation: 4,147

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
40
S
12
G
1
Posts: 532
Reputation: 4,147

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
233
S
62
G
33
Posts: 902
Reputation: 40,398

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
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

Post » Sun Aug 25, 2013 8:15 pm

Thank you!
B
40
S
12
G
1
Posts: 532
Reputation: 4,147


Return to Construct 2 General

Who is online

Users browsing this forum: tarek2 and 12 guests