How do I keep 60 fps

Get help using Construct 2

Post » Thu Feb 02, 2017 3:04 am

Hi,
I made a small game for fun, but each 3-4 second, I get 30fps. 3-4 second after, I get 60fps back :evil:
B
4
Posts: 6
Reputation: 212

Post » Thu Feb 02, 2017 3:18 am

How do you expect anyone to help you with this much information?
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Thu Feb 02, 2017 3:27 am

You could try "On start of layout" -> "Set minimum framerate to 60." That will make the game slow down instead of dropping frames. The problem is probably with optimization, though. If you want to keep your framerate high, you need to run your game as efficiently as possible.
Also, certain framerate issues are a peculiarity of C2 (it's still a great engine, though). You might find this section of the manual useful: https://www.scirra.com/manual/134/performance-tips
Eh, Steve!
B
113
S
54
G
13
Posts: 112
Reputation: 16,090

Post » Thu Feb 02, 2017 3:44 am

Message: Rexyu can only post plain text URLS until they have 500 rep. 3 URLS modified. Why?
I'm sorry spacedoubt, I'm new on the forum

I've 9 sprites
the goal is to catch foods
my layer is 1280x720
I've no "Every tick" event
for the hit-box, I've put 4 geometry on all my sprite
I've put every thing in 1 layer

game file: http://www.mediafire.com/file/x5xiq7mib ... atGuy.capx or http://bit.ly/2kV51tq
I've follow: how-do-i-make-my-game-stop-lagging_t115753 and calebbennetts link

mayby it´s my computer but I can run recent game in medium or high
B
4
Posts: 6
Reputation: 212

Post » Thu Feb 02, 2017 3:49 am

@Rexyu I didn't mean to come off like such a jerk. haha. I think I'm still upset about the C3 debacle.. sorry about that.. let me try again:

Welcome to the forum!
The link just goes to a page that says "invalid or deleted file". Did you delete the file?
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Thu Feb 02, 2017 3:52 am

Message: Rexyu can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
use the bitly, I don' have 500 rep to put link
http://bit.ly/2kV51tq
B
4
Posts: 6
Reputation: 212

Post » Thu Feb 02, 2017 4:24 am

It pretty much runs at 60fps the whole time for me. I did see one strange 'jank' and the fps dropped to 50, but only for about a second. I don't see anything in your code that should be a problem.

Try this: run it in debug, click the 'profile' tab. wait for the fps drop to happen. when it does, see what's using the most %. if it's draw calls, you'll know it's not your code's fault.
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Thu Feb 02, 2017 4:36 am

yea it's draw calls
Thank you for your help


Is there a way to put this post "answered"?
B
4
Posts: 6
Reputation: 212

Post » Thu Feb 02, 2017 4:49 am

I should clarify.. just cause it's draw calls doesn't always mean it's not your code's fault.. if your code is causing too many draw calls, obviously.. but in your case, I'm pretty sure it's not your code.. it might be a graphics driver thing.

Sometimes people add something like [SOLVED] to the post title, but most people just don't.. plus, it's not bad to leave it open.. maybe somebody who can provide some more help will come along..
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Thu Feb 02, 2017 5:10 am

ok thank you
B
4
Posts: 6
Reputation: 212

Next

Return to How do I....?

Who is online

Users browsing this forum: mikehive, NN81, plinkie and 9 guests