GameMaker Weird Gamespeed Glitch

Anixias

Member
Hi, I bought a new 144hz monitor today and tested to see if my game could run at 144fps correctly. While it does run exactly as intended, I noticed a mildly annoying glitch.

In fullscreen, it runs at 144fps. If I toggle into windowed mode, it runs at 60fps. If drag the window, it will reset to 144fps (still windowed). Going back to fullscreen keeps it at 144fps.

So basically, my issue is that when going into windowed mode, the game locks at 60fps until I move the window, in which case it resets to the correct speed.

In the Main game settings, it is set to 144fps. I never change this using game_speed_set, so it is not due to my code. What is happening? How can I fix this?

I tried:
-display_reset on window resize
-setting game_speed to 144fps every step
-setting game_speed to 144fps on window resize
-disabling vsync
 
E

Edwin

Guest
Try to set vsync on with double / triple buffering in your video driver settings.
 

The-any-Key

Member
This is a know bug. Hopefully yoyo will fix this soon.

Have filling a list of "fixes"
1# Use delta time for everything
2# Make sure game_speed/room_speed is around 60 or 120. So no 9999 stuff!
3# Enable/Disable v-sync
4# Try set (in first room) display_set_windows_alternate_sync(true)
5# Try set (in first room) display_set_sleep_margin(40), display_set_sleep_margin(20) and display_set_sleep_margin(10)
6# Try set (in first room) display_set_timing_method(tm_sleep) or display_set_timing_method(tm_countvsyncs)
7# If you are using Windows 10, try turning off full screen optimization.
Site explains how: https://winaero.com/blog/disable-fullscreen-optimizations-windows-10/
8# Make sure you are not using integrated graphics card.
Site explains how: https://gaming.stackexchange.com/qu...idia-gpu-instead-of-the-integrated-intel-card
9# If you're using G-sync this can mess up frame-rate, please ensure you're not.
10# If you're using a 144hz (or anything greater than 59hz) monitor lowering refresh rate settings to 144hz monitor and/or forcing v-sync to solve the issue.
11# Control-panel>energy>High performance (Windows updates sometimes set this to balanced)
12# Auto alt-tab (minimize and maximize) game with https://yellowafterlife.itch.io/gamemaker-window-commands
// When call window_set_fullscreen(true)
window_command_run(window_command_minimize);
alarm[1] = 2;
// In alarm[1]
window_command_run(window_command_maximize);
 
Last edited:
Top