Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Xandros

macrumors regular
Original poster
Sep 19, 2010
211
13
Minecraft, a game built upon java, seems to suffer from a particularly game-breaking graphical and sound glitch on PowerPC Mac's. With respect to graphics the colours appear to be inverted, and the sound is distorted to the point where it is merely bursts of static. Descriptions of the problems and pictures can be found in this topic if you're interested in seeing it for yourself.

The point of this topic is I'm wondering, with regards to Java developer's point of view, if this problem could be attributed to endianness. Currently several people have theorised the reason why Minecraft now experiences these problems only on PPC Mac's (the old original Minecraft "free" version does not suffer from the same problems), is because one way or another, Minecraft's been coded to automatically assume it is running on a Little-Endian system, like an x86 based computer such as, for instance, Intel Macs.

And as a result, something or other is telling the graphics to display the wrong way round, causing them to become inverted (and apparently the sound is suffering from the same problem). Is this a feasible possibility? And many of the same people seem sure it is "easily" fixable by making sure Minecraft detects what platform it is running on to be sure of endianness. But I do wonder...
 
I don't know if this game might utilize some JNI to get to some C libraries, etc. but the JVM is big-endian everywhere. There might be some Java libs that are endian-specific, but it seems like you'd have to go out of your way to break this in plain Java.

-Lee
 
Would it therefore be more likely that OpenGL is the root of the cause?
 
Would it therefore be more likely that OpenGL is the root of the cause?

Not if you are getting sound issues as well. Without delving into an install of the game, I'd not be terribly surprised if there is some endian nonsense going on from the description.

If Minecraft is using LWJGL, which does include a sound engine, I'd bet that's the source of the problem.
 
Would it therefore be more likely that OpenGL is the root of the cause?

I have no idea. If the OpenGL interface is via JNI, and there's something like an unconditional byte swap in the C to swap to little-endian or the bytes are just laid out little-endian in java with no swap in the native code, this could be the issue.

-Lee
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.