Introduction. ------------- MUIMine is a clear the mine field game similar to X-Mines on an X-Windows machine or Minesweeper on MS-Windows. The object of the game is to locate and flag all the mines in a rectangular mine field and to uncover all the unmined cells in the mine field. Features of MUIMine include :- - Saves the best three times for each difficulty level. - Difficulty levels can be set up by the user, new levels may be added and existing levels (including the default levels) may be deleted or modified as the user wishes. - Game graphics are located in external files so they can be replaced or modified as the user desires. - It's freeware (who'd pay for it anyway ?). Requirements :- - AmigaDOS V3.0 or later - MUI V3.6 or later (was deveolped under MUI V3.8 using V3.6 autodocs, may work with earlier versions) Copyright and Distribution -------------------------- MUIMine is copyright by the author, Geoffrey Whaite. The MUIMine archive can be redistributed without permission as long as the following rules are adhered to :- - No charge is made apart from a reasonable fee for handling and distribution, reasonable in this case shall be determined by the aurthor. - The archive is unmodified with the following exceptions :- . The source code may be omitted to save space as long as a text file is included explaining that the source code is missing and indicating where the full archive may be obtained (such as Aminet). . Extra graphic files may be included and the installation script may be modified to account for these extra files. . Extra language catalogs may be included and the installation script may be modified to account for these extra catalogs. Although the source code is included and you may modify MUIMine or use parts of the source code in your own programs I request that no modified versions of MUIMine be distributed. If you have made any changes that you consider worthwhile please send them to the author for inclusion in a later release. This is to help avoid the confusion that may result from having a number of custom variants of the program floating about. Any contributions made to the development of MUIMine will be duely credited. MUIMine is freeware, no payment is required for the use of MUIMine however contributions of good drugs and sexual favours from cute young women are always welcome. Playing the Game. ----------------- The Main Window. The main MUIMine window is divided into two areas, the top area is for status and control while the bottom area is the mine field where the game is actually played. The status and control area consists of two numeric displays with a button inbetween. The left numeric display show the number of mines in the mine field still to be located. The right numeric display shows the time taken so far (in seconds). The button between the numeric displays is for starting a new game. The mine field is a rectangular array of cells, each cell may or may not be mined. The object of the game is to determine which of these cells are mined and to place a flag on each mined cell whilw uncovering all the unmined cells. Using the Mouse. A cell in the mine field is uncovered by clicking on it with the left mouse button. If you uncover a mined cell then the mine explodes and you lose the game, if you uncover an unmined cell then the uncovered cell shows the number of neighboring cells (both orthogonally and diagonally) that are mined. A cell may be flagged as mined by clicking on it with the right mouse button, this places a flag symbol on the cell and it cannot then be uncovered. A flagged cell can be unflagged by right clicking on the cell again. The game ends when either a mined cell is uncovered, in which case the game is lost, or when all the unmined cells in the mine field are uncovered, in which case the game is won. When all unmined cells are uncovered then any remaining covered cells are flagged as mined as that is the only possibility left to them. Note: the left mouse button action occurs when the button is released and is applied to the cell under the mouse pointer at the time. The right mouse button action occurs when the button is pressed. Using the Shift keys. Holding the shift key will modify the action of the left mouse button. While the left mouse button is pressed the cell under the mouse pointer and all still covered neighbors of that cell are highlighted allowing a quick visual check of the still covered neighbors of a cell. When the left mouse button is released over an uncovered cell a check is made to determine if all the mined neighbors of that cell have been flagged (i.e. the number of flagged neighbors equals the number of mined neighbors) and if so then any still covered neighbors are uncovered. This provides a quick method to uncover the remaining covered cells. Note: the shift keys are checked when the left mouse button is first pressed and their state at that time is held while the left mouse button is pressed, releasing or pressing the shift keys while the left mouse button is already pressed makes no difference. Using the Menus. There are three menus in the menu strip, these are :- The Game Menu which has the following items :- . Start New Game - starts a new game the same as clicking the start button. . Show Best Times - displays the best time window where the three best times for each difficulty level are shown. . Setup Levels - brings up the Level Editor window to allow the modification, addition and deletion of difficulty levels. . Program Info - shows title, description, version and copyright info for the program. . Quit - exits the program. The Level Menu in which you select the difficulty level you want to play. The MUI Menu which has items to display MUI info and to set the MUI preferences for the game. Note: to allow the right mouse button to be used for both the menus and for game play the program will set the window to trap right mouse button events for the application during the play of a game (i.e. from when the player first presses the left mouse button within the mine field until the game ends) so menus are unavailable during this time. To use the menus you must first finish the current game by either winning or losing the game or by restarting the game by clicking the start button. However, MUI seems to have a habit of disabling right mouse button trapping, I do not know why it does this but I suspect it has something to do with context menus. To get around the problem MUIMine will re-enable right mouse button trapping whenever an intuition message is received while a game is being played. Right mouse button trapping is also re-enable whenever a game timer 'tick' occurs, this handles the situation where right mouse button trapping has been disabled so the intuition message to re-enable right mouse button trapping is not sent because right mouse button trapping has been disabled. Now wasn't that perfectly clear. What it all means is that sometimes when you right click of a mine field cell the menu will activate instead but the program will correct the situation in short order. The Best Times Window --------------------- The Best Times Window can be shown by selecting the Show Best Times item in the Game Menu. It is also shown when a player achieves a new best time. This window shows the three best (fastest) times and the names of the players who achieved these times for each difficulty level. The difficulty level is selected with the cycle gadget at the top of the window. The list below the cycle gadget shows the best times for the level selected and the names of the players who achieved those times. At the bottom of the window are buttons to close the window, reset the best times for the selected level and to reset the best times for all the levels. The Level Editor Window ----------------------- The Level Editor Window can be shown by selecting the Setup Levels item in the Game Menu. This is where a player can modify existing difficulty level parameters, add new levels and delete levels. A difficulty level is defined by the following parameters :- . the width (in cells) of the mine field. . the height (in cells) of the mine field. . the number of mined cells in the mine field. The width and height of the mine field must each be greater than zero, although in practice anything less than five is a bit silly the program only enforces that these parameters be greater than zero. Also care must be taken not to make the mine field too large to fit on the screen else the main window will fail to open. The number of mines in the mine field must also be greater than zero as well as being less than the total number of cells in the mine field (the width times the height). In practice you would probable want to keep the number of mines to somewhere within one eighth and one fifth of the mine field. Each level must have a unique name and no two levels can have all the level parameters the same. At the top left of the window is the level list which lists all the levels currently defined for the program. Each entry in the list shows the level's name, its with and height and the number of mines in the mine field. You select a level in this list to change its name or to modify its parameters. You can also sort the list using drag and drop. The order of the levels in the list determines the order of the levels in the Level Menu and the order of the entries in the level cycle gadget of the Best Times Window. Below the level list are the string gadgets used to edit the name and parameters of the currently selected level in the list. At the right of the window is a stack of button. These perform the following functions :- 'Add' Adds a new level at the end of the level list, you will then have to fill in its name and level parameters. 'Delete' Deletes the level currently selected in the level list (if any). 'Undo This' Undo any changes made to the currently selected level since the level was selected in the list. 'Undo All' Undo all the changes made since the Level Editor Window was opened. 'Ok' Accept the changes made and close the window. 'Cancel' Forget all changes made and close the window. Note: Best time data is associated with the level parameters (width, height and number of mines). If you change one or more of these parameters you will loose your best time data when you accept the changes. However if you have created a new level with, or modified an existing level to, the same parameters as the original level then that level will take on the best times of the original. Changing the Program Graphics ----------------------------- The graphics for MUIMine are kept in image files seperate from the main program executable. This allow the graphic imagery to be easily changed without having to modify or recompile the main program. You may want to do this because you do not like the standard graphics and have something better or you may be running on a low colour screen and datatypes do not remap the standard imagery very well or on a screen with a different aspect ratio such as a non-interlace screen. There are three graphics files used by MUIMine, they are normally kept in the images sub-directory of the program directory but can be in the same directory as the main program executable. If there are graphics files in the program directory they will be used in preference to the graphics files in the images sub-directory so you can test out new graphics files without having to overwriting the originals. Each graphics file contains all the imagery for a MUI custom class and consist of multiple images each the same size layed out in a horizontal strip. The custom classes use the size of the graphics to determine the size that the class will render itself at so the width of the graphics must be an exact multiple of the expected number of images in the graphics. The three graphics files are :- def_MineFieldImage - the imagery for rendering the cells in the mine field. There are sixteen images in this file, they are (from left) :- 1. covered cell imagery. 2. when the left mouse button is pressed on a covered cell the cell is shown as 'highlighted', this is its imagery. 3. this imagery is used when there is an error condition such as no memory for the mine field cell data. 4. flagged cell imagery. 5. incorrectly flagged cell imagery. 6. mined cell imagery. 7. explode mined cell imagery. 8. uncovered cell with no mined neighbors. 9. uncovered cell with 1 mined neighbor. 10. uncovered cell with 2 mined neighbors. 11. uncovered cell with 3 mined neighbors. 12. uncovered cell with 4 mined neighbors. 13. uncovered cell with 5 mined neighbors. 14. uncovered cell with 6 mined neighbors. 15. uncovered cell with 7 mined neighbors. 16. uncovered cell with 8 mined neighbors. def_FaceButtomImage - the imagery for the 'smiley face' start button. There are 5 images in this file, they are (from left) :- 1. the normal image when the button is not pressed. 2. the selected image when the button is pressed. 3. alternate normal image to show when the left mouse button is pressed in the mine field during game play. 4. alternate normal image to show when a game has been won. 5. alternate normal image to show when a game has been lost. def_DigitsImage - the imagery for rendering the digits in the numeric displays. There are twelve images in this file, they are (from left) :- 1. image used for a blank digit. 2. image for digit '0'. 3. image for digit '1'. 4. image for digit '2'. 5. image for digit '3'. 6. image for digit '4'. 7. image for digit '5'. 8. image for digit '6'. 9. image for digit '7'. 10. image for digit '8'. 11. image for digit '9'. 12. image for a minus sign. Credits ------- MUIMine was written by Geoffrey Whaite who can be contacted by email: gwhaite@accsoft.com.au post: 84/19A Tusculum Street Potts Point, NSW, Australia MUIMine was heavily infulenced by the Windows Minesweeper program, I use Windows at work so I play that version often and like the way it works. The graphics files supplied with MUIMine are an almost direct rip off of the Windows version. This application uses MUI - MagicUserInterface (c) Copyright 1993-96 by Stefan Stuntz MUI is a system to generate and maintain graphical user interfaces. With the aid of a preferences program, the user of an application has the ability to customize the outfit according to his personal taste. MUI is distributed as shareware. To obtain a complete package containing lots of examples and more information about registration please look for a file called "muiXXusr.lha" (XX means the latest version number) on your local bulletin boards or on public domain disks. If you want to register directly, feel free to send DM 30.- or US$ 20.- to Stefan Stuntz Eduard-Spranger-Straße 7 80935 München GERMANY Support and online registration is available at http://www.sasg.com/ History ------- V1.0 (28/11/98) - First public release