[Feature Request] - useful Sprite/Family conditions

Discussion and feedback on Construct 2

Post » Tue Jun 21, 2016 8:54 am

After a lot of testing I've found out that one of the cheapest if not THE cheapest in terms of CPU load for picking/filtering objects is using the condition "Is on Screen", so I use it everywhere and filter by this first, if I can. I don't know why that's the case, but It seems to be so. Even if you write your own equivalent doing the same thing with events that condition (is on screen) seems to be a lot cheaper CPU wise.

Maybe it's because the "is On Screen" is working under the hood in a much better way.

This is the case especially if you have many objects.

So here's some useful Sprite/Family picking conditions that should be considered in the sprite/family conditions dialogue.

* Is within distance/radius to (Filtering if XY are within a certain distance/radius)
* Is Intersecting BBox (Filtering if other sprites/family intersecting the BBox) VERY useful.
* Is within angles of sprite angle (Filtering if XY is within ## degress of ## angle) like the line of sight behaviour.
* Is above/below 2 points. (Filtering if object is above/below or left/right 2 XY coordinates)

These are some of the conditions I use mostly, which if done with event feels like they are more heavy than necessary.

Maybe behaviours could be used to do the same thing? If anyone good with creating behaviours know's how to do this, I'd be happy to pay for it. ;)
Follow my progress on Twitter
or in this thread Archer Devlog
B
38
S
15
G
17
Posts: 949
Reputation: 12,320

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests