Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Gearend Demo

Explore an Abandoned Robotics Research Facility with an interchangeable Robot · By SolarLune

Mac performance issue

A topic by rainybyte created Apr 15, 2017 Views: 721 Replies: 18
Viewing posts 1 to 14

Using the shader workaround mentioned in "Game fails to pass Title Screen", I am able to begin playing the game. Unfortunately the game runs poorly, but it does not appear to be a normal performance issue. The intro text crawls onto my screen one character at a time, as I would expect (since I played the Windows version) but the time between the characters appearing is about a second per character. Could be strange performance issue, but maybe you used a platform-specific timing or sleep function somewhere? Anything I can do to help provide more info for you? It seems to use 100% of one of my cores but doesn't do much with it.

(1 edit)

You need to profile the game with a profiler and take a snapshot to see what's taking up the most CPU.

I use Visual VM. Here's a long-winded tutorial I made about it a while back: https://www.youtube.com/watch?v=UFRTSeG2e5c

The game did not behave well (profiler never ran, or game crashed) with the Apple Profilers. I can try VisualVM but I'm not holding my breath.

As expected, it doesn't behave terribly well, but I can see that 92.7% of the cpu time is eaten by org.lwjgl.opengl.GL11.nglDrawElementsBO. It doesn't give me a call trace. The actual profiler never is able to attach to the game.

Hmm, could you try the latest update, just to be sure it's not something that I forgot to turn off (checking for a file every frame)?

I still had to repair the shaders to get them to compile, but when I get to the game it still shows the same issues. The game music runs smoothly but the textbox and movement and just about everything progresses once or twice per second.

(1 edit)

Does it get faster if you shrink the size of the window?

It sounds similar, if not identical to what I described here: https://itch.io/t/73087/game-runs-really-really-sl...

What's your GPU?

It does not. Not close to identical. GPU's are Radeon Pro 450 2048 MB and Intel HD Graphics 530 1536 MB.

How far did you size the window down? I had to make it very, very small to have it render at normal speed.

I assume the system is set up to use the Radeon, rather than the built-in Intel graphics? Can you set it up to use the Intel instead, and test that?

Did you disable all the graphics effects in the options?

What's the state of the CPU while the game is running? Is it at 100%?

(3 edits)

Most of that info is in other posts from this thread. I believe you will find your questions answered there. Rest is in my other thread. The problem is not the same.

Oh, it was in a different thread. I should have read more carefully. :)

Intriguingly enough: after editing some of the shaders to allow me to load in, I'm able to get the game to run with improved performance as long as I stick to the integrated graphics, whereas the dedicated GPU appears to still show the same performance issues. SolarLune, I am going to try to profile this a little bit more later. Is there a hidden profiler I can show in your game?

(+1)

There is one in BDX, but I can't enable it during gameplay (it's either on or off at launch). I could just have it on by default, but i think the better approach is to add the ability to turn it on or off during gameplay so I can collect some more precise information from you both. Thank you for your patience!

I can make myself available to address the performance issues anytime within the next few days. It looks like the integrated graphics performance is now great, but it still has trouble with the dedicated GPU. Something about the CPU/GPU handoff because the GPU show 4% utilization and renders frames in a few dozen microseconds (if it could keep that performance up it would be thousands of fps). This may also be related to the 100% CPU utilization issues in other places too. Is there a demo BDX project somewhere? I have IDEA and development software, so I could see if it's something about your game specifically, or if it's a problem with BDX/libGDX/LWJGL. Other games run quite well on this system, so it isn't one of those cases of Apple breaking things.

Yo, that'd be super helpful, thanks! BDX can be downloaded and installed (and comes with a simple demo project) here.

In the meantime, I've updated the demo with a new build with some minor changes. In the latest build, you can press the 1 key to enable and disable the profiler, which shows how much of the CPU and GPU is going to which resources.

If you could take a screenshot of the main menu and the in-game section and post it, that'd be helpful.

It looks like the demo project doesn't come with the profiler enabled. I also seem to be having some trouble with changing the code to enable it and see if the problem exists with the demo project too.

(3 edits)

https://drive.google.com/open?id=0BzWL7E-FTHJhUkZIcDRKbHVWU1E

https://drive.google.com/open?id=0BzWL7E-FTHJhbGtmWDYtczlodEE

https://drive.google.com/open?id=0BzWL7E-FTHJhZUZrTTNVNFpLeUk

https://drive.google.com/open?id=0BzWL7E-FTHJhenVGdWVrN2xaTEk

Here are four screenshots. In order they should be:

In game - Dedicated

In game - Integrated

Title - Dedicated

Title - Integrated

I have some better calltraces, including OpenGL calls. Sorry I couldn't hunt this down earlier. The end of the semester got kinda rough. The calltraces are currently locked inside an Apple ".trace" file. I need to analyze them a bit more.

Huh, none of those screenshots lead to anything for me - are the links correct?


Anyway, I fixed up the profiler a bit and changed some things around that hopefully can resolve some things (or at least push in the right direction). I'll see about updating the demo tomorrow.

Hey, I updated the builds again - if someone who uses OSX could try this one, that'd be helpful.

If you press the 1 key, you can see the profiler and see the GPU wait time (if it's greater than 0, then that means that the rendering process is slowing the game down, which is in line with what you mentioned, rainybyte). Also, I adjusted the lighting a bit - try turning off advanced lighting to improve the framerate, if the game runs slowly.