I've written a gravity simulator, and it's been capped at 30 fps. I disabled t.window.vsync, which didn't help me, and then I read a forum page here on love.run, which gave some sample code which used love.run to run at 60 fps. I tried adding that in, and it fixed my problem for a little while, but the frame rate capped again, and now the sample code also runs at 30 fps. I hadn't modified the code in any way when that happened. Does anyone know what's happening? I'm running it on an MSI, if that helps any.
Here's my code:
Weird issue with framerate
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Weird issue with framerate
I'm getting ~1300 FPS. My guess is that your graphics card (or possibly the driver) doesn't honour the vsync bit, and that it's too slow to render every frame in 1/60s, hence it skips every other frame.
Re: Weird issue with framerate
Yep. Writing games is easy. Writing games that run at high framerate on your target hardware is hard.
*cough*ps4tetris*cough*
*cough*ps4tetris*cough*
Last edited by raidho36 on Sun Feb 11, 2018 12:03 am, edited 1 time in total.
-
- Party member
- Posts: 134
- Joined: Tue Mar 29, 2011 11:05 pm
Re: Weird issue with framerate
0 bodies: 6700 fps
50 bodies: 1200 fps
100 bodies: 380 fps
Running as is.
Maybe check your driver settings, sometimes they can enforce an FPS cap or force vysnc or something.
50 bodies: 1200 fps
100 bodies: 380 fps
Running as is.
Maybe check your driver settings, sometimes they can enforce an FPS cap or force vysnc or something.
-
- Prole
- Posts: 2
- Joined: Sat Feb 10, 2018 10:23 pm
Re: Weird issue with framerate
Yeah, I looked up info about my computer, and it looks like it's something to do with power saver mode. I'm getting 900 fps when it's plugged in, and 30 fps when it's on battery. Thank you all for verifying it's not my code.
Who is online
Users browsing this forum: Ahrefs [Bot] and 6 guests