I used to do a bit of programming including work on my own games.
Iulius What you're are doing is not really autoframeskipping and kind of a hack as you probably know, but I guess it can be a temporary solution until an official implementation.
However thank you for this thread and work
This is how auto frame skipping works from what I remember years ago ..
Basically you have game logic rendering, and the actual graphic rendering - they are seperated as the game logic always have to work regardless
1. Render frame X
2. if there's still time left until the end of this frame everything proceeds normally, and frameSkippingVariable = 0.
3. However if rendering made the game time pass into a different frame, it will check how many frames are behind and store them in a frameSkippingVariable. (integer)
4. the game continues the game logic calculations, and skips frames based on the last rendering.
Basically it does it by skipping rendering if (frameSkippingVariable > 0), and do frameSkippingVariable --. (so it counts down until all the missing game logic frames are calculated)
The FPS counter you see in games, is how many frames were actually rendered, while the game logic usually has a fixed FPS for algorithms, etc.
The fact the official team implemented frameskipping is great because it means they have seperated control between game logic and graphical rendering, it's only a matter of time until they implement real autoframe skipping and we'll be able to play without gameplay lags like in other emulators !
Iulius What you're are doing is not really autoframeskipping and kind of a hack as you probably know, but I guess it can be a temporary solution until an official implementation.
However thank you for this thread and work

This is how auto frame skipping works from what I remember years ago ..
Basically you have game logic rendering, and the actual graphic rendering - they are seperated as the game logic always have to work regardless
1. Render frame X
2. if there's still time left until the end of this frame everything proceeds normally, and frameSkippingVariable = 0.
3. However if rendering made the game time pass into a different frame, it will check how many frames are behind and store them in a frameSkippingVariable. (integer)
4. the game continues the game logic calculations, and skips frames based on the last rendering.
Basically it does it by skipping rendering if (frameSkippingVariable > 0), and do frameSkippingVariable --. (so it counts down until all the missing game logic frames are calculated)
The FPS counter you see in games, is how many frames were actually rendered, while the game logic usually has a fixed FPS for algorithms, etc.
The fact the official team implemented frameskipping is great because it means they have seperated control between game logic and graphical rendering, it's only a matter of time until they implement real autoframe skipping and we'll be able to play without gameplay lags like in other emulators !