Star Field
A simple rotating starfield: 2,500 stars flying towards you, growing and brightening as they get closer. Every few seconds the field starts to roll.
Archive · 1998–2006
Some old Java stuff I did years ago: small real-time effects that ran as applets in the browser, drawn pixel by pixel into an image buffer.
Applets don't run in browsers any more
Java applet support was removed from all browsers years ago. To see the effects in motion, try the HTML5 versions in the Lab, ported from this code by AI. The original source is still available below.
A simple rotating starfield: 2,500 stars flying towards you, growing and brightening as they get closer. Every few seconds the field starts to roll.
A small water simulation. Drag with the left mouse button to stir the surface. Right button toggles rain, middle button a rotating vortex. A variant, WaterPix, refracts a picture through the ripples.
Seven coloured plasma blobs bouncing around and melting together, each one slowly pulsing in brightness.
Field lines between moving positive and negative charges, traced step by step from each charge every frame.
All effects share one applet, FxBase. It owns the image buffer, the render loop and the mouse events, and loads the effect class named in the FXPLUGINNAME applet parameter. Each effect implements the FxFace interface. To create a new one, write a class that implements FxFace and pass its name to the base applet.
The zip contains the source of every effect, including two that never made it to the page (FxStarsBlob and a FxTester). The code was rebuilt with the Eclipse IDE in 2006.
/**
* FxFace interface definition
* Main interface for effects "plugin" classes
* BlackLizard - 1998-2006
*/
public interface FxFace {
public int FxStart( final Applet parentApplet, final String strArParams[][],
final int iParamNum, final WritableRaster renderDevice,
Dimension size );
public int FxStop();
public void FxRender( int mouseX, int mouseY, int modifiersMask,
int mouseClickCount );
public void FxMouseClicked( int mouseX, int mouseY, int iClickedButton );
}