Monkey Fighter Monkey Fighter
Demo Help Help Search Search Shop Shop
code

Demo programming is the blending of technical competence with creative ingenuity. It is often done to demonstrate the capabilities of a system or coder. Sometime, it is just a way for a programmer to show off. In any case, the results should be pleasing to the audience. To me, demo programming is all of that and a lot of fun, too.


Applets

Plasma
Confetti

Tutorials

Plasma
Confetti

Java Game Programming
Developing Games in Java

Java Game Programming
Java Game Programming

Plasma
plasma

The Plasma applet is a visual effect demo where smooth color gradients slowly change. The applet should run smoothly on a P4 and I would expect good performance on a P3. The larger you make this applet, the slower the effect. And, keeping the mouse off the applet will make it run smoother.


The Plasma tutorial explains line by line how to write this applet. It demonstrates how to use the Java BufferedImage Class and how to write directly to the DataBuffer which is the most efficient way to update pixel data in Java. It also shows how many great demos have less than obvious algorithms.


Confetti
Confetti

The Confetti applet is a visual effects demo that is similar to confetti floating through air. If the mouse is off the applet, the confetti is distributed randomly. When the mouse is on the applet, the confetti follows the mouse spraying forth like a fountain. Additionally, the confetti inherits the vertical and horizontal momentum of the mouse creating the illusion of being flung from the mouse location.


The Confetti tutorial explains line by line how to write this applet. Like the Plasma tutorial, it shows how to write pixels directly to the DataBuffer. However, it also gives an example of using the Java 1.1 low-level event model.


Copyright © 2005, Robert Walsh, All Rights reserved.