• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Game runs fine on PC but drops frames often on laptop

Artie_Kyle

Member
Hey everyone,

Making my first commercial game for the PC and Xbox, and I've been having constant slowdowns while testing on the laptop, which is annoying simply due to the fact that the GPU is a GTX 1060, and yet the OG Xbox One performs more consistently when porting the game over. On desktop PCs, the game works fine and almost never drops below the 60fps threshold, so I'm scratching my head looking for answers.

I read somewhere that this could be due to the laptop's battery mode, but I'm always plugged into a wall, so I'm not sure if that's the issue at hand.

Would be grateful for the help.
Cheers!
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
It may be related to the sleep margin setting... Try different values for that (there is a function for it, which escapes me right now), and see if that helps. Basically, if the laptop thinks the app isn't using enough CPU cycles it'll dedicate less time/power to it and this can cause fps issues.
 

TsukaYuriko

☄️
Forum Staff
Moderator
If it "almost never drops below the 60fps threshold" on a PC, that means it sometimes does... so I take it that this game is somewhat demanding on the hardware?

If so, powerful hardware alone doesn't provide good performance. You also need a sufficient cooling solution to keep that hardware performing at maximum capacity, because overheating hardware will downgrade its performance until it is no longer overheating. Check if the laptop is overheating while the game is running, as overheating is a surefire way to kill performance.
 

Artie_Kyle

Member
@Nocturne

I've read about the sleep margin, and I believe I changed it to little effect, but really what would be the best number for it? I've been from 1 to 15, is higher better or lower in these situations?
Thanks Nocturne!

@TsukaYuriko

I was trying to be modest and not full of myself, so let me correct that and say that it doesn't really drop below 60fps at all on PC. I don't put my PC in high esteem for these measurements because it's an overpowered machine with a GTX1080 Ti and has a high-end cooler, so it can force its way through most anything. Not the best system for measuring performance really.

I'll look into the heating issue, but I think my laptop heats up quickly on average. It's a surface book and they are almost warm by default. Againi, the OG Xbox One doesn't face that much stress, and it is by far the weakest of the three systems I'm using to test the game.

Thanks Tsuka!
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
I've read about the sleep margin, and I believe I changed it to little effect, but really what would be the best number for it? I've been from 1 to 15, is higher better or lower in these situations?
For situations similar to those you describe, lower is usually better... but if you've tested and it's not having any effect then the solution may be elsewhere...
 

O.Stogden

Member
Have you debugged to check that it is the GPU that's the problem, and not the CPU? The GTX 1060 might be a decent GPU, but the single-core performance of the i7-8650U isn't the best, and it might not equal the XBO's CPU in power.

For reference, the i7-8650U is less powerful than an i5-4670 in straight single-core performance, and that's without the i7 suffering from thermal throttling.

Make sure your Surface Book has the latest firmware as well, apparently in 2019, it suffered from severe thermal throttling, which was fixed in a Firmware upgrade in October 2019.
 

Artie_Kyle

Member
Also make sure your laptop is using its dGPU. I’ve found that GM sometimes only gets the iGPU which is obviously worse.
I've tried that quite a bit actually, and I changed it to the dedicated GPU, but I have suspicions that its still not using the 1060. I say this because some games even slowdown and suffer input lag like Hollow Knight, which I run at 720p and still not the best performance. But again, the system says they're all running on the dGPU.
 
Last edited:

Artie_Kyle

Member
Have you debugged to check that it is the GPU that's the problem, and not the CPU? The GTX 1060 might be a decent GPU, but the single-core performance of the i7-8650U isn't the best, and it might not equal the XBO's CPU in power.

For reference, the i7-8650U is less powerful than an i5-4670 in straight single-core performance, and that's without the i7 suffering from thermal throttling.

Make sure your Surface Book has the latest firmware as well, apparently in 2019, it suffered from severe thermal throttling, which was fixed in a Firmware upgrade in October 2019.
That's really good advice, Stogden. Windows Update says I'm up to date, is that the same thing or do I have to go and update the firmware manually from the windows site? Also, I wasn't aware that the CPU core was at around 1.90ghz, thought it was more actually.

As for debugging the CPU performance, how exactly do I do that? Apart from seeing the performance in task manager, I'm not an expert at debugging from within GameMaker itself.
In the Task Manager, CPU is at 12%, Memory is mid 60% (in no small part due to opened websites in the background), and GPU is 40%

I know this probably doesn't mean much from what I've read, but the real fps for the CPU on the Xbox is usually in the 200-300 fps region, where as the laptop I have anywhere from high 400s to at least 850 fps depending on the level, yet the stuttering and the slowdown are definitely all happening on the Surface Book, When I tested the game on the desktop nothing of the sort happened, it was just a breeze.

Thanks, man! Hopefully we'll figure this thing out. And congrats on releasing your game!
 

Ricardo

Member
I've found this to be very common in laptops with dedicated nVIDIA GPU, as most GM games doesn't seem to activate the discrete graphic card when the "Preferred graphics processor" option is set as "Auto-select".
Take a look at this guide and make sure your game isn't using the integrated graphics.
 

O.Stogden

Member
That's really good advice, Stogden. Windows Update says I'm up to date, is that the same thing or do I have to go and update the firmware manually from the windows site? Also, I wasn't aware that the CPU core was at around 1.90ghz, thought it was more actually.

As for debugging the CPU performance, how exactly do I do that? Apart from seeing the performance in task manager, I'm not an expert at debugging from within GameMaker itself.
In the Task Manager, CPU is at 12%, Memory is mid 60% (in no small part due to opened websites in the background), and GPU is 40%
Are you able to right click on the CPU graph in task manager and click "change to Logical Processors" instead of "Overall Utilization"? This lets you see all 8 threads of your i7 separately, not just all of them combined into 1 graph. 12% is 100 divided by 8. Your i7 has 8 threads, so potentially 1 of your threads is maxed out and is causing issues.

Surface Book 2 firmware appears to be available here, if that is your model:



Thanks, man! Hopefully we'll figure this thing out. And congrats on releasing your game!
Thank you!
 
Top