Update_Frequency Bug for Windows (DEF-3262) (SOLVED)


#1

When a streamer with a monitor, which had a higher framerate than my monitor, played my Ludum Dare submission, I knew I’d screwed up somehow. Everything was incredibly fast and he died almost instantly. I apologized, realizing I’d forgotten to calculate for variable Dt. I’m lucky though, because I mostly rely on real-time alarms. There wasn’t much to fix.

When I looked into the options, I noticed that there shouldn’t have been anything wrong when he played it at 144Hz. I had Variable Dt disabled and Update Frequency set to 60. Mousing over Variable Dt says that it uses real-time steps instead of Update Frequency. The way I understand that is that, with it off, the Update Frequency is used by the engine for Update(), so the game should have defaulted to updating every 1/60 of a second.

Am I misunderstanding, or did this not work as intended?


#2

When “variable_dt” is NOT checked the engine rely on vsync updates, while at the same time assuming that the monitor refresh rate is 60Hz. Running on a monitor with for example 144Hz will result in 144 frames per second but still using a dt of 1/60 causing the game to step faster than intended. A temporary workaround would be to check ‘variable_dt’, but this needs to be fixed of course.

Created ticket DEF-3262 for this feature.


#3

@Johan_Beck-Noren let me know please about any progress on this Ticket?

P.S. as I understand this topic Weird Defold 144hz monitor bug also is related to this issue.


#4

No progress yet I’m afraid, the issue has not been worked on other than having some discussions within the team before summer about possible designs for solving the problem. My guess is that we need to solve this together with handling monitors with variable refresh rates (some smartphones have this as well).

I’ll take another round with the team and see if we can prioritise this issue in our backlog.


#5

Added this issue to my special “shortlist” to keep an extra eye on it during our planning sessions.


#6

@Johan_Beck-Noren @britzl let me know please, if there are any updates on fixing this bug?


#7

No, not yet. We may be able to pick it up in the next sprint.


#8

up :slight_smile: any news/progress?


#9

annoying bug. Any news?


#10

Working on a fix as we speak, will hopefully be included in one of next coming releases.


#11

We’ve bought some cool gamer hardware to help us test this. The Defold team is now proud(?) owners of a Razer gaming phone and a gaming monitor. Here’s proof:


#12

Released in 1.2.143


#13

Thanks a lot for fixing this issue! just checked, all works fine.