Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

ya I'm on Windows, it sits around 32 fps

(1 edit)

Thanks for mentioning this, I'm seeing it on my windows machine as well. 

I think I see the problem.  To maintain 60FPS, the game sleeps for the remainder.  At least on my windows machine, when it does this, it sometimes sleeps for way too long (even though the requested sleep time is correct).  This is what's behind it being at 30FPS on your machine.  Very strange, I'll have to put in a better system.

Out of curiousity I looked at the raylib source to see what they do. This looks like a pretty sensible implementation that fixes what you're hitting. Seems like Sleep() is pretty off: https://github.com/raysan5/raylib/blob/master/src/rcore.c#L4954

Yep, just sticking a while(time not right){} loop at the end fixed it!  I've uploaded a new version with the improved performance (it feels a lot better at a solid 60FPS than 30!), plus one or two other little things I added over the weekend.  Thanks for the help, friendly lain-anon :)