r155 Collision Cells

Discussion and feedback on Construct 2

Post » Wed Jan 08, 2014 1:19 am

So instead of doing a scan potentially across 1000 objects with the "Pick instance with UID" condition looking for a matching UID... you would only scan for a matching UID on the objects in that Cell.

B
21
S
5
Posts: 196
Reputation: 1,974

Post » Wed Jan 08, 2014 2:45 pm

@ashley, okay cheers

is it just conditions that filter instances that stop the cell method?
It's okay to have them under other non-filtering conditions, functions and groups, right?



@ggibson1
"..only scan for a matching UID on the objects in that Cell"
well, anything post-collision check would already be filtered down to those instances overlappingkeepee2014-01-08 14:50:10
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Wed Jan 08, 2014 2:48 pm

Oh, 'Pick by UID' is another exception: it can immediately pick the correct instance without having to look at all of them.

And yes, it only actually needs to be the first condition for that object type. Other unrelated conditions or groups can be above it.Ashley2014-01-08 14:49:23
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

Post » Wed Jan 08, 2014 3:08 pm

@ashley, pick by UID is actaully what i was using in the earlier post,

it's interesting for a situation i'm in because i'm picking by UID before collision checking, and a few events later I need to collision check against many instances.
But the whole thing is within a 'For Each ..' event which makes it awkward to separate out the latter half into a top level event to make use of the collision cell.

I'll have a crack anyway, thanks againkeepee2014-01-08 15:09:47
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Wed Jan 08, 2014 11:39 pm

Thanks for the further explanation @Ashley, that might be useful to know in the manual entries too.
B
149
S
75
G
20
Posts: 1,791
Reputation: 22,695

Post » Fri Jan 10, 2014 11:19 am

is there a way to tell which collision mode is on? like in debugger? my game has large layout with quite a few collision objects, thought it would make a difference in this release, but i dont see improvement of fps on ipad3, which was running at 30fps unchanged.
Doo Doo Diving App Store | Google Play

Donut Pirate App Store | Google Play
B
17
S
2
G
1
Posts: 195
Reputation: 1,578

Post » Fri Jan 10, 2014 10:53 pm

@hollowthreat - it's always on and cannot be changed or turned on/off. It'll only make a difference if the bottleneck was the sheer number of collision checks. For most games the rendering is the slow part.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

Post » Fri Jan 10, 2014 11:48 pm

@ashley thanks for reply, i've just done some testing, adding loads of collision objects far away from my player, no fps drops, so it must have worked properly, this is awesome :)
Doo Doo Diving App Store | Google Play

Donut Pirate App Store | Google Play
B
17
S
2
G
1
Posts: 195
Reputation: 1,578

Post » Tue Jan 14, 2014 3:59 pm

Hey there Ashley. I wanted to ask if the collision cells work with tilemap collisions too ? According to our tests at Resonant Craft, it looks like cell collisions only happen with sprites and tiled sprites (as with tilemap, the amount of collision increases ~"proportionnaly" to the size of the level).

Kind regards,
Nathan.
B
79
S
22
G
4
Posts: 311
Reputation: 12,774

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 20 guests