JOGLAppletLauncher v2.0

Hi,

I’ve been quiet on that subject … but I’m back with ideas I’d like to add :

My goal is to improve user feedback while loading a game, so I’d like to have :

  • a kind of joglAppletBootstrap.jar , signed, containing the applet launcher and a few things to manage jar downloads
  • a cache system based on the one used by the native libraries, bypassing the unadapted plugin download behaviour (“freeze until everything is downloaded”)
  • a versionning system for the main jogl.jar, beeing able to get it from java.net instead of the game site, thus enabling sharing it across web sites
  • an improved “waiting for download” sequence, implemented as a separate jar letting the developper choose how the download is rendered (i.e. paint a progress bar, paint an animation, show an ad, …)

With these things, the user experience would become :

  • go to a page where a game is
  • java plug-in starts, loads the bootstrap in 2 seconds, ask for a signature grant, loads the user animation in another second, and then plays the user animation
  • in the background, the jogl version is checked against java.net (optional) and redownloaded if not cached
  • then the game jars are downloaded, the user animation is informed of the download status
  • native libs are also installed
  • then the animation ends and the game starts

For big games like the one I’m working on (multi megabytes), the user experience would become as convenient as the flash downloads, instead of the boring java cup / progress bar. And this could be a great improvement for technology adoption.

I’m prepared to develop everything, if Sun agrees to commit these changes and create this new signed bootstrap jar.

Would anybody (and Sun) be interested by this project ? Ken ?

Lilian :slight_smile:

It would certainly be a nice thing to have, but one thing I would like to see added to the list is support for unsigned applets:
(The current) JOGLAppletLoader wraps the real applet, forging the game to load using the signed jogl.jar and confronting the user with a security message.

