Much slower framerates on macOS
dthompson

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.

Edgar Reynaldo

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

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.

Thread #617869. Printed from Allegro.cc