They're moving to Flash, here's why...

Hi everyone,

We noticed a bit of traffic coming from here and I wanted to take a minute to respond. First of all, this forum has probably been the most reasonable discussion of this topic that I’ve seen so far. I applaud you all for your ability to understand the situation.

Most of you have touched on this but I can’t stress that the biggest problem is the user’s experience. It’s true that JOGL contributed to this, but I don’t believe JOGL is really the issue. Ken Russell actually chimed in on our blog and I honestly feel bad because he’s given us a lot of support and I really like JOGL.

As a couple of you have also mentioned, applet’s “basically work,” but there are lots of unforeseen issues. The percentage of our users that have Java is actually pretty high. Unfortunately, so is the percentage of them that have issues with Java. I mentioned on our blog that it’s really hard to get a frustrated user involved in a difficult QA process. They need to REALLY want to use your product. With so many people having these problems, you can spend a lot of energy trying to address them. As a startup, we don’t have the resources to do this. With Flash, most of that just goes away.

It has been really interesting following the community’s response to this. I love seeing the passion people display, regardless of whether or not they agree with our direction. I’ve stated before and I’ll state it here again: I hope that Java does succeed as a gaming platform. It’s just going to take a while to repair the damage.

At my day job, we’ve evaluated using Java for our games before. There would be some massive technical benefits from doing so, but unfortunately, it’s just not user friendly enough right now.
I should mention that our target user is a middle aged old woman. :wink:

I’m not really “guru” enough to make any comments about this, although reading this stuff on kev’s blog and his post here, its like a punch to the stomach lol, almost like we are losing one of our greatest supporters, or something like that lol…am I the only one :stuck_out_tongue:

(post wasn’t meant to anger, offend, or make you feel bad kev, just saying its kind of how it feels)

Shame, I was aiming for the face :slight_smile: - just not at you. I’m looking at because it happens to have turned up as my next technology to play with (imo a good developer checks out a new language/technology every 6-12 months). However, having looked at it and then then compared it to my experiences with simple browser based game development in Java I wanted to punch someone at Sun in the face.

That said, I’ve spent nearly 10 years of my spare time developing games in Java and I’m not expecting that to change any time soon. I’ll still be developing my bigger and desktop projects in Java since it’s so productive in these areas. However, if getting your games played is important to you (it is to me, don’t see how you can improve without quality and quantity feedback) and your developing web based games it’s a bit of a waste of precious spare time at the moment to be trying to use Java applets - unless of course, you’re just interested in the challenge. You can of course dress Java applets to look like flash (thats exactly what I did with Putty Puzzle) but thats a) extra work and b) not going to stop the random/odd failures that people still seem to get with applets.

Java rules in so many ways, it’s just that browser based games isn’t one of them. Pulpcore makes it a lot easier and Java FX might be great when it’s done, but right now my experiments over the last month or so are telling me Flash is the right tool for the job.

As supporters etc, it’s not a war after all. We don’t have to defend Java or attack Flash. They’re both just technologies among a sea of others. We’re all just game developers trying to get our ideas implemented and played. We can only choose based on technicalities, prejudging things based on a moral obligation to one technology or another isn’t sensible.

Just look at Sun’s big news, Project Darkstar. Clients for Java, C, Flash and anything else that might make them some money. Now thats sensible.

Kev

I’ve been thinking about this for a few… minutes.

It’s so darn easy to ‘roll your own’ these days, with URL protocol handlers like that .FX project used:
fx://mystuff/
which launches your own application with the URL as first argument.

You ‘just’ have to get your own application (with embedded JRE) installed everywhere… (bummer) but after that the world is at your feet. No more plugin trouble, but unfortunately (?) also no applets embedded in the webpage. It’s simply JavaWebStart, without the mimetype problems and all other quirks (and bugs!).

I ‘rolled my own’ this way to provide an alternative for everybody that did not succeed in getting the applet to run.

All we need is some (game)platform with a name not in any way refering to ‘Java’, in which your average SecurityManager is enabled, every app runs in it’s own JVM. What else could we want, except the initial 14MB download.

Yup. 'Tis a piece of cake: https://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Plug-in_Development_Overview

I was looking at the possibility of stripping all unneeded classfiles out of the JRE to reduce the download size but it turns out that Sun’s license specifically forbid you from doing this. Still, I suppose I could do it and get away with it if I used Molebox to protect the exe. Molebox wraps your app, or game into a single exe. Most of the space taken up in the JRE bundle seems to be taken by the rt.jar file, which contains stacks of stuff that I don’t need.

As for shareendipity’s move to Flash, I can’t say I’m really surprised given the intensely awful end-user experience generated by the applets plugin and Java Webstart. Pulpcore applets are cool tho’. But as soon as you get into signing issues because your applet uses native libraries your gonna start scaring the user with nasty looking dialogs. Not really a good intro to a game, is it?

