On macOS (13.6.1 here), sometimes, the simulator will write to the console 1 frame later than what he should. I think this bug was introduced with version 2.1.1.
So, for instance, if I run a 30 fps game on a Mac with a 60 Hz display, and the game should send a logToConsole when displaying a new frame, sometimes the frame will be rendered without any message, and on the next frame (when the game is not actually rendering because it runs at 30fps), the message will be written in the console.
Obviously, in my example, it's not that big of a deal but it could be way more troublesome if the framerate of the game is higher, making it difficult to know what precisely happened during one frame using logToConsole.
I hope you'll be able to fix this!
Happy bug hunting!
Could you test your game on SDK 2.1.0 to double check it was introduced in 2.1.1. It would be extremely helpful, thanks!
Since something was changed in 2.1.1 to display in the console correctly on Sonoma, I thought it was the cause of this bug and it would be an easy fix. I was wrong.
I did some testing and I have this bug with SDK 2.1.0 and even 2.0.3.
I admit, I'm a bit lost. Maybe it was introduced when I switched from macOS 12 to 13 (I dit it not long ago). Or could it be a consequence of my code growing?
I'm sorry, I'm such a weirdo for noticing this bug. I'm making a rhythm game so I like to verify that everything is frame perfect as it should be. But I'm possibly pushing this technique of mine a bit too far!
No problem! I'm glad it wasn't an inadvertent change by us. How are you testing this? If you're logging per frame you'd be swamping the console with log messages, if you could provide a bit more detail that'd be great.
As you were saying, I'm not swamping the console with log messages. I put a logToConsole in a specific part of the code (for instance when a specific sound is being played). Then I test the game in the simulator while recording the screen with QuickTime Player. Afterwards, I play the video file, going frame by frame when needed to ensure some gameplay elements stay in sync.
I was using this technique without any issue until recently. Not sure what changed since then.