• 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!

GameMaker GPU Overloading Problem

D

Dwighty4000

Guest
I have an adjustable function in my game, which can be used to increase or decrease the "room_speed".
This is to allow players to adjust their FPS rate, which works well if you have a fast computer.
But if someone now has a weak graphics card and is worth a room_speed because the graphics card cannot keep up, then the game will start to run as slowly as this YouTuber here who apparently has a slow graphics card and played my game ...
Does anyone have an idea what you could do so that the FPS behaves so that the graphics card does not try to work well over 100% and simply reduces the FPS to be reproduced in the game if the graphics card does not keep up?
Because if you try to control the FPS with room_speed, the game apparently forces the graphics card to simply continue over 100%, which is not possible and why the game then becomes even slower than if you set an FPS of "room_speed = 10; that itself could deliver an Intel HD ...
Does anyone have any idea what this could be and how to make the game only generate as much FPS as it can generate with its graphics card, because otherwise the whole events in the GML programming will be extremely delayed as you can in the video can see with the much too long dialogues and the slow running animations:


These slow movements and almost infinite dialogues and waiting times only occur if you have a room_speed because the graphics card cannot do justice, e.g. if you have a room_speed value of 60 but the graphics card can only generate a maximum of 40FPS without reaching 100% load in the task manager.
 
Look into delta timing. This way, you can increase the game's pace without needing to increase the number of frames being rendered. It isn't a drag and drop solution, so expect to be reworking your entire engine to accommodate it.
 
D

Dwighty4000

Guest
Look into delta timing. This way, you can increase the game's pace without needing to increase the number of frames being rendered. It isn't a drag and drop solution, so expect to be reworking your entire engine to accommodate it.
This is my selfmade calculation to run the speed in sync with the room_speed (FPS Rate)

Code:
// 340 is the number of pixels my player should overcome per second (This code is inside of a step event for a special direction for the player "Move up...")
ppb = 340 / room_speed;
y = y - ppb;
But the problem is that if the player enters a too high FPS rate (room_speed) in your settings, then the game starts to lag because the GPU is busy reaching more than 100% load, which is not possible and why the speed of the animations, the alarm events and even the real FPS are involved.
The game should not force itself to execute the 60 FPS if it should be set, but the game should try as best as possible but leave some perforamcne for programming so that the events do not have to wait too long!
My synchronization of room_speed to movement and animation speed in the game is not the problem because it stays in sync due to the calculation I mentioned, but how can I make sure that the game can set an FPS without forcing its FPS value but only to use it as a limitation.
 
Last edited by a moderator:

sp202

Member
You shouldn't be using room_speed for your calculations as it's only the target frame rate. You need to use the actual time that has passed between frames, given by delta_time.
 
Well, room speed isn't really what you should be adjusting for this sort of deal. My suggestion would be to not draw every frame to reduce load when the frame rate can't keep up, but at that point, you might as well just reduce the room speed instead because it'd achieve the same effect. It really sounds like delta timing is what you need. Everything else would just be a lackluster workaround.
 
Top