View Full Version : Java Gaming
12-02-2006, 05:00 AM
What about using Java as a development Language.
We can take as an example of refined games puppygames (http://www.puppygames.net/).
12-02-2006, 12:52 PM
A lot of people have done so and some swear by it.
Three Rings (http://www.threerings.net/) does all of their games in Java. They are the ones who did Yohoho Puzzle Pirates.
Of course, Java, like any other language or platform, will have its own strengths and its own weaknesses. It's a matter of picking your own poison.
12-02-2006, 01:45 PM
There are already a lot of games written in Java, some of them you wouldn't even suspect.
With the new licence model (LGPL) you can embed your own customized virtual machine and evrything becomes even easier.
I would recommend Java because it's really a high level/no worries language and it's cross platform.
For example you don't have to mess with low level stuff if you want to manipulate files or graphics or anything. Plus it has some very good OpenGL interfaces nowaday.
If you want more infos on Java games devellopment, here (http://184.108.40.206/forums/index.php).
Nowadays Java is very nice option for shareware games. If you bundle a stripped down VM for windows distribution, there is quite some overhead involved. So a minimal example (http://kaioa.com/k/LWJGLDemo.exe)* is already 1.6 big. However, the total size grows very slowly thanks to Pack200 compression**.
[* I was too lazy for creating a stub exe. Well, shortcuts are good enough for a proof of concept.]
[** Pack200 makes class files more compressible. It doesn't really do any compression on its own. The actual compression is done by the installer (LZMA). P200+LZMA is the dream team.]
If you don't use swing/awt (use lwjgl) and if you use suitable formats, you can put a lot of content and code into a 5mb demo. And you also get the speed benefits of an up to date JRE (the demo uses 6.0rc for example).
Stripping a JRE down is quite tricky, however. I used quite a lot of voodoo for assembling it. Like ProcessExplorer for getting a list of the used dlls, bootstrapping an uncompressed rt.jar, FileMon for retrieving a list of classes, regex search n replace, sorting (with removal of duplicated entries) and zipping with that file list at hand (kzip /r /s4 rt @classes.txt). Ouch! :)
What we really need is something to automate that or a custom game specific JRE, which comes with all the usually used classes and natives. The downside of the second option is (apparently) that it would be a few hundred kb bigger than absolutely necessary, but it would be nicer to use for the most part.
12-03-2006, 07:04 AM
I would love a tool that could check and tell me which parts of the JRE I could safely strip away for my specific app.
Short of that, a solid tutorial about stripping down a JRE would be useful too. Details on what files do what, etc.
12-03-2006, 07:42 AM
If you're going the Java route, you might like to take a look at Processing (http://processing.org/). It's a great framework that was originally designed for computational art type installations. Since then it has grown a lot, supports OpenGL as well as software rendering (with OpenGL style syntax, both 2D and 3D), exports to applet or application, and it has a wealth of community contributed libraries that do all kinds of interesting stuff.
12-03-2006, 09:08 AM
Also have to say that these days if you're writing a game of even vaguely modest proportions (say, 10mb of sound and graphics and code) you might as well just bung the whole VM in these days and save yourself a bit of bother.
Oh and just remember to target 1.4.2 for the next couple of years while the Mac market slowly upgrades. Java and financial success are intrinsically linked to the Mac platform.
Powered by vBulletin™ Version 4.1.3 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.