moggers87 / apricots

Everyone's favourite plane game!
GNU General Public License v2.0
13 stars 2 forks source link

VSync #44

Open moggers87 opened 1 year ago

moggers87 commented 1 year ago

Remove the frame limiting code (currently set to 50fps for historical reasons¹) and pass the VSync flag to SDL_CreateRenderer. I'm fairly sure that the framerate and animation/physics are decoupled, but that needs double checking.

¹: the original author wrote the current version Apricots in 2002/2003 in the UK and probably had a CRT. The UK uses a grid frequency of 50Hz and so the CRT would have a refresh rate of 50Hz

moggers87 commented 1 year ago

I'm fairly sure that the framerate and animation/physics are decoupled

It is not. The results of changing TICK_INTERVAL are hilarious.