time scale & performance question (?)

Discussion and feedback on Construct 2

Post » Sun May 18, 2014 3:41 pm

I was just wondering...

imagine that a game does a number of calculations and outputs a certain fps.

if i set the timescale to 0.5, would that improve performance?

could i then design the game to look "normal" at time scale 0.5, and since it would now be calculating half the time per seconds, would it get better fps?

does tick calculations even change whit time scale?.... according to my test it doesn't.
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Sun May 18, 2014 3:50 pm

I was wondering the same thing. I was wondering if slowing down the timescale would influence the logic fps. No it does not. Intead it just effects the dt value. It's a pitty. I would have like to set my logic fps. I found this does wonders for mobile performance to use manual 30fps logic.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Sun May 18, 2014 4:06 pm

Not unless your logic is in an event that runs every timescaled dt seconds.
Image ImageImage
B
168
S
50
G
163
Posts: 8,222
Reputation: 105,063

Post » Sun May 18, 2014 5:23 pm

the timescale indeed does not affect performance, since the logic still applies to render to 60 fps.

@jayderyu: "It's a pitty. I would have like to set my logic fps. I found this does wonders for mobile performance to use manual 30fps logic."

I agree with that, it would indeed mean 2x more time to render the logic, which could be great for games that don't require a lot of precision on all platforms.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Sun May 18, 2014 7:18 pm

yup, i tested this, and indeed no matter the timescale the game runs 60 ticks per seconds.

I'm pretty sure construct had a "force 30fps" system action no too long ago. why did they remove it? =O
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Sun May 18, 2014 8:00 pm

Because it sucked.
1: Javascript is not that fast to begin with, so running events slower doesn't really help if the cpu is already overloaded.
2: Garbage collection is horrid.
3: Gpu, and cpu run independently.
Image ImageImage
B
168
S
50
G
163
Posts: 8,222
Reputation: 105,063

Post » Sun May 18, 2014 8:46 pm

i see :D

its true though, ashley always says gpu takes considerably longer than cpu, and that cpu alone, in fact, would almost never impact on fps.

so this was really not important i guess xD
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Sun May 18, 2014 9:52 pm

newt wrote:Because it sucked.
1: Javascript is not that fast to begin with, so running events slower doesn't really help if the cpu is already overloaded.
2: Garbage collection is horrid.
3: Gpu, and cpu run independently.


1. Ashley only implemented a rudimentary 30fps mode. He has said that he firmly believes there is no benefit from running at lower than 60fps(though many PS3/360/One/Ps4 games and companies do otherwise). And more importatantly that actually running C2 at a proper 30fps would require a large foundational change to the engine. Which he doesn't believe that 30fps is worth while.

2. Not really any different than Java's. And Java games have well worked around that problem. So has Ashley.

3. That's kinda the point.

The prior request was to drop the render down 30fps. This one isn't about slowing the rendering. This discussion is about controlling the rate of logic. And from practical experimentation I found using Everytick 0.033 for logic would turn a 15fps to 60fps. Depending on the insensitivity of the logic itself. Of course overkill of gfx is still overkill on gfx.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Sun May 18, 2014 10:04 pm

All I can say is, generally the main issue will be cpu, and the only real optimization would be to use triggered events rather than every tick.
If that logic is too much for a trigger then no amount of culling will help you.
The problem is that there isn't always a clear way to do that.
Well there is, but its not the easy way.
Image ImageImage
B
168
S
50
G
163
Posts: 8,222
Reputation: 105,063

Post » Mon May 19, 2014 9:38 am

30 fps logic could in theory have twice more time to be calculated, also, since C2 doesn t render the screen if nothing has changed, it effectively would make less rendering work from what I understand
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests