Tend towards expressions or conditions?

Discussion and feedback on Construct 2

Post » Mon Dec 26, 2016 11:42 am

I was wondering if when I set things such as a variable value, is it less burden on the CPU if I use an expression to check another value or a condition?
B
44
S
12
G
1
Posts: 231
Reputation: 3,875

Post » Mon Dec 26, 2016 6:12 pm

It doesn't matter. The only thing the cpu has to worry about is how many operations it has to carry out each tick.
Image ImageImage
B
168
S
50
G
163
Posts: 8,220
Reputation: 105,059

Post » Tue Dec 27, 2016 12:20 am

Like Newt said, it's really not going to make any difference at all. Check out this post from Ashley if you haven't already. https://www.scirra.com/blog/83/optimisa ... -your-time
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Fri Dec 30, 2016 4:30 pm

I actually have to be careful with my events in mine because they can drop the FPS to 20 if they are done wrong.

EDIT: When done right, my game can run around 55-59 FPS during normal circumstances of an action-heavy area.
B
44
S
12
G
1
Posts: 231
Reputation: 3,875

Post » Fri Dec 30, 2016 10:33 pm

That sounds like some kind of looping issue. It would be interesting to see the code you're using to get 20 FPS vs 55-59 FPS.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Fri Dec 30, 2016 10:54 pm

It's because I have a million things going on at once and need to order conditions very precisely or too much needless crap is being processed at once.
B
44
S
12
G
1
Posts: 231
Reputation: 3,875


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests