|
Perhaps the most interesting kind of animation that one can create is an animation that deals with geometric figures only because here we deal with actual drawing of these geometric figures and the pixel position of each of them is to be accurately determined to produce the desired effect. Also while moving them, a good system of ordering is to be built to see they don't get on top of each other and give rise to dirty smudging. I felt, that the best way to demonstrate geometric animation was to write a fully functional Game. Thus I wrote this Multi Threaded Game of Moving Boxes that functions in two different game modes. The Game will initially launch an interesting pattern drawn on 7 * 7 = 49 boxes with a button at the top to enable switching between the Game Modes. In the default game mode in which the game starts the boxes from random directions will smoothly slide in to the empty space within the group of boxes. On pressing on a moving box with mouse, the random sliding will stop. The random sliding starts again on pressing the box that last moved. Whatever be the position, on pushing the button at the top of this game applet labeled "Game Mode" the random sliding of the boxes will stop and now the uset can select only one of the four boxes around the empty space with hismouse and only this box will smoothly slide to the space. This way the player can try to restore the original pattern on the face of the applet. On pushing the Game Mode button again the game shifts to the default mode from the position where it was last left and the random slide of boxes in to the space will begin from this point where it is left by the user. I feel the player may also like to check his time while playing this game so whenever the mouse enters the applet region a clock will show up displaying the animated system time of the computer whatever be the type of the computer or operating system or the Time zone of the world in which this applet might be made to work. This window will stay as long as the mouse pointer stays inside the applet area and it automatically removes itself when the mouse pointer exits applet area. The clock window might go behind the current window when you click mouse on the browser or the applet to bring it to the top and make it the current window, but still, this clock will remain active as long as it should remain that way (you will find it in your task bar). Take the link below to play this Game and when you want to come back to this page, push the back button at the top left region of your browser. WELCOME TO THE GAME OF MOVING BOXES.
|