So I created a complete game that serves as a Unity showcase and test that implements the hysteresis loop exactly like presented. Strangler is possibly the first game that implements truly
stable fixed timestepping. If you are interested, check out this page again for more info:
https://discussions.unity.com/t/stable-fixedupdate-scheduler-with-motion-interpolation/940117/8But here is the TL;DR:
Since this hysteresis solution is implemented on top of Unity’s frame pacing mechanism, it can become counterproductive when Unity’s frame pacing itself becomes unstable. So, when you experience stutter either way, switching to Unity’s fixed timestepping is the recommended choice. However, if you use a game-manager architecture that calls everything from Update(), the hysteresis loop can be implemented more stably on there since it bypasses Unity’s timing logic entirely.
So for my game Strangler, that implements the hysteresis loop exactly like presented, I included the hysteresis loop as an optional setting—enabled by default. This might be the first game (and hopefully the last) to offer such an option, but I wanted to implement at least one complete game using Unity’s default GameObject/Monobehaviour workflow.
STABILITY TEST (and PERFORMANCE):
Strangler also serves as a performance test for Unity’s default GameObject workflow and incremental garbage collection (no object pooling is used). And the game implements a feature to test game loop stability at 60Hz. To run it:
1. During gameplay, press Right
Ctrl + T to start the stability test.
2. Errors will display in real-time and stop automatically when gameplay is paused.
3. Results are saved in the following files:
FixedUpdateSequence.txt (always accurate).
FixedUpdateErrors.txt (
accurate only at ~60Hz refresh rate, otherwise contains garbage data).
The files are located in:
C:\Users\Username\AppData\LocalLow\RetroMasters82\Strangler\