3 ms·
I can attest to that. I used to freelance doing porting about 10 years ago, and the main way of having a stable event loop for a game on macOS is not really any
by whstl 1y ago
I can attest to that. I used to freelance doing porting about 10 years ago, and the main way of having a stable event loop for a game on macOS is not really anywhere clear in the documentation, at least not anywhere I could find.
Libraries and SDL, GLFW and Sokol handle this for you, and I had to poke inside them to actually figure out how to get the same performance of other games.
In a nutshell, the trick is simple, you call [NSApplication finishLaunching] and do a while-loop yourself instead of calling [NSApplication run].