QtPyHammer-devs / QtPyHammer

python alternative to Valve's "Hammer World Editor"
GNU General Public License v3.0
35 stars 2 forks source link

QTimer isn’t reliable #16

Open snake-biscuits opened 3 years ago

snake-biscuits commented 3 years ago

When a QTimer is used for timing frames, either in the viewports or the demo player prototype, frames can lag

The error / deviation accumulates too. We could look at the time taken to execute functions tied to the timer and compensate for the deviation

Or asynchronously run the functions with a 1 frame delay, showing the previous frame (double buffering) some kind of “delayed execution” QTimer subclass (GFrameTimer?) could be useful