Log in

View Full Version : Java


SPACENEEDLEEXCHANGE
07-07-2003, 10:10 AM
First off, thanks for the responses on my "do you like the games you make" thread. An interesting range of opinions.

I have a couple questions about Java, technical and otherwise:

1) If I want to make a browser-based version of my game, which version of the Java SDK should I use (which version of the Java runtime should I require?) Which is the most compatible? Are there any good pages that list known implementation bugs so I know what to stay away from? In short, how do I make the most widely compatible, rock solid Java applet possible?

2) If I want to make a standalone/downloadable/full/extended version of my game, would you recommend doing this in Java, or should I switch to C/C++? The thought of having two separate language versions of nearly the same game is really upsetting; not that it would be a big deal to port, just a lot of annoying typing. Seems like I can use JNI to get at whatever native stuff that I would normally need to access through C/C++, and I'm not really too interested in gaining a performance boost by going to C/C++. So what are the compelling reasons to use C/C++ for the standalone version? If I remember correctly, PopCap uses C/C++ for their downloadables (am I wrong?) Why? I guess I'm assuming that anyone who will buy the downloadable has played the online version, which means they have Java. But I guess some people might not have Java (how??), so the downloadable is their only choice, ergo a version without a JRE dependency would be a good idea.

Thanks,
SNX

princec
07-07-2003, 11:44 PM
There's a wide variety of opinions on this, and here's mine:

Firstly, the 1.1 version of Java you are no doubt thinking of using is exceedingly outdated, slow, and bugridden. There is no longer even any guarantee it is installed on any particular system. My advice on this respect is to go straight for JRE1.4.2. This now has a much easier (and smaller) download; it's probably worth it in the long run for most users to have this JVM.

Secondly, I strongly advise against using actual applets embedded in a web page. It severely limits your design - and this is significant if you just want to port it to fullscreen using the same code, as it'll take a lot more effort scaling it all up nicely. Java Webstart is such an excellent step forward to running web-based games it really shouldn't be overlooked.

Thirdly, despite all I've said, if you target the MSVM 1.1 (JDK1.1.4 was it?) then you're likely to be able to run on most people's machines, albeit crappily. You will be writing, unfortunately, the same sort of crap that made everyone laugh at Java in the first place, and that's why it never took off the way it could have done! Most people use Flash these days to do that kind of thing, simply because it's better at it. If you want C++ speed, hardware accelerated sprite translucency, fullscreen, and easy portability to a full-blown application, use JDK1.4.2 and be patient while the world catches up with you. Dell and HP are shipping JRE1.4.2 as standard on all new machines shortly - it'll take time but eventually it'll happen.

Cas :)

princec
07-07-2003, 11:46 PM
Oh and I forgot to mention - I compile my Java stuff using Excelsior Jet Professional. Typically this adds about 1.5megs to the size of a JAR file but totally removes the dependency on a JRE, and as of this time, is somewhat faster than the Sun Hotspot Client JVM. The good thing is that there is of course no longer any requirement for a JRE on the users' systems.

Cas :)