Pan between ticks, and move animations at their own rate
CI / build (push) Successful in 27s

The point the camera looks at is its position plus an offset (setCameraFocus,
at each tick), so between ticks it now moves with the eased position: panning
moves the target the position eases to, and was still at 30 per second.

Between ticks, an animation is moved on at the rate it moved at the last step
(per tick: the client steps several ticks at once when it falls behind), not
only when it moved exactly a frame: animations played at other speeds were
posed at the tick, between smooth ones.

The engine's stats also log the longest time between frames.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-10-28 21:56:09 -07:00
1 parent d1437a3923
commit 4670a6a191
3 files changed
+49 -20

No files matched your search

+2
View File
@@ -91,6 +91,8 @@ private:
Stats stats_;
LARGE_INTEGER statsStart_{}; // when the stats' 300 frames started
LARGE_INTEGER frameStart_{}; // when the current frame began
std::int64_t lastWindowFrame_ = 0; // when the last window frame began
double longestGap_ = 0; // the stats' longest time between window frames' beginnings, in seconds
double frameSeconds_ = 0; // the stats' window frames' time, beginRendering to endRendering
bool windowFrame_ = false; // the current frame is drawn into the window
bool innerFrame_ = false; // the current frame is begun in the client's renderer