hi! i'm a game dev and when i watched alex's video about skoe some ideas immediately came to mind re: how the 60fps lock would happen, and how it would drift
i looked at the cocos source in https://github.com/altalk23/cocos2d-x-gd to try and get a sense of how cocos works, though ultimately a lot of this will depend on how GD is written. i also looked at current cocos2d-x on its public repo and most of the key details are the same.
(sorry this is disorganized) i'll try and start by explaining how most game engines (including cocos 2.2.3 from what i can see) work. they usually perform a set of steps in a loop:
- before step 1 cocos computes something called 'delta time', a measurement of how long it's been since the last time step 1 happened. various parts of cocos use this delta time to influence updates, potentially this would include gd's physics. cocos' current "FPS" is determined based on this delta time
- ask windows 'has anything happened, like keyboard or mouse input?', and keep asking until there