Window size impact on collision checks?

Get help using Construct 2

Post » Tue Feb 21, 2017 4:30 pm

Hi
I was playing around with simple collision checks and performance. When i came across following strange thing:
I had 800x500 window size with 1250x1250 layout size. I had 1 player sprite, bullet and around 200 wall sprite. I spawned bullets while a mouse button was down and checked bullet overlapping with wall sprites to destroy them. I had CPU usage up to 60%+ and a lot collison checks.
But then i made window size 50x50, set layout scale 0.05. And did exact same thing i had almost 2-3 times better performance. So is there built in collision check range, which == window size . But is there anyway to set same collision check range/grid manually without setting small window size or adding events, as it seems to work nicely? Could not find any post about this.
B
30
S
20
G
14
Posts: 17
Reputation: 9,874

Post » Tue Feb 21, 2017 6:33 pm

You're talking about collision cells. Here's the blog post Ashley did when he introduced this feature.

https://www.scirra.com/blog/ashley/6/co ... on-in-r155

However, I'm not sure if there is any reliable way to manipulate the collision cells.
B
67
S
28
G
24
Posts: 970
Reputation: 18,675


Return to How do I....?

Who is online

Users browsing this forum: dahu, ketramtu18, Syazanie Amirin and 9 guests