Java Applets for Games?

What happened to Java Applets? Does it still make sense to provide a game as Java Applet in addition to Java Webstart?

I personally think Java Webstart is better, but what about people that play games that don’t know much about Java? “Outsiders” might only know about Applets and can get confused if a program starts as Webstart? I wrote my code so I can actually run my game as Applet if I like, so one might wonder?

I think it really depends on the game. There is no mechanism for downloading native libraries with Applets, so you really ought to stick to Java2D. This means no 3D support and a fair amount of overhead on each awt call. Applets must load fast (or the user thinks it’s broken), which limits the amount of graphic and sound resources that can be put directly in the archive. You can pull them in later programmatically from the webserver, but only a limited number of file types are cached. This would up your server bandwidth, although you can always get your server to lie about the file types, to ensure generic data files also get cached. Also, since Applets can’t go fullscreen, they are best for the kind of casual games that don’t need that.

So… Small simple games still work ok as Applets. Huge 3D graphic masterpieces are better as webstart.

Alan

Some people also don’t have Webstart - they have to use Applets (ok they could download a new jre, but thats a totally different issue)

According to Sun, those people are officially a small minority. For most games, they are less likely to be in your target market. Bear in mind you’re talking about people who are running software that is now 8 years old.

To the OP, I don’t see the point in a poll on this. There is only one answer - yes of course people still play applets. Millions of them play each day. Just do a brief bit of research with google into the people playing games on places like popcap and yahoo games, and if you like add in individual games like runescape.

But all those are like that for historic reasons, and tend to be old games. If you’re targetting portals, you’re unlikely to have any choice - you’ll only be allowed to use an applet - but otherwise new games shouldn’t generally be considering applets. Either use webstart, or something proprietary because some aspect of webstart is insufficient for your needs.

[quote]According to Sun, those people are officially a small minority
[/quote]
Have they released some official statistics? Where can we find it?

I would like to see that statistic too. Do you have a link?

[quote]According to Sun, those people are officially a small minority
[/quote]
He maybe means The Sun newspaper ;D

[quote=“Matlu,post:7,topic:25332”]
Must have been on page 4 or above, I never get farther than page 3. ;D

* blahblahblahh hopes ChrisM is reading this thread - he recently promised again to get the info for us :slight_smile:

I am reading and I am still getting trying to get the proper numbers out to you :slight_smile:

-Chris

joglAppletLauncher give you an ability to use native accelarated graphics using opengl, it is signed so no dialog windows for security reasons will apear, maybe it is quite huge file to download like jogl.jar, os natives etc but they are downloaded only once, and stored on user hdd.
here you will find some working example:
https://jogl-demos.dev.java.net/applettest.html

and here another one : http://www.javapause.com/games/jack ;D

The jogl part is (thanks to pack200) :

  • jogl.jar : 262 Kb
  • native libs : not packed200 as unpacking is not implemented in JOGLAppletLauncher : 57 Kb on windows, 123kb on mac os, 174 Kb on linux

for java 1.4 users, numbers are 884 Kb for jogl.jar, and the same for native libs.

Lilian

how have you implemented pack200 for jogl.jar, on server side or what? becouse users that do not have java 1.5 or newear must have normal jar

Simple apache multiviews on server side. I serve jars for normal downloads and pack200-gzipped files for java 1.5

It’s just a .htaccess to add (provided your host runs apache) and .var files (proxies) to specify which file to serve depending on client requests.

Lilian