Mac OS X or Intel GMA problem?

I have a game in beta testing at http://www.orbitalcows.com/lpc/lpctest.php. It runs fine on my laptop, but is almost unbearably slow on my Mac Mini. Here are the stats for the two machines:

Laptop: Windows XP, Pentium M 1.66 Ghz, 512 MB RAM, ATI Mobility Radeon 9000, Java 6
Mac Mini: Max OS X 10.4.11, Core Solo 1.5 Ghz, 512 MB RAM, Intel GMA950, Java 5

The two computers are comparable. The only real differences are the OS, the video card, and the version of Java. Which of these is causing the problem?

It seems like the graphics card must be the issue, but the game isn’t exactly graphically-intensive. It might just be that Java is a different version on the Mac Mini and also written by Apple instead of by Sun.

I plan to try testing on the laptop with Java 5 to see what happens, but it still wouldn’t be the same Java 5 as on the Mac (Apple codes its own version of Java).

I did optimize one small thing - eliminating some code that did unnecessary calls to mouse event code. This resulted in a small improvement on the laptop when other programs were running at the same time and a slightly better improvement on the Mac Mini. Even so, the game is still really slow on the Mac Mini.

I’ve used Java 5 and Java 6 on Mac and didn’t ever see a comparable difference between Sun versions of the jvm.

My best bet is that it’s the graphics card being an issue since Intel GMA chips are notoriously bad.

Without playing your game I’d guess at fill-rate issues. Try running it at a tiny resolution and/or disabling all but a couple of sprites and see what the difference in framerate is.

You may be right.

I’ll try that out after I get back from work.

I found that the issue disappears when I lower the screen resolution of the desktop when I’m in windowed mode. It also disappears in full-screen exclusive mode when the resolution is low enough.

So it must be a problem with Intel GMA graphics. There’s not a whole heck of alot I can do about it. It’s not like my game is particularly graphics intensive.

I’ll just mention that the game runs better in lower resolutions if you have a really bad graphics card in the readme.

It might depend on what you do too, and what you use.

Java2d can be terribly slow on some things, like transparancy, if that is what you using.

I have a GMA950 in my machine at its run fine for all simple things.

I only use bitmask transparency, so it should be reasonably fast. I’m not drawing that many images that use transparency to the screen most of the time.

One of the worst slow downs was when I had some mouse listening on the AWT event thread that was checking for rollover on some buttons that couldn’t roll over anyways. I removed that, and that worst case disappeared.

Still, it goes pretty slow in high resolutions.

It’s kind of screwed up. I’ve run games like Diablo on computers with similar graphics cards. There were slowdowns, but not like this. Given, I was probably running Diablo in 640x480 or something like that. Intel GMA cards seem to have some real problems with high resolutions when you’re actually drawing something.

I’ve had huge issues with Java2D’s optimizations with either transparent images or with vector-based drawing (like fillCircle or whatever). I usually switch a game that is even remotely complicated to OpenGL, which always always gives me significantly better results.

I’m planning to buy a book that contains information about JOGL (among other topics) sometime in the coming months. I will consider switching to JOGL (which I believe uses OpenGL).

OpenGL is used by practically every graphics card now, right?