Big levels and FPS

New releases and general discussions.

Post » Wed Sep 17, 2008 2:53 pm

Thanks Ashley that's helpful, I'll attempt to hunt down any nested loops, (hopefully they're not necessary). I did try to do the LOS events like you said, even putting them in subevents to make sure.

I guess what I was suggesting isn't all that useful if it's just my poor coding, if it can be done through events.

One more thing, are pick by comparison events as processor consuming as for each object loops? (if they loop through each object checking the expression) because I may have those and for each object loops nested together.
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Wed Sep 17, 2008 3:16 pm

[quote="faggatron":2uuw1ybu]One more thing, are pick by comparison events as processor consuming as for each object loops?[/quote:2uuw1ybu]
No, it's an ordinary filtering condition and doesn't run repeats. Nesting them doesn't cause further exponential processing - just further filtering of the handful of objects that are picked in that event. It is the repetitions run by the looping conditions like Repeat, For, For-each and so on that cause exponential processing when nested.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Sep 17, 2008 5:00 pm

That's nice.

I do have some nested loops for minimising an expression, these could well be the cause of the lag. Seems like a decent time to request the "pick by highest/lowest expression" I've requested a couple of times to fix this really nicely.
EDIT: now fps is ~80 at the start (hell of a lot better than 30) when I disable this event it jumps up another 20ish, clearly an extremely inefficient way of doing it, pick highest/lowest would be really nice.


Adding pick by distance<2000 to every for each enemy loop seems to have worked. Thanks a lot that was a huge help.
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Previous

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests