View Full Version : Java and game development
You'll have to excuse my spelling as I've just been to the pub (as you do on the run up to Christmas), just thought I'd post to say that we're all moving to developing in Java and if anyone has an advice/pitfalls for this approach? :-)
Savant
12-21-2005, 07:31 AM
Did you try searching? The site is loaded with Java game development threads.
kingaschi
12-28-2005, 05:09 PM
Unless you want to program for XBox or Playstation, then just go for it. (I am biased, but I wouldn't choose anything other than Java).
Escapist Games
12-28-2005, 11:00 PM
Man, this is a REALLY bad day for me to see a question about Java...
I may have an opportunity to work at a company that has a Java-based games service, so this morning I tried to access the site to do a bit of research. Unfortunately, I apparently don't have Java (or at least the right flavor/version of it) on my system.
I find a link that sends me to Sun's site where I am supposed to download and install something called a "J2SE Runtime Environment". (That's user friendly.) Halfway through the install an error pops up on my screen. "Could not access network location." I try again 10 minutes later. Same problem. I wait nearly an hour and try again. Nothing.
After verifying that the problem isn't a Security/Firewall issue I find some info on the Sun site that tells me to do a manual install. Okay, fine. Only one problem: "PAGE NOT FOUND". I try the offline install. "PAGE NOT FOUND".
Two hours later I try it all again. Same problems.
I wait two more hours and make another attempt. No dice.
I just tried again (12 hours later) and I'm getting the exact same results.
I'm sure this is just an isolated incident, but if I was a potential customer I would've given up on that game site 11 hours and 55 minutes ago. Maybe sooner. I've been told that Flash isn't secure enough. Is there no better solution available for web-based game distribution? ARRRGH!
Sillysoft
12-29-2005, 02:29 AM
I don't know where you were trying to download from. I've never had any problems going through http://www.java.com
That's the consumer facing Java site, as opposed to all of Sun's developer stuff.
princec
12-29-2005, 11:13 AM
You'll have to excuse my spelling as I've just been to the pub (as you do on the run up to Christmas), just thought I'd post to say that we're all moving to developing in Java and if anyone has an advice/pitfalls for this approach? :-)
I've got plenty of anecdotes but it all really depends on what you want to do with it and who it's targeted at and your development experience and so on.
Cas :)
Momor
12-29-2005, 11:56 AM
For my current project I've strongly considered the Java option, since I know this language pretty well, and it also helps making applet or midlet versions of th e game. But unfortunately I resigned for only one reason : redistribution.
It is possible to embed a full J2SE with a game so that it runs on any PC (Java enabled or not), even without any install. In the test I made I managed to have a minimal Java 1.5 engine at 12 Mb (zipped). It is probably possible to create a lighter "rt.jar" version, but it is something which looks a lot painful ... And also we can probably use an older version of the J2SE, but then some features like fullscreen mode would need some tricks ...
So since in my project size does matter, I've just switched back to my good old Delphi ...
Escapist Games
12-29-2005, 12:08 PM
I don't know where you were trying to download from. I've never had any problems going through http://www.java.com
That's the one. I don't know what was going on yesterday but I had several other people try it and they reported the same problem. It was busted all day long.
Fortunately, it seems to be back up this morning and I managed to download the file I needed. What a royal pain in the butt, though. I did manage to get a couple of games working last night, but the ones I really wanted to play weren't available because I apparently needed the newest version of Java. Then they pointed me back to the java.com site. GRRRRrrrrrrr. So customers will -- potentially -- have to go back and download Java again and again as Sun releases new versions? That's horrible.
princec
12-29-2005, 01:35 PM
http://www.puppygames.net/downloads/SetupUltratronDemo.exe - 6.5mb Nuff said ;)
Cas :)
princec
12-29-2005, 01:36 PM
Nah, it's got an auto updater. My advice is target Java 1.4 and you've got the entire Mac market covered and a fairly large % of PCs.
Cas :)
Well I have a fair bit of J2ME experience, am a PHP programmer by trade and have a fair few years experience with a variety of languages (to answer your question), the reason for our choice? We work with Eclipse, one of the developers has moved to BT where he will be developing applets for the majority of his time and I'm happy with whatever language we use, also Java has the added bonus of cross platform support, very handy for a team using a variety of operating systems.
Our graphics guy was quite anti-Java to start with, was hard work getting him on board, so I hope we've made the right choice :)
princec
01-01-2006, 06:32 AM
Are you targeting hardware-accelerated PCs...?
Cas :)
Just a quick Q Cas, do you bundle your win32 software in an installer for customer familiarity?
Well we are targetting OpenGL support, whether that is hardware or software accelerated (usually drivers have hardware support these days?)
Why, are there any specific hurdles involved with hardware supported Java applications?
princec
01-01-2006, 06:47 AM
Here's my tips then :)
1. Use LWJGL (http://www.lwjgl.org) to do your OpenGL. Forget Java2D. You can ask LWJGL to allow software OpenGL but it's kinda pointless as it'll run at 2fps.
2. There is a possibility I might be doing something like adjusting the VM for size, embedding it in my game with a custom launching .exe, and Moleboxing the lot so no-one's any the wiser. End result: small downloads, no confusion, no compatibility problems, no dependencies.
3. I only use the Moleboxing step because distributing a tweaked VM is not in Sun's interests, so I 'box it and that way no-one gets upset.
4. I target 1.4.2 because the Mac is more or less stuck at this level for the foreseeable future. Fortunately the Mac has GL and Java built in which means LWJGL always works as expected and there's no need to bundle a VM.
Cas :)
Had already decided to use LWJGL, looked the best way to go about things, thanks for clearing that up, was just interested in why you'd be using an installer over web start :)
princec
01-01-2006, 06:56 AM
Webstart's kinda poo really. Great for the corporate environment, very poor for actually getting the great unwashed to try your game. Also noticed that the conversion rate for Webstarted versions of my games was almost nonexistent, possibly because Webstart's a bit cranky.
Actually I do use Webstart - the Linux links are all Webstarted versions of the games - can't figure out how to do an installer ;)
Cas :)
Problems could arise from packaging a linux version I should think, but I guess thats only a small percentage of your business anyway?
princec
01-01-2006, 07:10 AM
0% of my business... I don't think I've had a single linux sale. Then again I've only had 245 Linux installs over the last year. That's either a testament to how shit webstart is, or a testament to how tight linux users are. I suspect both.
Cas :)
Sysiphus
01-01-2006, 07:54 AM
I'd really love there'd be a way to legally do a light weight exe using jme and lwgl, for example. I klnow some coder that would be really happy with that..
princec
01-01-2006, 08:00 AM
You can use Excelsior Jet with JetPerfect for that. I'd use it myself, as it's rather faster than the 1.4 client VM, but for the amount of time I've got to do development, it's a bit more fiddling than I can be bothered with.
Cas :)
Sysiphus
01-01-2006, 08:02 AM
. I only use the Moleboxing step because distributing a tweaked VM is not in Sun's interests, so I 'box it and that way no-one gets upset.
Actually this was the last solution I heard, but my friend mentioned me that it could bring problems sooner or later (not of the technical nature...but legal ones? Unsure.)
The fact is I have had a look at that jME engine, and from a graphics man(art pipeline, effects, etc) point of view, it rocks. Even more than several of the good known non java ones we considered...
I had tested its webstart demos(LOD, ms3d loader,md3 loader, terrain, etc.they all went with good performance), I use to have JRE installed, usually 1.42. So I use to chek all this stuff, as well as some 3d modelers/renderers/animators like Jpatch (great for spline modelling) or Art of Illussion (great rendering).
Are you sure a solid % of Pc users do have jre 1.4x installed ?Most which I ask don't even know what jre or java is... (casual gamers, that is)
Sysiphus
01-01-2006, 08:07 AM
You can use Excelsior Jet with JetPerfect for that. I'd use it myself, as it's rather faster than the 1.4 client VM, but for the amount of time I've got to do development, it's a bit more fiddling than I can be bothered with.
Thank you. I will tell that to my friend, but sounds as if it were doubtfully a good route...I'll tell him, as we're stuck there even as to not use java , being him all about java..
Jet was stopping us for the price for a first pc game developed together (as indies. We've developed a bunch at companies ;) ) But also, I think he's read recently that with certain near to come sun(or already done) "move", perhaps wont be legal with Sun's license using Jet ? Could it be so, or I understood wrong? If so, is a dark future...
princec
01-01-2006, 08:54 AM
Jet's all legal and kosher, and a very good solution, especially for smaller projects. For large projects, like say Tribal Trouble, you could embed the whole VM and that'd be perfectly legal too. The hackery and Molebox route I've gone down is in a grey area of legality but so far the Sun official's I've talked to about it are quite happy with me doing it (and, we are supposed to be having an official discussion with Sun top brass shortly about the issue).
Cas :)
Sysiphus
01-01-2006, 09:34 AM
I see...I lot to talk about again with my friend...
I think we'll dig about it a bit more...
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.