About Puzzle

This is my Java Applet implementation of the children's sliding puzzle game. The first version of this game for a computer that I am aware of was on the original MacIntosh, and I'm sure some people bought the machine just to have the game. I have implemented the sliding puzzle game seven or eight times now. Previous versions have been written in 68000 assembler, 80x8x assembler, Pascal, ex, C, and C++. This version is written in a combination of Java and NetRexx. A pure java version of this implementation was an early customer demo program on IBM's first Java. I have also written a pure netRexx version.

This version features a size selection interface written in HTML and frame controls implemented with JavaScript. Even with this combination of ingredients, however, is is largely a Java implementation. NetRexx, in this implementation, is a Java extension that provides some additional programming options. The HTML and JavaScript are really just packaging around what is probably my most general implementation of this game.

I am no language purist. Programming languages are like painters palettes. Watercolors, oils, acrylics, charcoals, and other materials each have somewhat different working characteristics and create different effects on the canvas. You can create a picture with any of them alone, but some effects are best acheived by using them in combination. When I build software, I am in the business of using tools to build tools. Just as I use different tools from my workshop inventory (hammers, saws, screwdrivers, paint brushes, etc) to do do different kinds of building tasks, so I use different tools from my programming inventory to handle different kinds of programming problems. Puzzle is something of an exception here. I have repeatedly used the game as a learning testbed for understanding the capabilities of different programming languages. As a result, none of my puzzle implementations are ports from other languages. I built each around the functionality the language offered.

The most interesting feature, in the Java implementations, came from the Java layout manager functionality. Somewhat unusually, I think (based on what I've seen out there, this implementation relies heavily on a custom layout manager that I wrote to manage the puzzle pieces. Implementation of the layout manager set up this versions most interesting capability, its open extensibility for size. I have tested this version with arrays as big as 20 by 20 and completed the puzzle for arrays as big as 18 by 16 (a time consuming puzzle to complete, by the way). Java had no trouble with it, even on the 33Mhz 486 OS/2 machine that I originally ran it on. I was impressed. I hope you are too.