Could low FPS lead to logic errors?

Discussion and feedback on Construct 2

Post » Tue Apr 12, 2016 4:24 pm

I think I (somewhat) understand delta time and how to use it for frame-rate Independence.

However, is there a solution for logic that's not dealing with dt? Am I completely wrong, or can a low FPS result in functions not being called and loops not being run?

People were beta testing a demo of mine and (due to recording video while doing it) were getting 40-50 FPS and some weird errors. When they stopped recording and just played the game things worked fine. I wish it was just weird movement problems, but it was also values not being set and things like that.
B
9
S
1
Posts: 23
Reputation: 533

Post » Wed Apr 13, 2016 12:23 pm

@icugigasoft - It's not really something that we can say we are sure of since we can't see the events in your .capx but if you are asking if bad logic behind any event causes
fps drop then I agree that it might. Unnecessary or Non-Optimized events can cause serious problems in a game. For Example, using the condition "Is Overlapping" instead of "On Collision of another object" can cause major problems when combined with a loop or called many times in a tick or second. Misuse of Loops is something that shouldn't be taken lightly since it will loop infinitely if a problem triggers. Massive or Misuse use of the Pathfinding Behavior can also utilize a big portion of the cpu. Misuse or Massive use of the Physics behavior can destroy a game. For example, using the Physics behavior and Platform Behavior altogether will make a lot of glitches, very high fps drop and might even crash the game or never let the game be opened without closing as soon as it finished loading.


For more info, read these:

https://www.scirra.com/manual/134/performance-tips

https://www.scirra.com/blog/141/common- ... nd-gotchas

https://www.scirra.com/blog/83/optimisa ... -your-time
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Post » Wed Apr 13, 2016 11:11 pm

Message: icugigasoft can only post plain text URLS until they have 500 rep. 3 URLS modified. Why?
chadorireborn wrote:@icugigasoft - It's not really something that we can say we are sure of since we can't see the events in your .capx but if you are asking if bad logic behind any event causes
fps drop then I agree that it might. Unnecessary or Non-Optimized events can cause serious problems in a game. For Example, using the condition "Is Overlapping" instead of "On Collision of another object" can cause major problems when combined with a loop or called many times in a tick or second. Misuse of Loops is something that shouldn't be taken lightly since it will loop infinitely if a problem triggers. Massive or Misuse use of the Pathfinding Behavior can also utilize a big portion of the cpu. Misuse or Massive use of the Physics behavior can destroy a game. For example, using the Physics behavior and Platform Behavior altogether will make a lot of glitches, very high fps drop and might even crash the game or never let the game be opened without closing as soon as it finished loading.


For more info, read these:

https://www.scirra.com/manual/134/performance-tips

https://www.scirra.com/blog/141/common- ... nd-gotchas

https://www.scirra.com/blog/83/optimisa ... -your-time


Thanks for the response! I'm gonna check out those links. My question was a bit vague, so I didn't think my capx would be needed.

Essentially, from my testing it seems that setting the minimum FPS to 60 is the best way to guarantee that lower FPSes don't result in logic errors. Has anyone else come to that conclusion or am I just way off base?

EDIT: To be clear, I'm not talking about collision detection. More like... a loop not running at all?
B
9
S
1
Posts: 23
Reputation: 533

Post » Thu Apr 14, 2016 6:02 am

ofcourse bad logic can lead to bad performance. maybe not as much in events as much in the underlying engine, but you can do it with logic too.

the hardest part is determining what slows down your game, but that's why we have debugger :)
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,455

Post » Thu Apr 14, 2016 8:26 am

icugigasoft wrote:EDIT: To be clear, I'm not talking about collision detection. More like... a loop not running at all?

It depends what are the conditions for running that loop. But for ex. if you have a button and you set your logic up like "On clicked" then "run loop". It will run even at 1 FPS.
B
136
S
33
G
17
Posts: 1,560
Reputation: 20,775

Post » Thu Apr 14, 2016 1:02 pm

[quote=icugigasoft]Essentially, from my testing it seems that setting the minimum FPS to 60 is the best way to guarantee that lower FPSes don't result in logic errors. Has anyone else come to that conclusion or am I just way off base?[/quote]

I believe setting your minimum FPS to 60 will not really reveal all logic errors. My only advice is to take it slow, don't make events like you are in a deadline, give time to test and debug if you have a new game feature and also analyze/think if there is a better event code for your present event to achieve more optimized logic of your game. Your game performance outcome is actually based on your patience. If you are really curious then I suggest you learn how to code, but if you already know then it won't be a problem.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests