Hey there, so I've been working on a game which all of a sudden started running at 40 fps rather than a consistent 60 fps for no apparent reason. It took me a while to realize that it was because my Roku updated. I realized this because I tried another Roku which hadn't recieved the update and it worked fine, until I updated that Roku as well and I was back to 40 fps.
I originally thought maybe this had something to do with the new profiler running in the background so I created a temporary private channel so the game wouldn't be side loaded, but it ran the same. I tried to narrow it down to which parts of my code were the most time consuming and couldn't find anything specific until I tried putting a timer on this one method...
timer = CreateObject("roTimespan")
m.screen.SwapBuffers()
print timer.TotalMilliseconds()
And here's what the results looked like.
20
6
22
7
5
22
23
7
5
22
6
22
7
21
7
22
7
22
7
20
7
21
6
22
7
It's almost perfectly alternating between being ~7ms one frame and 20+ms the next. Well 16.666ms between each frame would be 60fps so just this one call alone is taking longer than that.
Anyone have any thoughts on this? I also put a timer on my entire game loop, where all of the logic and drawing to the screen occurs, and the total for all of it is never greater than 10ms which is easily a consistent 60fps. It's the SwapBuffers() call that is killing me.