Unlimited Framerate Mode

Discussion and feedback on Construct 2

Post » Thu Sep 05, 2013 12:54 am

@Arima - Sorry for my ignorance, but what would an event like that look like?
B
40
S
12
G
1
Posts: 532
Reputation: 4,147

Post » Thu Sep 05, 2013 1:13 am

Repeat 10,000 times
If sprite is overlapping sprite 2

Adjust the number of repititions until it affects the framerate appropriately.
Moderator
B
95
S
34
G
33
Posts: 3,006
Reputation: 27,874

Post » Thu Sep 05, 2013 4:36 am

Okay here's another question - if you can't set the fps to unlimited, can you set a minimum fps? And if not, how do you get around low fps collision issues using dt?
B
40
S
12
G
1
Posts: 532
Reputation: 4,147

Post » Thu Sep 05, 2013 12:59 pm

Just avoid very small fast moving objects moving towards thin barriers. You can calculate how fast an object steps every tick, it's:

speed x dt

For example an object moving 100 pixels per second at 20 FPS will be stepping

100 x 0.05 = 5 pixels/tick

So if the object is bigger than 5 pixels wide, it will never skip a collision. Even if it was only 3 pixels wide, it could only ever skip a wall that was only 2px thick. So both larger objects and thicker obstacles help prevent the issue.

The C2 engine implements a minimum FPS of 10. So dt never goes above 0.1 - the game goes in to slow-motion at that point.Ashley2013-09-05 13:00:42
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

Post » Thu Sep 05, 2013 6:01 pm

Not really a good idea. Legend of Grimrock players complained about their videocards overheating. Devs chased the bug for a long time, until a day when they found out the game wasn't frame limited and this caused not only overheating, but consuming a lot of power as well resulting in increased electricity bills...

The game was basically idling or not really GPU hungry, but during idle it commanded the videocard to render the same frames over and over.mercy2013-09-05 18:03:41
B
29
S
5
G
5
Posts: 139
Reputation: 5,830

Post » Thu Sep 05, 2013 7:31 pm

Interesting - so if I set a bullet at 2500 speed, it would need to be a minimum of 250 pixels wide in order to collide with an object 1 pixel wide at every fps?
B
40
S
12
G
1
Posts: 532
Reputation: 4,147

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 19 guests