We needed something that allowed us to boot our unsigned applet, and have an option ingame to switch to JOGL (thus throwing a security warning only until the user requests to use opengl rendering). We ended up modifying the joglappletlauncher to allow doing this on request. This worked fine (see an example here: http://dzzd.net/demo/QUAKE , press ‘h’ when the demo runs to switch to opengl rendering)

Problem is that it requires to maintain/compile/sign our custom version of jogl.jar, so it would be nice if something similar could be included in this project… (I still have the source for that modified joglappletloader floating around somewhere)

-Thijs

That won’t work in my context : the bootstrap class has to install a security manager and a class loader…

What you need is a “JOGLStarter” class (decoupled from the applet) which is used solely to install natives and is called on demand.

This could be done by refactoring the jogl applet launcher and put deployment in another class.

But you won’t benefit from the bootstrap loader (like : “playing a small puppy invaders while the jars get downloaded”).

Lilian :slight_smile:

Yup, I already hacked together such a JOGLStarter class (see that demo). It would be nice to have it included in the package (when Sun would distribute it with JOGL) because that would save us the compiling/signing for each new jogl release (and buying an expensive certificate).

It wouldn’t take advantage of the other features you’re planning indeed. Runtime downloading/caching of files would have to be done through Sun’s facilities… however I found a workaround for Sun’s clumsy urlconnection implementation (where reading progress with caching enabled doesn’t work), it allows unsigned applets to cache any file in the plugin cache and read progress while downloading it… but the solution is kinda hairy :wink:

These sound like great suggestions. I agree that more work on the JOGL applet launcher mechanism would be beneficial to many users. A couple of questions:

What’s the specific problem being solved here? In the current JOGLAppletLauncher deployment scenario, the animated Java logo is displayed while the main jars (including the hypothetical multi-megabyte game jar) are downloaded. The only “freeze” occurs while the native libraries are downloaded and installed, which is typically pretty fast. Is the intent here just to provide an end users’ animation while downloading the main game? Or is there more to it?

That’s a very generous offer. If you can really commit to doing most of the work on this I’d be glad to help and would commit to deploying the bootstrap jar file. It is a requirement from my standpoint that the existing signing / security checks which are in the current applet launcher be maintained. We’d also need a signed contributor agreement (linked from the JOGL home page) from you in order to incorporate your work.

I would also like to see the bootstrap launcher be able to optionally support JOAL. I am planning to do some refactoring of JOGL’s code to use the new NativeLibrary class and GlueGen run-time native libraries in place of some stuff like the “DRI hack” currently in JOGL. This will impact the set of native libraries downloaded to the end user’s machine. Let me know when you’re getting ready to start work on this and we can coordinate.

Well, for a 5 megs download, the cofee cup can be really boring and last a long time (and the alternative is just a static image)… think about the fancy custom progress bars in flass animations, adapted to the graphics of the web page… not speaking of old 1.4 JVMS which don’t display progress IIRC.

Signed agreement: you already have one from last year… do you need another one ?

JOAL support : great !

I don’t know yet when I’ll start working on it : It might take some time, but I’ll tell you when I have something asap.

Lilian :slight_smile:

Hi all,

It is great to see that there is activities around jogl applets. I know that webstart is designed for deploy web java application but I still think that having an effective jgol applet issue will be very useful for java comunity and very pleasant for end-user (especially for toy web based game like the one that exist in flash). I am developping a little game site based on jogl applet (If you want to test the beta version of the games go to http://mathlamenace.free.fr/feeriehunt.html and http://mathlamenace.free.fr/feeriemots.html). In this scope, I am very interresting to the c_lilian propositions. But I have encounter some problems with jogl applets (I will post a thread for listing all the bugs I have encounter) and maybe I will be interresting first to enforce the stability of the current version of joglAppletLauncher !

Mathlamenace

hi,

calling methods of the unsigned applet from javascript would be great. this would make a better intergration into the website possible… also neat for alle the ajax stuff. (switch from google maps to google earth 3d applet :wink: ) maybe html elements could be used as gui for a 3d applet. But i dont know if there is a way to get access to the nested applet from browsers dom.

OK, I understand. Yes, this would be interesting to do for experimentation purposes if nothing else.

Unfortunately the agreement changed and we need the new one. If you could scan and email it to me again I’d appreciate it. I’ll send you an email offline about this.

Actually thinking about this more I think it would be absolutely awesome if we could specify standard extensions the applet is going to use using the same JNLP file used by Java Web Start. This would imply writing a JNLP parser in Java for the bootstrap jar and basically implementing some of Web Start in it. While support like this is planned for future releases of Java I think it would be incredibly useful to try to support it as far back as 1.4 or 5.0 versions of the JRE in particular to avoid having to hardcode or respecify the resources used by the applet each time.

Please let me know when you’re getting closer to starting work on it and maybe we can collaborate.

Another nice thing to have would be support for pack200 format even for 1.4 applets (and in an easier way to declare it than this mime type/server protocol thing).

like <applet …
<deployment-files= “http://…game.jnlp,http://…extensions.jnlp”>
<deployment-format=“p200”> (or “jar” by default).

With p200, the jar files searched would directly be in .p200.gz format, even on web server where .htaccess or servlets aren’t available.

so, does anyone knows if there’s a free pack200 decoder available anywhere, of if the one in the JDK could be backported ?

Lilian :slight_smile:

I’ve asked a co-worker (actually the Pack200 designer) about this. There may be some possibility of dovetailing with the Java SE open-sourcing efforts that are in process. There also appears to be a partial implementation of the Pack200 specification in the Apache Harmony project, though it’s unclear what state it’s in.

Wow that would be Royal !

I’m going to try some things this week end (implementing a secure class loader based on our local disk cache, with threaded download of jars). I’ll post my results here if they are ok, or start a new thread if I have too many problems…

Lilian :slight_smile:

FYI, it looks like the Netx open-source project has support for launching applets (from the command line) described using JNLP syntax. In the context of wanting to do this with JOGL/JOAL applets, in particular to repurpose the Java Web Start extension JNLP files for these, I think Netx could be a useful resource.