Java Applets. Problems? What problems?

Time to start my first thread after years of lurking in the shadows.

Have to say I am a bit confused with most of the negative comments about Java Applets I have seen on various threads recently.
Not quite sure what all the unknown issues ppl are talking about are? Anyone care to elaborate on this (am talking applets in general, not issues regarding the use of Native Libraries or specific hardware)?

For me personally I only develop games in Applets for various reasons:

  • Obvious reason is audience (ie. Browser based and better user-experience, how many non-java people play JWS games?)
  • The games I like to play/develop (Puzzle, Board, Cards, Simple Arcade) can easily be done in Java2D or any other API that provides easy applet support (e.g Using GTGE I get my games working in applets in about 2-3mins!). Of course for more complex games Native Libraries are needed, no argument there… I simply just dont use them due to the security pop-up!
  • JWS in my experience has been bad… On the 30-40 games I tried running on here from the User ShowCase only around 50% work… (Most load but dont start up, no messages in Java Console, tbh never really investigated the cause of this, just gave up on this!). In the 4-5 years have been dabbling with Applets I have very rarely seen such problems.
  • Applets are very easy to deploy. Export to .jar in eclipse, a few copy/paste lines of HTML and hey, you have a browser game! Admittidly the first time was a bit painfull, but once you get over the 1st hurdle its pretty painless…

Of course there are a lot of crap applets out there (mainly due to ugly aesthetic nature of swing, programmers lack of artistic ability etc) and applets that dont load (in my experience mostly due to programmers lack of understanding on how to deploy or code compiled against wrong JDK etc) but we cant blame Applets for that can we?

Pff… what ‘unknown issues’ ?

Use the search function of this forum.

I’ve posted so many obscure stacktraces that it isn’t funny.

I’ve seen to many gray boxes on web pages to have any real faith in Java Applets.
Isn’t this an annoying thing to do? ;D

I use applets and have very little problems with them.
I’ve never had the “can’t connect to host” issue riven mentions, for example.

The issues I have with Applets (as posted in the Flash thread) are not generally technical. When I’m comparing to my recent experiences in flash I get:

a) Applets are slow to start up in general - turning a lot of people away.
b) Java in the web page has a very bad name - turning a lot of people away.
c) Most importantly, there is close to no support for Applets on the massive number of games portals out there, which is where the majority of people like me could make money.

I don’t think Applets are terrible, I just think for the target (browser based causal games) Flash is much much better fit at the moment. Use the right tool for the job.

Of course if you’re trying to do something far more ornate then an Applet might be right up your street, personally I’d go desktop application via webstart in that case though.

Kev

Having said that, I am right now playing Ultratron in another tab here :slight_smile:
Well, it’s paused obviously coz I’d be dead in 2 seconds but you get the idea!
I have a few problems with shutdown to figure out and then I shall release it on to an unsuspecting internet to gather stats and feedback…

Cas :slight_smile:

Have a look at this:

http://www.puppygames.net/applets/test/

It’s big right now - haven’t optimised it for applets, should be able to cut out another 3mb or so - and it misbehaves a bit on shutdown and seems not to work properly in Chrome. But it’s nearly there!

Cas :slight_smile:

cool, no need click a YES button :smiley:

but:

Applet INIT
Applet START
display_parent.isDisplayable() = true
Fri Nov 14 14:02:02 CET 2008 Game: Ultratron 2.2
Serial 5506886773373915136
java.lang.NullPointerException: Resource configurations was not found.
	at com.shavenpuppy.jglib.Resources.peek(Resources.java:122)
	at net.puppygames.applet.Game.createConfiguration(Game.java:1401)
	at net.puppygames.applet.Game.init(Game.java:520)
	at net.puppygames.applet.Applet$2.run(Applet.java:70)

some math

[quote]a) Applets are slow to start up in general - turning a lot of people away.
[/quote]
b=a

[quote]b) Java in the web page has a very bad name - turning a lot of people away.
[/quote]
c=a+b

[quote]c) Most importantly, there is close to no support for Applets on the massive number of games portals out there, which is where the majority of people like me could make money.
[/quote]
c=2*a

Exact same thing except Serial 5345179363541679104

@princec, same exception as Hansdampf.

@Riven, No search required. I check these forums nearly every day and even remember reading your post. Never had such problems so cant comment further.

@mgianota. Have seen many grey boxes myself, most of these seem to be pretty basic deploy errors in my experience (always have Java Console pop-up when an applet loads). Unfortunately this does give a bad impression of applets I agree.

Regarding the speed… Are they really that slow?
A very basic applet (2 jars, GTGE API 128k, 12K for the game) loads in about 5-6 seconds here (both at work and here at home)
eg. http://www.stephenoreilly.net/BugTrap.html

