Slick2D: Deploying a LWJGL Applet

2013-05-28 19:03:00 -0400
May 28th, 2013

Java Applet Pains

I recently had the pleasure of building a low-fi promotional video game. One of the requirements? The game needs to deploy as an in-browser Java Applet. When was the last time you created one of those?

LWJGL “nicely” allows you to deploy your game in different ways, while not drastically changing your game’s codebase. From the browser-based applet, standalone .jar executible, to the .jnlp web-start application; however, each has it’s own little quirks and frustrations.

I recall spending an evening completely befuddled as to why my game wasn’t deploying properly to the browser. I could run other java applets (a separate headache on linux, for sure) and followed any tutorial I could find on deploying applets. Key-signing files. You name it … futile.

Finally, I stumbled upon a combination that worked:

Make sure your main Slick2D class driving your game is called “MyGame”.