Practicing indie game developers know that the Mac is a profitable platform and one not to be ignored. Unfortunately for Java game developers, the desire to use the latest Java version can conflict with the goal of releasing on Mac. Apple develops, maintains and releases their own versions of the J2SE platform. One of the benefits is that some APIs, particularly AWT, have access to the internals of the OS, access Sun does not have. The downside is that Apple have demonstrated that they have no problems with releasing a new version of Java that is not available for older versions of Mac OS X. Apple’s version of Java 5 requires Mac OS X 10.4, Tiger.
So Java game developers need to make a tough choice, one that can affect not just the Mac but each platform they release on. It’s no problem requiring the latest Java for a game on Windows or Linux if you bundle the JRE with the distribution, but this is not possible on Mac. So do you restrict yourself to Java 5 and lose potential customers who are still on Mac OS X 10.4, or do you give up the newer Java features you wanted to use and stick with Java 1.4.2? The choice will get tougher with the new Java 6 when Apple finally releases it — I’ve heard rumors that the final version will require Mac OS X 10.5 (though beta versions run on 10.4).
Cas of PuppyGames, in addition to being a developer of stellar games, is a top-notch statistics logger and a genuinely helpful bloke. His games log quite a bit of information that can help him in running his game business, such as OpenGL versions, OS versions, Java versions, graphics card information, and so on. Sometimes, he shares some of his stats with fellow developers over at the Indiegamer forums. Recently, he did so once again.
I’ve been curious myself about how many Macs out there are running Java 1.5. In this thread, Cas posted his logged statistics, showing the percentages of his Mac players running four different versions of Java:
2005
1.4.1 1083 8%
1.4.2 11801 92%
1.5.0 882006
1.4.1 1249 4%
1.4.2 20996 66%
1.5.0 9285 29%
1.6.0 602007 so far
1.4.1 21 2%
1.4.2 264 26%
1.5.0 712 71%
His conclusions:
Trend is that by the end of 2007 the overwhelming majority of Macs will be running Java 5, but anybody planning on deploying games to make a living is well advised to stick to 1.4 for the next 12 months.
Personally, I’m requiring Java 1.5 on Mac for my latest version. I’ll be requiring 1.6 on Windows and Linux (if I actually support it). I won’t be using any new APIs from 1.6, but there are major changes to bytecode verification and the class file format. The new bytecode verification can have big impact on performance, but this benefit is lost when running older class files on the 1.6 JRE. By sticking to 1.5 features, the Mac version can be compiled with 1.5 while other versions can be compiled with 1.6 to take advantage of the new class file format.
So I disagree with Cas somewhat. I would say that any projects that are to be released late this year won’t be losing much by moving to 1.5. It’s a different story for earlier releases, though, and the choice of Java version should be considered carefully in that case. For any projects starting now, unless you plan a release within 6 months, you might be better served going with 1.5.
Technorati Tags: Java, Mac, OSX, OS X, Apple, Sun, games, game programming, game development
powered by performancing firefox
{ 4 } Comments
I stuck to using “-target 1.2 -source 1.2″ for all of the applets that I wrote in 2006 because… even when JREs are available for higher versions of Java, the browser plugins have lagged behind.
I would absolutely use templated lists and iterators and sets and such, but then my Applet just plain won’t run, even on my machine. Feh.
Yeah, I suppose the Applet world is something different altogether. Personally, I stay away from them for anything commercial. I do love them though for knocking up GUIs for web apps (being that I suck at web-design). And I can see a benefit to putting up free JOGL or LWJGL applet games on a site — could be incentive to get people to upgrade.
You are missing a few things:
* You are assuming that a single version of Java is installed at any one time. OS X supports versioning of frameworks and Java 1.3, 1.4 and (when installed manually) 5.0 live side-by-side on a Mac.
* Installing J2SE 5.0 on Tiger makes it the default runtime. Leopard is rumored to have Java 5.0 as the default runtime out-of-the-box.
* Don’t forget that Java 6 is coming, too. Developer previews are already up on ADC.
No, I’m not assuming that only one version of Java is installed — I assume I want to use the highest version that’s available. Since 1.5 is not available on any version of Mac OS X below 10.4, then using it right now means you restrict yourself to that Mac version or later. It has nothing to do with how many VMs the user has installed.
As for Java 6, I know the preview versions are running on Tiger, but will they continue to do so after the final release or will they be restricted to Leopard? If the latter, then it’s not a viable target either if you want to hit the broadest Mac audience possible.
Post a Comment