Most of my applets are < 300K (midi for music, small .wavs for effects, spritesheets, 1 api etc) and seem to load fast on most pc’s have tried. Of course they are pretty basic, for anything more sophisticated applets are not the way (right tool for right job as Kevin rightly mentions) but this can’t be a criticism…

With regards to Flash, well no arguments there… Theres no comparison, if I didnt like Java so much would switch and isnt that why we are here… Anyway, thats my 2cents. Just wanted to get it off my chest after reading so much Applet negativity recently. Anyway, Friday night!! No coding 2nite, time for the pub :slight_smile:

So says the developer using Mochiads in his flash games :slight_smile:
That adds like 10-30 seconds to the load time!

Interesting. Whats the visits on your site vs. visits of your games on the portals? Is the CPM better?

Let’s not make this a fight. First, it’s about how long it is til the player sees something that makes them thing there’s a game coming - hence all that web 2.0 loader JS in the pulpcore stuff. Second, I’m hardly what you’d call an experienced Flash developer. What I have seen points to not making much money from ads in comparison to sponsorship - which requires you’re compatible with what sponsors want. I’ll probably not be using ads at all, and if they are they’ll be CPMStar not Mochi.

The generic applet’s presentation before it’s got going is horrible currently. First there’s a blank area on the screen for a short time. Normally in this time I find my browser doesn’t respond to changing tabs etc. Next the Java loading logo appears - it doesn’t scale to fit the area and doesn’t actually update in line with loading. Most of the time I see it very very slowly moving followed by disappearing before it’s even reached the middle of the progress bar, let alone the end.

Now I realise you’ve fixed most of these issues in PulpCore - hence me consistently pointed anyone wanted to do applets at it. However, I still think they’d be jumping through extra hoops to get something working that they’ll find harder to get distributed.

Well, as you point out on a few of my last efforts in Flash I’ve used MochiAds, so using the statistics there. Even using the “please distribute my games mr mochi ads” button I get about 400-500x the number of views from portals than I do from my own site (which of course isn’t that much of surprise). CPM wise my site sits about in the middle of the massive variance across the portals that are dumb enough to accept the sort of crap that I’m currently rolling out in Flash.

Sponsorship seems more lucrative right now, it was a post here (which I can’t find currently) that made me consider Flash at all. Someone’s brother had written a cowboy shoot out game which while cute would probably take most of the developers here an evening or so to write. They’d be paid $1000 out right to have it sponsored. A few evenings work and some paper work = $1000, seems like a plan to me :slight_smile:

Having been through this process now I can say it’s not quite that simple, but it is possible. Again, I’m sure you can get Java games sponsored if you get the right person at the right time, but it’s considerably harder.

Kev

A new exception from my attempt:

Maybe it’s a Mac problem with OpenAL?

Or are you deliberately trying to make a point here? :wink:

You’re right Kev, Java loading does suck. Luckily all the loading madness is fixed in 6u10. (pack.gz, animated splash screens, quickstarter) so moving forward it won’t be so bad.

Having “please distribute my games mr mochi ads” button is pretty powerful. But sponsorship, I’m not so convinced, because ad revenue can be greater than the initial sponsorship income in the medium-to-long-term. I’d have lost money if Milpa was sponsored - it’s a nice initial sum, but I would have gotten less visits in the long run if the game was on multiple sites.

Oh sorry forgot to mention… LWJGL got BROKEN for Mac and Linux in the 2.0 release (cough cough Matzoooooooooooooon!!! FIx! Fix! fix!)

I’ll be trying to get to the bottom of the other strange errors over the next week or so. See this stuff is bloody fiddly compared to just dumping a SWF on webserver :confused: … but then again… it’s proper gameage here.

Cas :slight_smile:

I can’t play it. :-\ The screen shots for your games look really good too. That’s why I want to write pure Java because the native libraries fail on some machines.

I wish someone would write a good shooter in pure Java so that I could see what can be done. Attack of the Meeplings wasn’t bad, but it didn’t really have much in the way of effects to make it more interesting.

–Mario

What drivers exactly do you have in there? On what chipset?

Cas :slight_smile:

I have the ATI Radeon Xpress 1100 chipset with a DirectX 7 driver. Unfortunately, the card doesn’t seem to support OpenGL: the driver software says that OpenGL is unavailable. It is the latest driver software package from AMD for my card too.

The machine is a laptop so I can’t just go out and buy an NVidia card. I guess I’ll have to buy a proper machine.

–Mario

The applet doesn’t work for me either. I’m getting the same error as has been mentioned above: ‘java.lang.NullPointerException: Resource configurations was not found.’ etc…
Are you sure that applet is working?

I downloaded gravitron2 and it ran at a ridiculous 350-480 fps on my 4870 :slight_smile: