Real FPS lower on my PC than on other weaker ones

pYo

Member
Hey everyone,

I've been watching my Real FPS while working on a prototype in its very early stages (2D platformer in one room), and my Real FPS is around 600fps average, and I've seen weaker PCs run it in the thousands, so what could be the cause here? Any advice regarding methods of optimization would be welcome as well.

I haven't implemented enemies or anything of the sort, literally just the main character jumping around the screen, so I don't think I'm doing anything taxing on the machine yet.

I'm using a GTX1080Ti and an i7 6700k processor and 16GB Ram

Thanks for your time.
 

TsukaYuriko

☄️
Forum Staff
Moderator
Define "weaker" PCs.


That aside, consult the profiler in debug mode. That's your go-to tool for finding out what the goddamn thing that lags your game is.
 

pYo

Member
Actually, I think you've done something horribly wrong if your machine is struggling

Without code though, best I can say is, wow you have some jank making your game tank
Found it!

I don't know how or why, but when I turn on the Xbox Controller to use it, the framerate tanks. Without it in an empty room without code, its at around 11,000fps, but once I turn it on, its literally at 600fps or so, and again, there is no character and nothing but walls, so there is zero lines of code in the room running. Any idea how the controller drags it down by this insane margin?

@TsukaYuriko
I mean PCs with decent, yet not OP GPUs, like for example a GTX 970 hitting the 3k mark + with less difficulty.
 

Evanski

Raccoon Lord
Forum Staff
Moderator
Any idea how the controller drags it down by this insane margin?
use the debugger, (F6)
debugger.png

Open others
hit profile
sort by step %
Pause the game a bit after its ran

And that should tell you whats taking most of the step event
and what is the most resource intensive code
 

TsukaYuriko

☄️
Forum Staff
Moderator
Ah yes, the typical "external thing makes GM game lag" thing. Happens with some controllers, Corsair keyboards, Chrome and probably a bunch of other things. I'm afraid you've already found the best solution you can employ for now: Don't connect the controller. This doesn't have anything to do with your code.

That aside, please file a bug report if one doesn't exist already to inform the developers about this so they can potentially do something about it:
 

pYo

Member
use the debugger, (F6)

Open others
hit profile
sort by step %
Pause the game a bit after its ran

And that should tell you whats taking most of the step event
and what is the most resource intensive code

No Controller Engine Code GM Window Selected.png
Here's one where I selected the GameMaker Studio window (top is colored red), and you can see the frame rate is at around 10,000fps

No Controller My Code Game Window Selected.png
And here is one where I choose the game window itself, and the fps is at 640, dropping significantly.

In both these scenarios, the controller is turned on, and if you check my profiler like you told me, you'll see I literally have no code of my own in the room, only the engine code.
 

pYo

Member
Ah yes, the typical "external thing makes GM game lag" thing. Happens with some controllers, Corsair keyboards, Chrome and probably a bunch of other things. I'm afraid you've already found the best solution you can employ for now: Don't connect the controller. This doesn't have anything to do with your code.

That aside, please file a bug report if one doesn't exist already to inform the developers about this so they can potentially do something about it:
No kidding! That's a thing!

Well, err, any advice then, Yuriko?! Other than avoiding the controller, are there controllers that we know that don't tank the framerate? I'm using the Series X controller, but I'll gladly drop anything else if that saves me the frame rate drop.

I'm also using a keyboard specialized for people with wrist issues (I have carpal tunnel syndrome), so that could also be an issue? I might have to turn this thing on the laptop and see what happens there.
And I'll be sure to contact YoYo, as this is an issue that needs solving, especially if people use the controller while playing the game.

Cheers, Yuriko! Thanks for letting me know it wasn't my code that was the issue, was getting a bit disheartened for a moment.
 
Top