home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / gfx / misc / mazetest / readme < prev    next >
Text File  |  1994-11-26  |  3KB  |  75 lines

  1. Maze Test
  2.  
  3.  
  4.  
  5.     As an experiment to find an easy way to program a maze map 
  6. for a game, I came up with a method to store a maze without the 
  7. use of an array.
  8.  
  9.     A database for a simple maze map requires just two numbers, 
  10. 0 for walls and 1 for a passageway.
  11.  
  12.     A single element in an array in Basic requires 4 bytes or 32 
  13. bits of memory. a simple maze requires one bit per element. 
  14. Therefore, a 100x100 array ties up 40k of memory and takes 
  15. several minutes to load in Amos. It is also a pain to program. 
  16. The same maze can be done in 2 colors on D-Paint, loads as an iff 
  17. file in Amos, and uses 1.25k of memory.
  18.  
  19.     What a difference in memory savings.
  20.  
  21.     How can the program read the data when stored as iff 
  22. bitplanes? Easy. Amos contains commands for reading the color 
  23. number of a location on the screen.
  24.  
  25.     This demo uses an 8 color bitmap. The maze map is 320x200. 
  26. An array of this size would require 256k of memory and disk space 
  27. to store. The 8 color picture, 24k max.
  28.  
  29.     You can use D-Paint to create your own maze from the demo 
  30. map. Just remember, you start at the upper left corner and don't 
  31. get closer then 5 pixtals to the edge or you will crash the 
  32. program.
  33.  
  34.     There is no size limit on the maze other then chip ram. This 
  35. demo program can handle a maze of 10x10 or 10,000 x 10,000 chip 
  36. ram permitting. Just be sure that you maintain a 5 pixtal border 
  37. of color 0 to avoid a data error.
  38.  
  39.     In this demo colour 0 is used for walls. Colour 7 is used to 
  40. display where you have been. The other colors are used to code 
  41. for things like doors, keys, and the dreaded robocop.
  42.  
  43.     Amos can also plot colors to the screen as well as read 
  44. them. Therefore, this demo will update the map to show where you 
  45. have been.
  46.  
  47.     To run the demo;
  48.  
  49.     Use the mouse on the control icon to move in the maze. Look 
  50. will bring up the map. To take a key, select Get and click the 
  51. mouse on the key. It will then disappear. If you move past a key 
  52. you will lose it. To open the door select Use. You will use up a 
  53. key as the door is opened. You can also use keyboard commands 
  54. such as l,r,f,m,g,u, etc...
  55.  
  56.     If you run into Robocop, turn around and go the other way. 
  57. Otherwise, the demo will end in the next move.
  58.  
  59.     You are free to use the idea in programming your own dungeon 
  60. or other maze games.
  61.  
  62.     Source code in ascii and AMOS are included. Sample ABK file 
  63. included as the 3-D maze is drawn from shape table data. (Bob 
  64. shapes).
  65.  
  66.     Iff, contains pictures used to create ABK file in Amos. 18 
  67. strips of graphic data can be used to create any combination of 
  68. hallways that your maze map may generate.
  69.  
  70.     Rooms can also be part of the maze. They will just look 
  71. weird.
  72.  
  73.     Demo program by Ron Picardi.
  74.  
  75.