Performance of Scaled Collision Objects

Discussion and feedback on Construct 2

Post » Tue Aug 13, 2013 8:12 pm

I'm currently blocking out levels for my game, and was wondering if there are any performance hits scaling collision objects to very large sizes vs using multiple collision objects.

Here is an example.


These objects are on an invisible layer and must be sprites to work with the Physics behavior. I would assume 2 Scaled Objects would be better since it reduces the number of objects and collision checks, but that's just a guess. Are there any tradeoffs to using this scaling method vs multiple objects?

Thanks
B
80
S
52
G
41
Posts: 370
Reputation: 25,830

Post » Tue Aug 13, 2013 9:06 pm

Checking collisions with 2 objects instead of 6 would be faster since less needs to be checked. With a small number of sprites the performance difference would be negligible, but it could be more beneficial if you have many.
B
92
S
32
G
110
Posts: 5,295
Reputation: 71,501

Post » Wed Aug 14, 2013 12:52 am

Size of polygons does not matter, only quantity does.
B
149
S
75
G
20
Posts: 1,791
Reputation: 22,695

Post » Wed Aug 14, 2013 1:53 am

I thought that might be the case, thanks for the answers.
B
80
S
52
G
41
Posts: 370
Reputation: 25,830


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests