Distributing Sun server-vm

For a large game I’m working on, I need to do math directly on native FloatBuffers. (Think: transforming vertices to write into a vertex-array for particle-engines) Converting back and forth between float[] and FloatBuffer to do the math just takes too much time, and math on float[] in the Sun client-vm is kinda slow anyway, as there is no bound-check elimination. So I really need to run this app with the Sun server-vm, and distribute it to everyone using this game.

The problem is the JRE license. For this game, it’s just no option to let players download the JDK/SDK, it’s just too big (59MB). Further, the JRE license allows no modification whatsoever on a distributed JRE, so I can’t replace the client-library with the server-library (DLLs in this case). Adding the server-vm-library in the right directory does the job also, but still would be “modification” of the JRE.

Now, is it legal to distribute the Sun client-vm, and let the game download the server-vm library writing it to /bin/server/ and using it the next time the game is launched by changing the vm-args?

I can’t wait for Java 1.6 which might (or might not) have two-tired compilation (client+server), and I don’t really want to break the JRE distribution license. What are my options?

Unless it’s some big app for large company usually in the spotlight I would just ship it with the modified VM. The modification does not change the runtime in any negative way - and still consists of sun components. IANAL!

Yeah, that’s only reasonable. But it would break the license.

IIRC what Cas said, “puppygames”-games also break the license, but there is no way to prove it, as it’s nicely packed by MoleBox. Might be worth the $59, dunno yet.

What if my game would be a hit (~0.01% chance of that happening), would I even be allowed to distribute the JDK, or only the JRE?

I don’t break any licenses :wink:

FWIW you are freely allowed to distribute the server VM with the JRE.

Cas :slight_smile:

Okay, thanks!

I wonder when Jeff comes around and mentions the legal-advice-thingy again :slight_smile:

You are alowed to freely distribute add ons to JVM like MIDI databank, server VM, and … additional libraries required by your application. (IIRC if your application would require part of SDK like appletviewer, or pack, you are alowed to distribute it too.) Only restriction I recall is requirement to don’t break existing Java installation.

Using a simple program that prints a stupid text on console as an excuse to distribute 5MB worth of MIDI databank used by Java unrelated program would be practice to be frowned uppon.

If you look around you’d find a resource that explicitly names an examples of Java parts that are for sure alowed to distribute with your application. (Server VM, and MIDI databank are named in that document.)

My plan was to remove the client vm DLL then, as it’s not used, but that would be modification… oh well, the moment Sun sues me for it, I’ll add it back…

I’e stripped several things out of rt.jar and a few other places to reduce my download size. Is this breaking the license? The embedded JRE doesn’t do an install, so it can’t break any existing JRE’s - infact, the user would pretty much have no idea it’s there.

Yes.

Slightly more wooly if you were to molebox your VM including a launcher that could only ever run your game?

  1. There wouldn’t be any implication that your “VM” was a Java VM
  2. It would be difficult to prove that the executable was actually Java (since molebox encrypts the whole sherbang)
  3. It wouldn’t be break the core reason for not wanting stripped VMs to be distributed (dilution of the the Java brand in relation to the Java VM Spec)

I’d be interested to know what people think, or even better a formal answer. I mean, effectively, isn’t this equivilent to native complialtion from an external point of view?

Kev

The molebox idea is quite evil :).

It is effectively “stealing” the JRE binaries, or the bits you care about. I can’t see anything in the license that allows you to do it.

Agreed, definitely not explicitly allowed - but explcitly denied?

Its a real shame if it is - it would allow games writers round here to produce sub 5meg games for windows (with version for Mac and Linux made available), drawing people into the idea that Java can be used for good games - while still maintaining the ideal and intent of the license…

Its not like the license is intended to prevent distribution - since thats explicitly allowed.

Shame Shame.

Kev
[goes off to delete his 4.4 meg install of his latest casual game]

Well, I thought so :frowning:

