home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / games / combot.zip / COMBOT.DOC < prev   
Text File  |  1987-11-06  |  3KB  |  32 lines

  1. Begin Documentation
  2.  
  3. This is documentation for the COMBOTS game, a game that pits two                "combat robots" against each other to a fight to the finish.
  4.  
  5. The program was done to learn a little about how to detect a                    collision between objects and the method used in this instance                  was the POINT function in BASIC.
  6.  
  7. Each COMBOT may be programmed to perform ten actions, each action               selected from a list of three possibilities, over and over again in             the order determined at the time the COMBOT is programmed.
  8.  
  9. In order to simplify the shapes used to represent the COMBOTS there             was nothing included to show "facing" of each COMBOT unless the unit            is moving or firing.
  10.  
  11. Shapes are moved using the standard GET-PUT format after each shape             is originally drawn using DATA statements to set the points and the             colors.
  12.  
  13. Collisions (between the laser beams used as weapons and each combot)            are detected by using the POINT function to read the color of each              point in a straight line from the firing unit to the target point.
  14.  
  15. This target point is determined by extending a straight line from               the firing unit's facing position point by point until either a                 color is detected or the absolute point reached is on the boundary              of the field.
  16.  
  17. This point by point process is EXTREMELY slow and I suggest that an             improved game would use a test against the current endpoint of the              laser versus the actual points in the target unit.  Also you could
  18. compile the BASIC program for more speed.
  19.  
  20. Problems encountered with this program include the following:
  21. 1) Shapes "jumping" from one location to another, on top of each                   other.  Apparently there was some error that caused the variable                used to hold the current COMBOTs position not to be purged.
  22.    This would account for the "jump" to the other COMBOTs position                 for no apparent reason.  I believe this is fully corrected now.
  23. 2) Colored points left on the screen due to COMBOTs attempting to                  move into the boundary.  This was remedied by setting absolute                  limits to movements rather than depending on checking the color   
  24.    of the point to be moved to.  If such a colored point was hit by                a laser the firing unit would thus score in error.
  25. 3) Colored points left on screen and/or boundary points shot away by               the results of firing units hitting the colored boundary.  This                 was patched rather than fixed.  The patch simply redraws a small 
  26.    inner portion of the colored boundary.  
  27.  
  28. The game does everything I wanted it to do except that I wanted to              have six COMBOTs on the screen at once.  Until a better method is               found to check for hits though this really isn't possible.
  29.  
  30. End Documentation
  31.  
  32.