home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 528.lha / WordsearchGenerator / ReadMe.pp / ReadMe
Text File  |  1991-07-02  |  7KB  |  177 lines

  1. Wordsearch Generator
  2.  
  3. This is an automated wordsearch generator which supports puzzle sizes
  4. limitted (by defines) to 1000X1000 and up to 50 words.
  5. Words orientations can be limitted to any subset of the eight primary
  6. directions and the puzzle can be rotated or flipped. 
  7. It has a spartan but functional user interface highlighted by the 
  8. req.library and can output the word list, key and puzzle to file or prt:.
  9. The system default font under WB 2.0 is supported for the puzzle window.
  10.  
  11.  
  12. If you've ever tried to create a simple wordsearch you know the hardest
  13. part is getting past staring at a blank page.  So I wrote this program
  14. to randomly place words within a puzzle.
  15. It works by generating a first placement and then sequentially moving
  16. through the puzzle until the word fits.  Once a fit is found it goes
  17. to the next word.  If a fit cannot be made the previous word is attempted
  18. to be refitted and if it cannot then it steps back to the word before it.
  19. Therefore a complex puzzles may seem to take forever but given 
  20. enough time it will always determine if the words can be fit.
  21. Because forever is a long time I've added a requestor to abort the algorithm.
  22.  
  23.  
  24. Things to consider when running the program:
  25.  
  26. -Boost the stack: 4000 won't cut it for even very simple puzzles.
  27.  If the stack isn't large enough the program shouldn't crash but
  28.  it will shut down leaving the windows to clutter your workbench.
  29.  ei Stack 20000
  30.  
  31. -Use FastFonts (FF on Wb1.3) or the text scrolling will be abominal.
  32.  
  33. -If you have 2.0 try changing the system default text to something larger.
  34.  This will effect the Puzzle display window so you can make the puzzle large
  35.  enough to fill the WB screen and then use GraphicDump to print the puzzle.
  36.  I prefer printing with a DTP but this is a good poor man's solution.
  37.  
  38.  
  39. Hopefully the product IS intuitive so I'll just explain the general
  40. operation and the menus.  The speed of the interface also needs
  41. improvement but for now its useable.
  42.  
  43. The Wordlist Window:
  44.  
  45. Here you enter your words.
  46. Click in the window and you'll see a cursor appear so you can enter a 
  47. word.
  48. Hitting return will push you down to the next line for entering another word.
  49. Note: this occurs even if the next word is below the bounds of the window
  50.  
  51. The scroll bar at the side of the window lets you change the view of the
  52. word list.
  53.  
  54. If you need to edit an entry just click where you want to change and use
  55. the delete or backspace or any of the special editing available with
  56. Intuition string gadgets.
  57. There is also a menu for some more sophisticated editing of the wordlist
  58. which will be discussed later.
  59.  
  60.  
  61. The Puzzle Window:
  62.  
  63. Here the last generated key or puzzle is displayed.
  64. If the puzzle is larger than the window the scroll bars at the bottom and
  65. right side can be used to scroll about.
  66. What is displayed is controlled by a menu which will be discussed later.
  67.  
  68.  
  69. (Is it later already?)
  70. The Menus:
  71.  
  72. Project - controls printing and saving/loading a puzzle and wordlist
  73.  
  74.     New  -    clear the wordlist
  75.  
  76.     Open -    load a saved file
  77.           will call up a file requestor
  78.     Save -    save under the current file name
  79.           if a file name has not been set the requestor will come up
  80.     Save As - bring up requestor to change save filename and save the file
  81.     
  82.     Print - text dump of the wordsearch
  83.         Wordlist - prints the wordlist as it appears in wordlist window
  84.                default output is to PRT:  See Print Redirect
  85.         Display  - prints the display as it appears in the puzzle window
  86.                default output is to PRT:  See Print Redirect
  87.     Print Redirect
  88.         To File - if active, will bring up requestor for where
  89.               to print the output when a print options is selected
  90.         To Clipboard - not implemented (yet)
  91.         
  92. Puzzle - controls generation of new puzzle information
  93.     Dimensions - set the dimensions of the puzzle via requestors
  94.              a new key and puzzle will be generated automatically
  95.     Generate    
  96.         New Key -        recreate the puzzle from the ground up
  97.         
  98.         New Puzzle -     only replace the filler the goes around words
  99.         
  100.         Try to Overlap - if active New Key will try to position words
  101.                  so they are tightly overlapped
  102.     Word Direction - How words can be positions in the puzzle
  103.         Left -     only left to right
  104.         Left Down  etc
  105.         Down
  106.         Right Down
  107.         Right Up
  108.         Up
  109.         Left Up
  110.         
  111. Display - controls how the puzzle is displayed
  112.     Key -       display the key, only the letters placed from the wordlist
  113.                 are displayed
  114.     Puzzle -    display the key plus filler to hide the words
  115.     Direction - the puzzle/key can be fliped and rotated 90 degrees
  116.             the signs indicate if the puzzle is flipped along that axis
  117.             and the order indicates the horizontal and vertical axis of
  118.             the display
  119.         +X+Y - display as generated
  120.         +X-Y 
  121.         -X+Y - reverse the direction of the x axis
  122.         -X-Y
  123.         +Y+X - width along the vertical and height along horizontal
  124.         +Y-X
  125.         -Y+X
  126.         -Y-X
  127.  
  128. Wordlist - some manipulation commands for the word list
  129.            acts on the word active before selecting the menu
  130.     To Buffer -     copy the word to a temporary storage buffer
  131.             there is only one word stored in the temporary storage
  132.     From Buffer -     copy to the word from the buffer to the active word
  133.     
  134.     Insert -     make room for a word at the current location
  135.  
  136.     Delete -     delete the current word moving all subsequent words up
  137.     
  138.     Clean Up -     remove any blank words
  139.     
  140.     Uppercase All - convert all words to uppercase
  141.             puzzle is not affected so use this before you New Key
  142.     Sort -         sort words alphabetically
  143.  
  144.  
  145. Well that's it accept for the generic disclaimer that I'm not responsible for
  146. anything which results from you running this program, good or bad.
  147.  
  148. The program IS public domain since I feel it can be seriously improved
  149. speed wise and I probably will not get around to working on it for a while.
  150.  
  151. As such I've included the source, in C.
  152. I've also included the source for reqglue.o from the ReqLib package which has
  153. one function added so the default font height and width can be be retrieved
  154. easily in a C program.  To recompile you'll also need the programmer kit for
  155. the req.library available on fish.
  156. Compiled under Lattice 5.04.
  157.  
  158.  
  159. Thanks to Anders Bjerin for putting together the C Manual on Fish 
  160. which gave me the courage to attempt the intuition interface, Colin Fox and 
  161. Bruce Dawson for my favorite requestor library, and to any and all in the
  162. AMiga Users of Calgary who I've annoyed with programming questions 
  163. particularly resident guru Stephen Vermeulen.
  164.  
  165. Craig Lever
  166. RR #1,
  167. Airdrie, Alberta, CAN
  168. T4B 2A3
  169.  
  170. Fidonet:
  171. Craig Lever @ 1:134/27, AMUC Express (Calgary Alta)     (403) 282-5137
  172.                                                               282-5171
  173.                                   282-5224
  174.                                   282-5238
  175.             @ 1:134/13, The SuperBox BBS (Calgary Alta) (403) 288-0531
  176.                                                           288-2396
  177.