LWJGL as a Webstart Library

Started by Sardtok, May 05, 2006, 13:24:19

Previous topic - Next topic

Sardtok

Hey,
I had been thinking about this idea that you should deploy LWJGL as a Java Webstart library/extension, as this would make linking to it a lot easier.
One thing - people would only have to download that 1.3MB of data once (nice if there's a large collection of small games that don't take up much space - not such a big deal if the game alone takes 30MB).
Also, people wouldn't have to pack the native jars themselves, and sign them themselves.
They'd just use this little code in their jnlp files:
<extension name="lwjgl" href="http://chickensoft.com/games/lib/lwjgl_ext.jnlp" />

Of course the domain name should be changed and the jnlp file should probably have a different name like lwjgl_latest.jnlp or lwjgl_0.99.jnlp
Using versioned jnlp files like this could also ensure that a person could use his link to your 0.99 release after you release 1.00 so that any changes that might affect his programs wouldn't unless he links to latest.

Anyway, that extension tag is from my own deployment of the library, and here's the jnlp file for the library:
<?xml version="1.0" encoding="utf-8"?>
<jnlp codebase="http://chickensoft.com/games/lib/" href="lwjgl_ext.jnlp">
 <information>
  <title>LWJGL - Extension</title>
  <vendor>LWJGL.org</vendor>
  <homepage href="http:lwjgl.org"/>
  <description>LWJGL 0.99</description>
  <description kind="short">A Java binding for OpenGL, DevIL, OpenAL, FMOD and input devices.</description>
  <offline-allowed/>
 </information>
 <security>
  <all-permissions/>
 </security>

 <resources>
  <jar href="lwjgl.jar"/>
  <jar href="jinput.jar"/>
  <jar href="lwjgl_devil.jar"/>
  <jar href="lwjgl_fmod3.jar"/>
  <jar href="lwjgl_util.jar"/>
 </resources>

 <resources os="Windows">
  <nativelib href="native/lwjgl_native_win.jar"/>
 </resources>

 <resources os="Linux">
  <nativelib href="native/lwjgl_native_linux.jar"/>
 </resources>

 <resources os="Mac OS X">
  <nativelib href="native/lwjgl_native_mac.jar"/>
 </resources>

 <component-desc />
</jnlp>


Notice the component-desc tag, from what I've understood this defines this as a library.
I don't know, I'd think this would be a nice feature.
I also supplied a screen from javaws, to show you the nice Application: LWJGL - Extension Type: Library
igg -- Take me off for great justice?

Matzon

thanks - I'll look into this for 1.0, pending any bandwidth issues

Evil-Devil

As for the bandwidth it would fine if the game hoster have a copy of the library version that is needed. So the LWJGL team can save some bandwidth :)

Or is it not possible to add alternative download sources to a jnpl file?

Sardtok

I'm not sure,
I just got back into computer development, my last game was made 5 years ago and now I'm working on a remake with better graphics.
I just noticed this system when looking at JOGL, and I figured that for small games like mine (the original was about 250KB), adding an extra 1 MB to each one would be a bad idea, especially if you have several small games that use the same library.

I can see how this could become a problem bandwidth-wise, maybe you could get www.java.com to host it considering they're Sun's java gaming website, more or less.
They should have enough bandwidth to deal with something like this, and I'm pretty sure they'd love to support development of new games.
It's worth a try anyway.
Or javagaming.org for that matter.

I don't think it's possible to use alternative download sources, as if there are any changes made to the contents of the jnlp file it will be identified as updated and the jars would be redownloaded, or at least I think so.
igg -- Take me off for great justice?

oNyx

The overhead for the lib with windows natives is only like 330kb (mac 291 and linux 336) with pack200 compression. With fmod and devil it would be a bit more tho... maybe around 0.5mb.

Sardtok

Hmm, yeah, mine aren't compressed, I could try doing that.
It's not a problem for me anyway, as I've already done an extension, so if I make more than one game, they can all use the same one...
I can live with the bandwidth even if I got a few thousand new users, as I've got a few GB/month that I'm not using...
(I'm maybe using 200MB out of 10-12 GB)...
But I'm using about 50% of my web storage (400MB)...
igg -- Take me off for great justice?