Does pick by comparison give you a ton of lag VS compare var

Discussion and feedback on Construct 2

Post » Fri Dec 25, 2015 6:33 am

I finished a long list of trial and error making a loop system for (tons) of instances, but now Im trying to figure it out, is the best way to compare (performance wise) by "compare variable" on an instance rather than pick by comparison?

Because Ive noticed by comparison adds like 40% more CPU usage. (very bad).

But picking by "compare variable" (built into object) does not.

Any other methods to pick if its compared to a passed function parameter?
B
5
S
1
Posts: 68
Reputation: 515

Post » Fri Dec 25, 2015 11:04 am

Hey @Itenimum1 hi.

I dont see any lag between those events "compare variable" | "pick by comparison" | "pick by evaluate" .
IMO its the same thing. IMO pick nearest or farthest is more cpu consumption than the above events.
I dont know for sure ( maybe it is something with your code that gives you 40% more cpu consumption ) so i think the most experience users with c2 can help you with this, maybe @ashley.

Cheers.
B
36
S
15
G
1
Posts: 59
Reputation: 3,451

Post » Fri Dec 25, 2015 2:01 pm

can you post a capx ? or at least a method (Steps) how to reproduce that? where did you see that "40%" lag?
debugger? some other tool? how? what? where? don't just bump in without any evidence / steps / etc and throw big words like "very bad"
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,450

Post » Fri Dec 25, 2015 2:03 pm

Itenimum1 wrote:I finished a long list of trial and error making a loop system for (tons) of instances, but now Im trying to figure it out, is the best way to compare (performance wise) by "compare variable" on an instance rather than pick by comparison?

Because Ive noticed by comparison adds like 40% more CPU usage. (very bad).

But picking by "compare variable" (built into object) does not.

Any other methods to pick if its compared to a passed function parameter?


Post a .capx to show this issue here and steps to reporoduce.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,480
Reputation: 59,746


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests