Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Much slower framerates on macOS

This thread is locked; no one can reply to it. rss feed Print
Much slower framerates on macOS
dthompson
Member #5,749
April 2005
avatar

I'm finally getting round to building my game for macOS. After fighting with clang (and various assorted CLI differences), the compilation went ahead without too much fuss, and I was shocked at its easiness. Allegro's really great like that.

Anyway, the one remaining issue is that framerates on macOS (at least on the Macbook Pro I'm testing on) are absolutely terrible compared to Linux and Windows. It seems to be in the region of 6-8fps most of the time. On Linux, it runs consistently at 60fps, even on integrated graphics.

I can't profile the game right now because I've yet to figure out how to do this with LLVM's profiling tools. I may just install gcc on my Mac, but we'll see. One thing I can tell you though is that its CPU usage seems quite high compared to normal; normally for me it's hovered around 5%, but on my Mac it darts between 15-60%.

Any gotchas springing to mind for anyone? My first suspicion was wanton copying to/from the GPU, but I can't see any memory bitmaps persisting in allegro.log.

______________________________________________________
This is my website and this is not.
This isn't a game!

Edgar Reynaldo
Member #8,592
May 2007
avatar

Obvious causes of slow down include :

  • Memory bitmaps

  • Changing the source texture bitmap too often

  • CPU - GPU transfers

I have some nice high performance timers you could use, if you can't get profiling to work. They give nanosecond precision.

Other than that I don't have any OSX machines to help test on.

Peter Hull
Member #1,136
March 2001

If you've got Xcode it has a good set of different utils to monitor performance. Do you plan to release the source of this game, if so I'd be happy to look at it for you.

Go to: