[DiscordArchive] what is the reason for making Update return timePassed?
[DiscordArchive] what is the reason for making Update return timePassed?
Archived author: Takenbacon • Posted: 2024-06-11T18:01:16.783000+00:00
Original source
sure, that can be done. the old timer classes don't have too many use cases really anyways it looks like.
Archived author: Takenbacon • Posted: 2024-06-11T18:01:31.763000+00:00
Original source
a bunch of code that _should_ be timers aren't lol
Archived author: Northstrider • Posted: 2024-06-11T18:02:12.977000+00:00
Original source
the time tracker class is having a fundamental issue that it does not handle large diff times well. if you have a lag spike which would equal two timer cycles, you would lose one
Archived author: Takenbacon • Posted: 2024-06-11T18:02:22.402000+00:00
Original source
I was actually using this as a pre-requisite change that effectively redoes the world update timers but I can do that first with the old IntervalTimer without redoing a bunch of crap
Archived author: Northstrider • Posted: 2024-06-11T18:03:17.342000+00:00
Original source
which is for example why I resorted to a simple variable timer for heartbeats. so it can catch up on potentially lost ticks
Archived author: Tea • Posted: 2024-06-11T18:06:00.674000+00:00
Original source
actually i changed my mind about that
Archived author: Tea • Posted: 2024-06-11T18:06:14.913000+00:00
Original source
if you have a large lag spike (longer than two cycles)
Archived author: Tea • Posted: 2024-06-11T18:06:25.572000+00:00
Original source
you would want to spread the load over multiple update ticks anyway
Archived author: Northstrider • Posted: 2024-06-11T18:07:09.817000+00:00
Original source
so we need to track the deltatime and increment the remaining time instead of hard-reseting it
Archived author: Tea • Posted: 2024-06-11T18:07:12.576000+00:00
Original source
which means that as long as the timer preserves that data (instead of truncating to 0) then its fine if stuff happens on two update ticks one after another