Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-Game: [Windows] delta_time has big fluctuation with the recent Windows 11 update #9376

Open
shichen85 opened this issue Feb 12, 2025 — with GM Bug Reporter · 7 comments
Assignees
Labels
project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes

Comments

@shichen85
Copy link

shichen85 commented Feb 12, 2025

Description

We are observing that the delta_time is returning very different numbers for Windows VM after updating to Windows OS Build 26100.2894. Before the update, delta_time returns consistently around 16745 ms for a 60 FPS game. After this update, it returns 31942 for one frame and 1182 the next, almost skipping a frame. This does not happen to Windows YYC, or when the game is first switched to full screen mode. However, even in full screen mode, tabbing out and back in the game will again cause the fluctuation.

Steps To Reproduce

  1. On a Windows 11 device, ensure the system is updated to the following or higher:
Version	24H2
OS build	26100.2894
Experience	Windows Feature Experience Pack 1000.26100.36.0
  1. Run the sample for Windows VM, see that the the return of delta_time fluctuates between about 31942 ms and 1182 ms.
  2. Press the Space key to put the game into full screen mode
  3. Use alt-F4 to close the game, and see the output of delta_time being consistent around 16745 ms.
  4. Run the game in Windows YYC, see the output is also consistent

Which version of GameMaker are you reporting this issue for?

IDE v2024.11.0.179 Runtime v2024.11.0.227

Which operating system(s) are you seeing the problem on?

Windows 10.0.26100.0

Which platform(s) are you seeing the problem on?

Windows

c64392f2-377e-4548-9b95-fcb28b8e2d7a

@gm-bug-reporter gm-bug-reporter bot added runner-bug In-game bugs with the "GameMaker Studio 2" runtimes project This issue has a sample project attached labels Feb 12, 2025
@stuckie stuckie moved this from Triage to Backlog in Team Workload Feb 13, 2025
@shichen85
Copy link
Author

Levelhead.zip

I have discovered something very odd. When renaming the YYP project to Levelhead, therefore the Windows YYC executable would be named Levelhead.exe, this makes the Windows YYC to also have the big fluctuations with delta_time. The attached sample is the same project but renamed to Levelhead. When running the game in Windows YYC, you can see that output is no longer consistent and has big fluctuations.

@WhiteWolfKevin
Copy link

I just made a post on the forum about similar behavior that I'm seeing. I found that when using delta_time in my project, I can go up to 130 FPS without any issues, but at 131+ FPS, I start to see delta_time inconsistencies:

delta_time:7691  FPS: 130
delta_time:7693  FPS: 130
delta_time:7692  FPS: 130
delta_time:7692  FPS: 130
delta_time:7697  FPS: 130
delta_time:7689  FPS: 130
delta_time:13535  FPS: 131
delta_time: 263  FPS: 131
delta_time:13633  FPS: 131
delta_time: 275  FPS: 131
delta_time:13618  FPS: 131
delta_time: 275  FPS: 131

Below is some info about my system in case it helps. Please let me know if there's anything else I can provide.

Edition	Windows 11 Pro
Version	24H2
Installed on	‎1/‎18/‎2025
OS build	26100.3194
Experience	Windows Feature Experience Pack 1000.26100.48.0
GameMaker About
IDE Version: 2024.11.0.179
Current Runtime: 2024.11.0.226
D3D11 : AMD Radeon RX 7900 XT

@shichen85
Copy link
Author

I just made a post on the forum about similar behavior that I'm seeing. I found that when using delta_time in my project, I can go up to 130 FPS without any issues, but at 131+ FPS, I start to see delta_time inconsistencies:

delta_time:7691  FPS: 130
delta_time:7693  FPS: 130
delta_time:7692  FPS: 130
delta_time:7692  FPS: 130
delta_time:7697  FPS: 130
delta_time:7689  FPS: 130
delta_time:13535  FPS: 131
delta_time: 263  FPS: 131
delta_time:13633  FPS: 131
delta_time: 275  FPS: 131
delta_time:13618  FPS: 131
delta_time: 275  FPS: 131

Below is some info about my system in case it helps. Please let me know if there's anything else I can provide.

Edition	Windows 11 Pro
Version	24H2
Installed on	‎1/‎18/‎2025
OS build	26100.3194
Experience	Windows Feature Experience Pack 1000.26100.48.0
GameMaker About
IDE Version: 2024.11.0.179
Current Runtime: 2024.11.0.226
D3D11 : AMD Radeon RX 7900 XT

Does this happen when you run the project with YYC instead of VM?

@WhiteWolfKevin
Copy link

I believe I set things up properly to test with YYC.

The results I got were interesting. 130 FPS delta_times were consistent like before:

# With YYC
delta_time:7693  FPS: 130
delta_time:7693  FPS: 130
delta_time:7693  FPS: 130
delta_time:7691  FPS: 130
delta_time:7693  FPS: 130

However, 131 FPS delta_times appear to be improved, but with an occasional spike that I wasn't seeing in <131FPS. The game feels fine though and I don't notice any issues.

# With YYC
delta_time:6938  FPS: 131
delta_time:7264  FPS: 131
delta_time:7141  FPS: 131
delta_time:13518  FPS: 131
delta_time:6919  FPS: 131
delta_time:6902  FPS: 131
delta_time:6892  FPS: 131
delta_time:6938  FPS: 131
delta_time:7004  FPS: 131
delta_time:6974  FPS: 131
delta_time:6869  FPS: 131
delta_time:6943  FPS: 131
delta_time:6944  FPS: 131
delta_time:14085  FPS: 131
delta_time:6722  FPS: 131
delta_time:7257  FPS: 131
delta_time:6957  FPS: 131