What’s the point of a programming language if the things you build with it won’t be used? No one wants to download a JRE and no one wants to download 15MB of bloat either.

Sun should put together an ultra-light distro that can be included with downloadable applications. Either that or they should officially acknowledge and aprove solutions like Molebox.

Sun made Java Web Start so the VM is shared in a safe way. It’s actually going to cause less downloading in the long run. Even if your customized JRE is only 35% of the original size, that’s only 4 downloaded games until you start wasting bandwidth again.

[quote=“swpalmer,post:14,topic:24938”]
The problem is that there won’t be a long run! The initial JRE never gets downloaded because it’s so damn big. We are talking about casual gamers here, and 56k modems.

Yeah, the lose target that indie developers throw around is 5meg for the demo version.

Kev

If they don’t have a JRE, they don’t have Web Start.

sarcasm warning…

Do you think RealArcade, MSN Games, Big Fish, etc. will mind including a link to Sun’s website to download the JRE? They of course will have to support users trying to install the JRE as well, because they have to support the visitors to their site (some of them are paying members). Do you think RealArcade has a launch wrapper for Web Start? Big Fish? MSN, since they are owned by Microsoft, surley they won’t mind supporting a Sun JRE or making the launch wrapper for it. Infact, I am sure all those sites will be willing to make a WebStart wrapper for us Java developers. Java pwns the market in gaming, so they will have to support it.

Do you think the customers will mind downloading Java, installing it, then returning to the page to download my game with WebStart? It’ll probably only take 15-40 minutes total (depending on internet connection and speed reading EULA’s) to get my game installed, with just a few web sites to visit and a dozen or so clicks.

…or do you think the customers would go to the next game on the list of hundreds and download “BeChuzzled” at 4.2MB? I doubt they would skip past my game, simply because the portals would have told me to take my months of work and redo it in a “normal” programming language and the customers would have never seen it. :frowning:

[quote=“Riven,post:15,topic:24938”]

People still use 56k modems? :slight_smile:

I think the majority of internet users have high speed now. Sun has done some work to get vendors to pre-install the JRE, surely that has helped some. They have indicated that they are looking into ways to reduce the JRE download size and possibly make it download ‘chunks’ in an on-demand manner… but quite frankly there isn’t much point.

Downloading the JRE (15MB) takes so little time these days that it doesn’t really matter. If the user chooses to launch your game it will probably take less than three minutes to download (often less than one minute). I would wait that long to see what a game was like if it caught my attention enough to press the “launch” button in the first place…

50% in the USA is using dail-up connections.

So much for 1-3minutes, think 50 minutes. You certainly don’t want to loose 50% of your sells, would you?

The other 50% that’s left often don’t want to install Java. “Nah, it will make my whole computer slow and unstable”. And since the GC runs in insane high priority, they’re sometimes even right, not to mention the browser plug-in loadtimes on <1GHz computers. Even my friends had to be convinced. “Maybe tomorrow…”, and we all know what that means. Only showing screenshots could convince them to head to Java.com, which used to be like a portal with the JRE download-button somewhere ‘hidden’ inside a bloated layout and a Flash movie. I’m kinda surprised they seem to have a 1 button site now. Good thing.

I’m afraid Java will never loose it’s bad reputation, so you’re left distributing it behind their backs, hoping for betters days.

Last but not least: at indiegamer.com they seem to have a few rules from years of experience:
[x] With every additional 10MB over the initial 5MB install-size you’ll loose 50% of your players
[x] With every additional step required to play your game, you’ll loose 50% of your players

This is for the casual-gamer market, ofcourse.

Etc. etc. etc. Strip the JRE bare, Molebox it, and no-one is any the wiser. Except Sun lose another opportunity to pimp their Java brand because you can’t mention it any more. I removed all references to Java from my splash screens etc. It’s their own fault. In fact I don’t even try to convince anyone that Java is good for games development any more because of this glaring issue.

Cas :slight_smile: