Java Applets now supported on Kongregate!

Opera huh?

Cas :slight_smile:

Naturally :slight_smile:

opera is totally crap when it comes to java support, signed applets no longer work with it since opera 10 and yeh it doesn’t remember the certificate you just accepted, so you’ll get a certificate for each signed jar you put into the classloader.

@princec very nice, are you using the standard appletloader or a custom version ?

[quote]opera is totally crap when it comes to java support
[/quote]
Yep!

Standard version, but I think a couple of iterations out-of-date.

Cas :slight_smile:

[quote]My games are already ported to applets, I’m just not releasing them until there’s a viable place to do so.
[/quote]
Chicken or the egg my friend… chicken or the egg…

I think gamejolt is doing really good and could well be that site. The admin’s are really nice and know how to build contacts and networks. The community around the site is growing really fast, they now usually have about 200 ppl on at any given time which IMO is pretty impressive (given that it only opened recently).

Get your game on there, pull a few strings to get some coverage on sites like indiegames blog and other indie game sites, then contact kongregate, show them your award portfolio, i’m sure it’ll be an offer they can’t refuse :slight_smile:

I just got a white screen and when I tab over a piece of Javagaming frozen in the screen…:frowning:

May I enquire as to your system specs?

Cas :slight_smile:

Sure, Core 2 Duo 2.40ghz, 4gb ram, 64 bit (not sure if that matters) and a 9800 Gs graphics card…(let me know if you need something else this is what i just got from system :P)

also I got these errors.

Exception in thread "Thread-13" java.lang.NoClassDefFoundError: Lnet/puppygames/applet/News;
	at java.lang.Class.getDeclaredFields0(Native Method)
	at java.lang.Class.privateGetDeclaredFields(Unknown Source)
	at java.lang.Class.getDeclaredField(Unknown Source)
	at java.io.ObjectStreamClass.getDeclaredSUID(Unknown Source)
	at java.io.ObjectStreamClass.access$700(Unknown Source)
	at java.io.ObjectStreamClass$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.io.ObjectStreamClass.<init>(Unknown Source)
	at java.io.ObjectStreamClass.lookup(Unknown Source)
	at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at java.util.ArrayList.readObject(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at com.shavenpuppy.jglib.Resources.load(Resources.java:356)
	at net.puppygames.applet.Game.init(Game.java:474)
	at net.puppygames.applet.Applet$2.run(Applet.java:70)
Caused by: java.lang.ClassNotFoundException: net.puppygames.applet.News
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	... 30 more
Caused by: java.io.IOException: open HTTP connection failed:http://www.puppygames.net/applets/test/net/puppygames/applet/News.class
	at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	... 34 more

XP? Vista? Mac? Browser? Java version?

Anyway, this is kinda typical of the Java experience isn’t it :confused:

Cas :slight_smile:

Wow, yea I feel like a complete noob for leaving that info out… Windows 7, Firefox 3.5, and java version 1.6.0_17

and yea, this isnt really helping this threads case…sorry for the derail guys.

Well, indeed :frowning: The thing is - Ultratron is pretty rock solid code (apart from that exception, but it was only a test applet and I don’t need to fix that). It’s been out there since 2005, and the only thing that breaks it normally is entirely missing OpenGL drivers, ie. totally vanilla unpatched XP machines, more or less. But, put it in an applet, even with the (almost) latest JVM, and… boom, broken. I mean, how bloody hard can this be??

Cas :slight_smile:

Would you like Ultratron on Android?

Oh yes, and Titan Attacks and Droid Assault (though I fear DA is a bit beyond android).

Cas :slight_smile:

really its not that hard, however there are a few big pitfalls you need to watch out for. (someone should really create a list somewhere)

  • remember your not running a pure Display anymore, it may not seem like it but applets have some AWT graphics code, which is enabled but not used. So adding the following applet parameter
<param name="java_arguments" value="-Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false -Dsun.java2d.pmoffscreen=false">

should pretty much kill any hardware acceleration it may try to use, avoiding any driver clash or problems that may occur between awt and lwjgl on weak drivers.

  • don’t use any System.exit(0)'s in your code, as that will kill the plugin - yes the the ultratron applets has a few of those :slight_smile:

  • for stability always use

  • unrelated - just curious, why the does the Ultratron applets have ?, you can’t see any AWT components, let along drag them :slight_smile:

  • unrelated(2) - @princec in Ultratron how are you doing the really smooth mouse cursor, when mouse is grabbed? is that just drawing an image at Mouse.getX()/getY() ? or some sort of native cursor?

  • relatively speaking princec is using a really old version of lwjgl, lots of bugs were killed especially for applets in more recent releases of lwjgl, ranging from corrupt file downloads to memory leaks. You should really use lwjgl 2.2.2+ (yes out soon :)) if you want nice lwjgl applets :slight_smile:

@Swattkidd7 do other lwjgl applets work for you or do they all fail? e.g. Minecraft or Final Kapster

That might be, but the reason they gave Markus was:

Even Unity seems to be a plugin that Just Workstm, but it will almost certainly be a plugin they will have to install. But yep, shame java is the only platform that has these big stability issues. >:(

So the LWJGL plugin seemed like a really good idea, but then again, princecs lwjgl applet also give me a white screen. I first saw the bootloader for a split sec, and then white. The console showed:

java.util.zip.ZipException: unknown compression method
	at java.util.zip.InflaterInputStream.read(Unknown Source)
	at java.io.BufferedInputStream.fill(Unknown Source)
	at java.io.BufferedInputStream.read(Unknown Source)
	at sun.awt.image.PNGImageDecoder.produceImage(Unknown Source)
	at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
	at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
	at sun.awt.image.ImageFetcher.run(Unknown Source)
Applet INIT
Applet START
display_parent.isDisplayable() = true
Exception in thread "Thread-14" java.lang.NoClassDefFoundError: Lnet/puppygames/applet/News;

Not sure if the first part was just something extra that I got, but seems relevant to the NoClassDef.
WinXP, FF 3.5 & Chrome, Java 1.6.0_17, Mobile Intel 965 Express (Could be the problem). Cleaned the java cache. Final Kapster works fine though pretty sure Minecraft did as well.

Edit: Spelling

pretty sure thats a bug thats been fixed in a newer lwjgl release. (just means you got a corrupt download)

It might even kill the browser with all the other tabs, so this is really bad for user retention ;). Very dangerous when you use the same codebase for both applet and application, since it is easy to forget… (I know :wink: )

Psst over here. Feel free to add more as well. Read more

Or better yet, games4j.com. It even has a great wiki :wink:

Yup, I think I had that problem with this laptop before (and the pixel format bug as well), so it is very likely.