Next I tried 144 FPS and that resulted in odd behavior. While the delta_time values look consistent, the game does not play correctly. The movements of my player object are inconsistent. It seems to alternate between normal movement for 5-10 seconds and then my player object will act like it's moving through jello for 2-3 seconds before recovering. It seems like that behavior starts around 139 FPS and isn't noticeable below that.

# With YYC
delta_time:7035  FPS: 144
delta_time:6997  FPS: 144
delta_time:6785  FPS: 144
delta_time:7223  FPS: 144
delta_time:7144  FPS: 144
delta_time:6534  FPS: 144
delta_time:6928  FPS: 144
delta_time:6908  FPS: 144
delta_time:6947  FPS: 144
delta_time:6952  FPS: 144
delta_time:6948  FPS: 144
delta_time:7009  FPS: 144
delta_time:6881  FPS: 144
delta_time:7153  FPS: 144
delta_time:6793  FPS: 144
delta_time:7293  FPS: 144
delta_time:6571  FPS: 144
delta_time:7410  FPS: 144

Jumping to 240 FPS results in the same incorrect movement behavior I was seeing when I ran with VM (slow/sluggish). Something to note is that running at 240 FPS with both VM and YYC seems to give consistent delta_time:

# With YYC
delta_time:4167  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4167  FPS: 240
delta_time:4167  FPS: 240
delta_time:4167  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4167  FPS: 240

Please let me know if there's anything else I can provide to help with this issue.

@shichen85
Copy link
Author

I believe I set things up properly to test with YYC.

The results I got were interesting. 130 FPS delta_times were consistent like before:

# With YYC
delta_time:7693  FPS: 130
delta_time:7693  FPS: 130
delta_time:7693  FPS: 130
delta_time:7691  FPS: 130
delta_time:7693  FPS: 130

However, 131 FPS delta_times appear to be improved, but with an occasional spike that I wasn't seeing in <131FPS. The game feels fine though and I don't notice any issues.

# With YYC
delta_time:6938  FPS: 131
delta_time:7264  FPS: 131
delta_time:7141  FPS: 131
delta_time:13518  FPS: 131
delta_time:6919  FPS: 131
delta_time:6902  FPS: 131
delta_time:6892  FPS: 131
delta_time:6938  FPS: 131
delta_time:7004  FPS: 131
delta_time:6974  FPS: 131
delta_time:6869  FPS: 131
delta_time:6943  FPS: 131
delta_time:6944  FPS: 131
delta_time:14085  FPS: 131
delta_time:6722  FPS: 131
delta_time:7257  FPS: 131
delta_time:6957  FPS: 131

Next I tried 144 FPS and that resulted in odd behavior. While the delta_time values look consistent, the game does not play correctly. The movements of my player object are inconsistent. It seems to alternate between normal movement for 5-10 seconds and then my player object will act like it's moving through jello for 2-3 seconds before recovering. It seems like that behavior starts around 139 FPS and isn't noticeable below that.

# With YYC
delta_time:7035  FPS: 144
delta_time:6997  FPS: 144
delta_time:6785  FPS: 144
delta_time:7223  FPS: 144
delta_time:7144  FPS: 144
delta_time:6534  FPS: 144
delta_time:6928  FPS: 144
delta_time:6908  FPS: 144
delta_time:6947  FPS: 144
delta_time:6952  FPS: 144
delta_time:6948  FPS: 144
delta_time:7009  FPS: 144
delta_time:6881  FPS: 144
delta_time:7153  FPS: 144
delta_time:6793  FPS: 144
delta_time:7293  FPS: 144
delta_time:6571  FPS: 144
delta_time:7410  FPS: 144

Jumping to 240 FPS results in the same incorrect movement behavior I was seeing when I ran with VM (slow/sluggish). Something to note is that running at 240 FPS with both VM and YYC seems to give consistent delta_time:

# With YYC
delta_time:4167  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4167  FPS: 240
delta_time:4167  FPS: 240
delta_time:4167  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4166  FPS: 240
delta_time:4167  FPS: 240

Please let me know if there's anything else I can provide to help with this issue.

Thanks for the additional context. It seems that YYC removed the inconsistency of delta_time except for the 131 FPS issue. This is what I experienced too when I run my project with YYC. I believe the difference between running the project from the IDE with YYC versus VM is that the executable is named after the project for YYC, but is the generic runtimes\runtime-2024.1300.0.768\windows\x64\Runner.exe for VM, which the Windows 11 (OS build 26100) somehow does not like.

Our observation is that if you create the Windows executable from the project and rename the executable to Runner.exe, the delta_time inconsistency would appear. Interestingly, renaming the executable to Levelhead.exe also produces this effect for us. So if you want to try it, you modify your project to print the delta_time result to display with something like draw_text(), and then you can create a Windows executable and rename the *.exe file to Runner.exe. This should cause the same inconsistency to show.

@WhiteWolfKevin
Copy link

I'm seeing the same results:
With the executable named Space_Test.exe, the delta_time fluctuation is gone.
With the executable named Runner.exe, the delta_time fluctuation returns.

@shichen85
Copy link
Author

shichen85 commented Mar 6, 2025

I'm seeing the same results: With the executable named Space_Test.exe, the delta_time fluctuation is gone. With the executable named Runner.exe, the delta_time fluctuation returns.

Welp, this is extremely weird but also easy to work around. As far as we know, renaming the project executable to avoid names like "Runner.exe" and "Levelhead.exe" ensures that the export would not have this issue. However, this is still annoying when running the project from the IDE in VM, as there is no way to avoid calling the Runner.exe. Hopefully @jackerley and the folks at GameMaker will find a solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes
Projects
Status: Backlog
Development

No branches or pull requests

3 participants