Add controllable lab walking checkpoint with collision and chase camera

This commit is contained in:
UnixNight committed 2026-10-23 23:29:40 -04:00
1 parent 37fa18094f
commit 58424120bb
26 files changed
+1848 -110

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
namespace GamePort.Game;
/// <summary>Explicit port policy: 60 simulation calls/second, independent of presentation.</summary>
public sealed class FixedStepClock
{
public const float Step = 1f / 60;
private double accumulated;
public int Advance(double elapsed)
{
if (!double.IsFinite(elapsed) || elapsed < 0) throw new ArgumentOutOfRangeException(nameof(elapsed));
accumulated += Math.Min(elapsed, 0.25);
var steps = (int)Math.Floor((accumulated + 1e-10) * 60);
accumulated -= steps / 60.0;
return steps;
}
public void Reset() => accumulated = 0;
}