Performance: Calc Distance vs Collisions

Discussion and feedback on Construct 2

Post » Thu Aug 22, 2013 7:47 pm

I have lots of small objects which are supposed to carry out an action when it gets within range of the target.

Which would be less system intensive?

A) Create an AoE around the target, set its opacity to 0 and check for collision with the objects.

or

B) Use the distance(x1,y1,x2,y2) < AoE formula.

I normally use method B, but I suspect that method A would be better for performance with a lot of objects around.
B
7
S
2
G
1
Posts: 37
Reputation: 1,278

Post » Fri Aug 23, 2013 11:56 am

Bump.
B
7
S
2
G
1
Posts: 37
Reputation: 1,278


Return to Construct 2 General

Who is online

Users browsing this forum: mekonbekon and 11 guests