The Ultimate Jigsaw Puzzle
Top Rated by JARS: http://jars.developer.com/classes/jresout.cgi?resource=3301



Introduction:

The 'Ultimate Jigsaw Puzzle' is the very first applet, I wrote as part of my Java learning process. This on-line version of the Jigsaw puzzle deviates from the conventional board game in several respects. It allows U to specify the Image to be used for the puzzle and lets U define the complexity of the game by specifying how many pieces U want to break the image into.

Players Guide:

The game interface is quite intuitive, as U would have already discovered by now. If U do not see any images when U first load this page, do not despair, my good friend. Help comes in the form of the Refresh button. Click on it and lo & behold, the images will appear on the applet, mysteriously. The second option is to click on Solve and then on Scramble. As we R dealing with a lot of images, sometimes the applet loading is faster than the image loading. U will see that initially the puzzle is already scrambled("Oh! So that explains the disabled Scramble button"). U can start moving the pieces around by clicking to select, dragging and dropping them. As U R playing, any of the following events could be triggered:
Anticipating the possibility of such a situation, and to save U from the dangers of a severe nervous breakdown, I have also provided a Solve button. Ain't I sweet? Click on it, sit back and enjoy the small ballet, performed by the pieces as they slide back home. This, folks, is exactly wot we mean when we say - Poetry in motion.
Click on the Scramble button and watch the pieces disperse and get ready for another game
'But wot about the button in the center?' U may ask. Ah, U noticed. That, my dear, is the current local time, to remind U that how time flies when U R having a Blast with The Ultimate Jigsaw Puzzle. If U R wondering, wot the Sky-Diving image in the puzzle, is all about go ahead and read the whole story about my Sky-Diving experience.


Technical Stuff:

This applet uses Image processing logic and image filter APIs heavily to accomplish its task. Crude artificial-intelligence techniques R used to identify, if all pieces R in the correct relative positions. If so, then the applet takes over the job of completing the puzzle for U. The cool animation sequence that U see in the end when the jigsaw puzzle is magically solved, relies upon the multi-threading features of Java, to simultaneously move all pieces to their final locations. The image source and the number of pieces to break it into can be specified by defining the IMAGE, ROWS and COLUMNS parameters in the HTML page that contains the applet. Of course, if U R too lazy, U can skip these parameters and just use the default parameters defined within the Java code:

Security Considerations and Limitations:


Feedback:

Alrighty then! U have had enuff time to ogle at the beauty, flexibility and the capabilities of the 'Ultimate Jigsaw Puzzle'. If U have any questions, suggestions or feedback regarding anything even remotely connected to this, please send me a mail at [email protected]

Another Java application that U may find interesting is the Network Tic-Tac-Toe.

Back to the Main Page
Hosted by www.Geocities.ws

1