home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / games / puzzle.zip / PUZZLE.DOC next >
Text File  |  1987-03-16  |  10KB  |  220 lines

  1.                              PUZZLE
  2.  
  3.  
  4. The  PUZZLE  program  is an interactive jigsaw puzzle  using  the 
  5. computer  to create the initial pictures.   The program  provides 
  6. two different ways of playing jigsaw type puzzles.   These puzzle 
  7. varieties coupled with a user setable difficulty level and number 
  8. of  puzzle pieces make the PUZZLE program suitable for both small 
  9. children and adults.   (My two children, ages 3 and 5 are able to 
  10. play PUZZLE unattended.  At PUZZLE's most difficult level, adults 
  11. have  found  it  difficult to complete.)  You  may  freely  copy, 
  12. modify  and  distribute  this program to  friends  and  store  on 
  13. bulletin boards as long as it is not for profit.
  14.  
  15.  
  16. HARDWARE REQUIRED
  17.  
  18.   o IBM PC, IBM AT with either the CGA or EGA graphics board.
  19.   o Alternately  the  program  does run under  simulation  on  a 
  20.     Hercules graphics board with a program such as SIMCGA.
  21.   o The program  has not been tested on an IBM-PC  jr.   However, 
  22.     there is no reason to believe the program will not run on  an     
  23.     IBM-PC jr.
  24.  
  25.  
  26. SOFTWARE PROVIDED
  27.  
  28. The  PUZZLE  disk  contains  three  files,   this  document  file 
  29. (PUZZLE.DOC),  the  executable image (PUZZLE.EXE) and the  source 
  30. for the PUZZLE program (PUZZLE.BAS).
  31.  
  32.  
  33. OBJECT OF THE GAME
  34.  
  35. The  object  of the game is to assemble a jigsaw  puzzle  in  the 
  36. large  checker board on the right from the pieces provide by  the 
  37. computer.   The computer will provide a single piece in the lower 
  38. left  corner of the screen and a small picture of the puzzle as a 
  39. sample of the finished puzzle in the upper left hand corner.   To 
  40. select the location to move the puzzle piece,  move the cursor (a 
  41. blinking ball) to the desired location and press enter.   If  the 
  42. location is correct,  the puzzle piece will be transferred to the 
  43. puzzle  board.   If  the location was not correct,  a new  puzzle 
  44. piece will be drawn at random until all pieces have been success-
  45. fully  placed.   (For the Classical puzzle,   three  guesses  are 
  46. allowed before the puzzle piece is changed).
  47.  
  48. For the modern puzzle,  a score will be kept.   Fifty points will 
  49. be  awarded for each correct piece placement,  ten points will be 
  50. subtracted for each wrong guess,  as well as one point subtracted 
  51. for each second of indecision.
  52.  
  53.  
  54.  
  55.  
  56. KEYS USED
  57.  
  58. The following keyboard keys are used:
  59.  
  60.    o Arrow keys are used to move the cursor around the puzzle,
  61.    o Enter Key is used select the current position,
  62.    o R or r  key are used  to rotate the current puzzle piece  to 
  63.      gain a better view of the piece.  (The puzzle piece does not 
  64.      need to be rotated correctly to be placed correctly.)
  65.    o Escape  key will allow  the user to end the game or start  a 
  66.      new game.
  67.  
  68.  
  69. RUN TIME OPTIONS
  70.  
  71. There  are four run time options that provide different levels of 
  72. difficulty.  These options are:
  73.  
  74.   o Classical versus Modern Puzzle image,
  75.   o Picture difficulty or Picture Granularity,
  76.   o Puzzle Piece Size, and
  77.   o Puzzle Piece Rotation.
  78.  
  79. (These  options  will  be available at run time unless  they  are 
  80. preselected in lines 55-70.)
  81.  
  82. The  Classical versus Modern puzzle image option allows the  user 
  83. to assemble one of two types of pictures.  One picture which uses 
  84. recognizable  objects  like bicycles and  balloons,  and  another 
  85. which uses rectangles, circles and dots to form a pattern.
  86.  
  87. The  picture difficulty option (used in the Modern puzzle) refers 
  88. to the granularity and type of objects within the puzzle picture.  
  89. For a difficulty of 1 the rectangles are relatively large and few 
  90. and there are large circles to assist in understanding where even 
  91. a  rotated piece should go.   (At difficulty 1,  a checker  board 
  92. will overlay the sample puzzle image.   Difficulty 2 is the  same 
  93. as  difficulty  1 but without the checker board overlay.)  For  a 
  94. difficulty of 7,  the size of the rectangles decreases while  the 
  95. number  increases.   Coupled  with  a  loss  of  the  circles  as 
  96. references,  the puzzle image will contain a finer structure.  At 
  97. level 9 and 10,  the puzzle will have an even finer structure but 
  98. will no longer have recognizable border pieces.
  99.  
  100. The picture granularity option (used in the Classical puzzle)  is 
  101. used  in  conjunction  with  the puzzle piece size  to  select  a 
  102. difficulty level.  Picture granularity (1 to 6) refers to whether 
  103. the  puzzle picture is to be a 1 x 1,  2 x 2,  ...  6 x 6  puzzle 
  104. image with one image in each position.  (A 6 x 6 puzzle will have 
  105. 36  small pictures on the puzzle while a 1 x 1 will have 1  large 
  106. picture.)
  107.  
  108.  
  109.  
  110.  
  111. The  picture  size option for the Classical  and  Modern  puzzles 
  112. refer  to  the size of the checker board cut-out and  its  puzzle 
  113. pieces.   A size of 3 will overlay a 3 x 3 checker board over the 
  114. puzzle  image  and create nine puzzle pieces.   A size of 8  will 
  115. create a puzzle with an 8 x 8 checker board and 64 pieces.
  116.  
  117. For the Classical puzzle option try the following combinations of 
  118. puzzle size and picture granularity:
  119.  
  120.    o puzzle size identical with picture granularity
  121.    o puzzle size twice that of picture granularity
  122.    o picture granularity twice that of puzzle size
  123.    o picture granularity of one and a puzzle size of three
  124.  
  125. The  piece rotation option is available to both the Classical and  
  126. the  Modern  puzzle  users.   (It is not  recommended  for  small 
  127. children.   They  become frustrated and may quit forever.)   With 
  128. this option selected, the puzzle piece is rotated randomly before 
  129. being displayed.   The piece may be rotated to get a better  view 
  130. by  entering either an upper case or lower case "R".   In  either 
  131. case  the  puzzle  piece  need  not be  rotated  to  its  correct 
  132. alignment to be placed correctly.
  133.  
  134.  
  135. PRESELECTING THE RUN TIME OPTIONS
  136.  
  137. In  order  to allow small children to run the game  without  much 
  138. supervision,  the  game difficulty,  puzzle  size,  rotation  and 
  139. Classical   puzzle  image  options  may  be   preselected.    The 
  140. preselected values should be included on lines 70 to 85.
  141.  
  142.  
  143. ADDITIONAL PUZZLE ELEMENTS
  144.  
  145. The  PUZZLE  program has been written to allow additional  puzzle 
  146. elements  to  be added to the classical puzzle.   To  add  a  new 
  147. picture  create a self contained drawing subroutine near the  end 
  148. of the program (starting at lines 1175,  1185,  1200, 1215, 1230,  
  149. 1245, 1260 and 1275).
  150.  
  151. Each  drawing subroutine must draw an image given the center of a 
  152. box  (M,N)  to contain the image and the width of  the  box  (Q).  
  153. (The small puzzle picture is 96 x 96 pixels and the large picture 
  154. is 192 x 192.   Warning. Small features will not show up.)  Three 
  155. color indices (C1,  C2 and C3) which will be incremented to allow 
  156. three  differently  colored  pictures to be  produced  using  the 
  157. subroutine are also available.   In addition,  two random numbers 
  158. are  available  (ZR1 and ZR2) that are in the range of 0 to  1.0, 
  159. along with nine constants that represent 5%,  10%, 15%, 20%, 25%, 
  160. 30%,  35%,  40%  and 45% of the width (and height of the  drawing 
  161. box.   These constants are Q05, Q1, Q15, Q2, Q25, Q3, Q35, Q4 and 
  162. Q45 respectively.
  163.  
  164. Each  picture  type  (or  drawing  subroutine)  will  be  defined 
  165. uniquely  by a GOSUB and by a counter (CI) of the number of times 
  166. a  picture  has  been  drawn.   To signal the  code  that  a  new 
  167. subroutine  is  available increment the variable  NC  (number  of 
  168. classical  elements)  in  line  50 by one for  each  new  picture 
  169. element  subroutine that you supply.    Once the  subroutine  has 
  170. been written,  the routine may be tested by changing the value of 
  171. the  variable,  PTEST,  in line 75 to the picture number for your 
  172. subroutine and running the PUZZLE program.   (The next  available 
  173. picture element is 18 out of 25 possible drawing routines.)
  174.  
  175. For  example,  classical picture element number 2 is a square and 
  176. is  defined  by  the code included in line  880.   This  code  is 
  177. described below:
  178.  
  179. LINE(M-Q35,N-Q35) -                Draw a  filled box that starts
  180.     (M+Q35,N+Q35),C1,BF            above  and to the left of  the                                  
  181.                                    center of the drawing box to a                                  
  182.                                    point that is below and to the                                  
  183.                                    right of the center.  The dis-                                 
  184.                                    tance  above,  below,  to  the 
  185.                                    left and to the right is given 
  186.                                    by  the  variable Q35 (70%  of 
  187.                                    width   of  box).    Use   the 
  188.                                    current random color (C1).
  189.  
  190. RETURN                             Return to calling routine.
  191.  
  192.  
  193. ACKNOWLEDGMENTS
  194.  
  195. There  have  been at least three people who have helped  to  make 
  196. this game what it is today that I wish to thank.   Two  children, 
  197. James  and Darcy,  for whom this game was designed and customized 
  198. to  entertain.   Without their encouragement and desire  to  play 
  199. each  version of the game during their evenings,  the game  would 
  200. not look as it does today.  Also to some anonymous programmer who 
  201. created  the  first  Jigsaw puzzle shell (similar to  the  modern 
  202. puzzle option) I give thanks.
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.