Very simple sample applet?

Hey all,

Up to this point I’ve used LWJGL purely for Webstart applications. I had a look at what you need to do to get it going in an Applet and couldn’t find anything that was particularly simple. Pretty much what I’m looking for is a LWJGL skeleton Applet so that I can just tack stuff onto it as wanted. Example games, etc. are not desired as I don’t want to deal with figuring out what needs to be stripped out and what doesn’t, if possible.

Thanks a bunch.

Iv been fiddling alot with the LWGJL AppletLoader. And am going to write a tutorial on “Getting the most out of your LWJGL Applet”

currently you use LWJGL in an applet as you would in a frame. The challenge comes when deploying the applet.
I just got a few un answered questions on the LWJGL forum about the applet, once i get them resloved Ill start with the tutorials.

The default starting point is usually the the GearsApplet. Its pretty much the same as a normal applet except note how the canvas addNotify() and removeNotify() methods are used to create/destroy the Display and that the game and loop is run in another thread (from the applet). This is mostly done to make sure the canvas is ready before the display is created and if it does blow up for some reason, won’t take the browser with it :slight_smile: (at least on plugin1). Other then that the Display and LWJGL is pretty much used as a how you use a normal LWJGL native Display.

nice, looking forward to it.

Cool, the Gears demo there looks like it’ll do the trick just fine. I had to put in a classpath run variable (which I never had to do when running as an app in Eclipse) but that’s no big deal. Thanks again.

i have uploaded an applet shell as part of my tutorials, there still very raw (only finished the first 1), and need alot of improvement.

but the applet code is fine: Lesson01
the source code is at the bottom of the page

Cool! Later I’ll post the skeleton applet I made from the gears thing, with a fixed timestep loop included.

Looks like this:

http://sourceforge.net/projects/java-game-lib/files/Official%20Releases/LWJGL%202.4.2/lwjgl_applet-2.4.2.zip/download

Has the HTML, natives, and signed binaries for use in an applet file. Going to give it a try later.