mirror of
https://github.com/bryanthaboi/gen1recomp
synced 2026-10-05 17:03:12 -04:00
ok the auto driver works but needs work
This commit is contained in:
@@ -12,8 +12,15 @@ function FixedStep:init(callback)
|
||||
self.callback = callback
|
||||
end
|
||||
|
||||
-- The anti-spiral clamp doubles as a steps-per-frame ceiling (0.25s = 15
|
||||
-- steps), which silently throttled the high fast-forward levels: at 100X
|
||||
-- a 60fps frame wants ~100 steps. Game:update raises this to fit the
|
||||
-- current speed target; a stall still cannot snowball past one frame's
|
||||
-- intended budget.
|
||||
FixedStep.maxAccum = MAX_ACCUM
|
||||
|
||||
function FixedStep:update(dt)
|
||||
self.accum = math.min(self.accum + dt, MAX_ACCUM)
|
||||
self.accum = math.min(self.accum + dt, self.maxAccum or MAX_ACCUM)
|
||||
while self.accum >= self.STEP do
|
||||
self.accum = self.accum - self.STEP
|
||||
self.callback(self.STEP)
|
||||
|
||||
Reference in New Issue
Block a user