–Mario

Haha whew :D, but yea, I understand what you mean about a good programmer experimenting and using many different languages which are better for different jobs, and also have to agree that applets are…not great. I guess it was just a feeling of “we are loosing kevglass” lol, but yea your games are great so im happy that you have the ability to get them played and make money off them now with flash!

From the Microsoft/Sun press release today (http://www.reuters.com/article/marketsNews/idINN0943076320081110?rpc=44)

“Sun said the Java platform sits on more than 800 million personal computers around the world, or on 91 percent of Internet-connected PCs worldwide. The Java Runtime Environment is downloaded tens of millions times every month, Sun said.”

Not the raw numbers you are looking for, but at least a public statement.

-Chris

Nice… 91% is not too far away from the measurements already posted in this thread, and in the refered article.

The problem is that it is not guaranteed to work on 100% of that 91%, it’s more like 35-55% out of that 91%, resulting in 33-50% of installations with problems. I clearly recall Flash stuff on the www.java.com frontpage. Talking of which, the localisation of the current java.com pages is still CRAP, just like a year ago, it’s offendingly stupid phrasing to any non-english visitor.

So out of interest… what actually does go wrong when an applet starts? Anybody managed to get actual stats?

Cas :slight_smile:

I have a database with a few dozen MB of textual stats.

Applets like this will occasionally fail to print anything (it just hangs):


public class Something extends Applet
{
   public void init()
   {
      System.out.println("hello world");
   }
}

If you embed an applet dynamically via DOM, there is a 20% chance of a deadlock. Up on removal from the DOM tree, you get a NullPointerException with a stacktrace pointing to a method that is about to download a JAR.


java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at sun.plugin.ClassLoaderInfo.lock(Unknown Source) <----------------------
	at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
	at sun.applet.AppletPanel.runLoader(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

It can (and will) crash on displaying the JAR loading orange animation.


Exception in thread "Thread-27" java.lang.NullPointerException
	at sun.plugin.util.AnimationPanel.createTranslucentImage(Unknown Source)
	at sun.plugin.util.AnimationPanel.createGradientShapeImage(Unknown Source)
	at sun.plugin.util.AnimationPanel.initBackground(Unknown Source)
	at sun.plugin.util.AnimationPanel.preloadResources(Unknown Source)
	at sun.plugin.util.AnimationPanel.doPaint(Unknown Source)
	at sun.plugin.util.AnimationPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Innocent little Exception on inserting an applet in the DOM tree, in case it is not crashed already. After this the applet runs…


java.lang.NullPointerException
	at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
	at sun.applet.AppletPanel.runLoader(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

It can (and will) throw an AccessControlException in Firefox, on:


public class Somehting extends Applet
{
   public void init()
   {
      Runnable task = new Runnable()
      {
         public void run()
         {
            try{ new Socket("my.very.own.host", 80); } catch(IOException exc) { ... }
         }
      };
      new Thread(task).start();
   }
}

Except if the FIRST connection made to your own server, is on the EDT. OK?

Then there is the problem that the orange preloader gets stuck at 50%, forever.
Just reload the page, and try again.

And ofcouse the problem that truely nothing happens. The applet is white.
Just reload the page, and try again.

Further, classes don’t truely get unloaded. If you have classes that do a lot of precalculation, like creating a cos/sin lookup table and put it in a static field, and you refresh the page (and thus the applet) 10+ times, memory usage goes up very quickly, eventually slowing down your whole browser due to swapping. You can only restart your browser to get back to normal speed.
Also leaving a page with a super tiny 1x1px applet, only drawing a black pixel, it takes 2 seconds longer than leaving a normal page.

The LiveConnect bugs in FireFox cause your fancy features to either not work at all, or hang your browser.

Loading an applet GRABS FOCUS the hostile way, even if it does not have any ‘input components’. If you were just entering data in a form, or in the address bar, so what, now the applet consumes all your keystrokes, until you click somewhere else. It will even cause to window.toFront on your browser window.
Last but not least, loading an applet freezes your browser for 2-3 seconds, it feels so 1990.

In conclusion:
steer clear of applets if you are doing anything commercially

'Swhy I use Java for Webstart only.

Those DOM insertion/removal crashes are interesting. What code did you use to edit the DOM? innerHTML or the appendChild() methods? Did you see those Exceptions yourself or get them from users?

Yep. And confirming that those numbers are correct per Sun directly.

[quote]The problem is that it is not guaranteed to work on 100% of that 91%, it’s more like 35-55% out of that 91%, resulting in 33-50% of installations with problems.
[/quote]
And where do you get your numbers from? While that may be true in your particular case, I have not seen numbers like the 33-50% you have mentioned. Sorry, I have not personally seen it, not to say that there may be some Java applets out there that are more problematic than others.

[quote]I clearly recall Flash stuff on the www.java.com frontpage. Talking of which, the localisation of the current java.com pages is still CRAP, just like a year ago, it’s offendingly stupid phrasing to any non-english visitor.
[/quote]
Yep, there is some stuff on the font page of Java.com. There are some things that Flash is good for, some that it is not. As for the localization issues, I forwarded the comments from this thread to the person who manages the site. She replied to me and said she will look into this right away.

-Chris

OK, then I know how to see your posting.

It’s a rather complicated Applet, however, the first thing I do in the Applet::init() is to ‘ring home’ to the hosting server. The URL that is requested, logs every request to a database.
Further, with mod_rewrite (in apache), the mystuff.jar is not pointnig to the file, but to a script, that logs the request, and then streams the file. So the browser just gets the file, when the browser requests it.

Now the thing is, after 45 seconds (!), an AJAX call is made to the very same URL, with slightly different parameters, so that the server-script knows it’s the AJAX call ringing home.

So… now we have 3 moments we log something to the database:

  • up on downloading the JAR file (which is ‘optional’ as it may be cached)
  • up on having the webpage loaded for 45s (surely the applet must be loaded by now?)
  • up on the invocation of Applet::init() -> new Socket(“my.host”, 80);

Pretty solid eh? If you spot any obvious mistake in my logic, please tell.

Down to some statistics:
About 85% of our visitors (not hits, visitors!) downloads the JAR
About 98% of those indeed are 45s are longer on the page with the applet, so the AJAX call is received. (we seem to have very patient/relaxed visitors)
About 66% of the hits that received the AJAX call (after 45s on the page), managed to launch the applet AND the applet was able to ‘ring home’

~85% x ~66% = ~54% (this varies over time) of our users manage to run our Applet.

In case you wonder, the target audience is: Spain, people that customize their furniture (fancy closets) so middle-age, I guess ?
Spain is slightly lagging behind in the latest technologies, as for example MSIE 6.0 is still very widely used (like 40%), so that might explain the 85% vs 91% diff.

Note: the JAR requires java 1.4 or higher. Further, my stats are actually a bit too positive, as I record it as a success, if a visitor manages to launch the Applet 1 time, out of… all attempts - where the average hits per visit on that Applet-page it roughly 2,5.

[quote]The problem is that it is not guaranteed to work on 100% of that 91%, it’s more like 35-55% out of that 91%, resulting in 33-50% of installations with problems.
[/quote]
After reading so much here about how applets suck so bad, I wonder why I’ve never seen (or heard about) the JEmu2 applets to be not working other than because of not having java… :-\

The JWS version on the other hand often fails for different reasons (most of the time OpenGL related issues though). I actually made the applets for compatibility reasons and so far that’s working out quite well for me.

Am I lucky for doing something clever without knowing it, or am I just lucky for always being on the good 35% somehow, or is the applet too simple to trigger the plugin’s suckyness? The applets are still played more than a 1000 times a day on average…
I’m not saying that there are no applets that suffer from bad plugin related issues, but it’s just not what I’m seeing.

EDIT: And then I read Riven’s above post… ::slight_smile: I’m not doing complex things like that. I just have a straightforward applet (although it does contact the server to tell it ran or if it crashes)

Actually, out of roughly 60.000 hits on that Applet-page, and knowing that 50% of the times the applet could not ‘ring home’, we only got 1 complaint that it failed to load.

People simply just don’t bother to notify anyone.

Other than that, I think your website mainly attracts developers? (wild guess)

I regularly get complaints about the JWS/OpenGL version not working, although the applets are more popular. In fact of the roughly 1 million visitors I had, I never had a complaint about the applet.

I don’t know if the average user is a developer or not, but most of the feedback I receive is from people that just want to play the games and can’t figure out (or can’t be bothered with, or just don’t know) MAME.

I envy you.

Oo, it’s all doom and gloom today!
If the failure rate was as high as 50% then no developer would ever touch applets at all!

I’ve never done any serious analysis, but for a simple applet (1.4, no networking) I seem to get a failure rate of about 3-5% (‘just doesn’t work’). More people (~5%) report ‘poor performance’ but I’ve no way of knowing what else their machines are doing and as my apps tend to be processor-heavy I’m guessing that users multi-tasking is the problem.
I work on the assumption that 5-10% of people with java installed will have problems, which is not great but not a disaster for me.

A quick glance at the Runescape tech support forum suggests only moderate problems given the size of their user-base and that their major issues are loading resources & networking.