home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / desqview / xaster.zip / ASTROIDS.DOC < prev    next >
Text File  |  1992-11-23  |  5KB  |  116 lines

  1.  
  2.      If you like the game, please send $5 to
  3.  
  4.         Phil Goetz
  5.         4023 Huckleberry Row
  6.         Ellicott City, MD 21043
  7.  
  8.      Even if you don't register, please send a note to my e-mail address
  9. so I know how many people use Xasteroids.  Then I may be motivated to
  10. update it again, or write new programs...
  11. Send any comments, suggestions, bug reports, modifications, etc., to
  12.  
  13.         goetz@cs.buffalo.EDU
  14.  
  15.      Lots of people have complained that Xasteroids wouldn't run fast
  16. enough on their display.  I had different ideas on how to affect the speed,
  17. and implemented all of them.  So Version 3 came with more speed controls
  18. than most people like to think about:
  19.  
  20.      1 2: Scale of movement (default 1):  Increasing this causes each object to
  21. move further every turn.
  22. Advantage:      Can be changed in smaller amounts than moves/frame.
  23. Disadvantage:   Increasing it too much can cause bullets to fly through
  24. asteroids without hitting them.  Looks jerky.
  25.  
  26.      v b: Moves per frame (default 1):  Increasing this causes the main loop to
  27. execute more times before updating the display.
  28. Advantages:     Avoids the problem of bullets flying through asteroids.
  29. Disadvantages:  Increases only by integer amounts.
  30.  
  31.      , .: Delay:        Used when your client runs too fast to play comfortably.
  32.  
  33.      n m: Object size:  If your client is too slow, decrease the size and resize
  34. the window to a smaller size.  Then type 'x' to use XFillRectangle erase.
  35.  
  36.      Playing with scale of movement, object size, and window size can give you
  37. very different games.
  38.  
  39. Known bugs:
  40.      David Elliot (dce@sonyusa.sony.com) says that he had to put an
  41. XSync(disp) after the XDrawLines call or he would get protocol errors.
  42.  
  43.      On anything slower than a SPARCstation 1, or on any color screen,
  44. it will really drag.  There should be a way to set color screens to use
  45. a bitmap of depth 1, but I don't know how.  Please tell me if you do.
  46.      The code is not optimized because the XWindows
  47. calls take the vast majority of the time.  I tried, for instance,
  48. reading sines and cosines from a table instead of calculating them -
  49. it made no noticeable difference in speed.  Similarly, the collision
  50. detection could be optimized only to check objects nearby - but why
  51. bother.  Same goes for using registers, pointers to frequently-referenced
  52. array elements, etc.  It MIGHT make a significant difference in runtime
  53. if you replace the vector drawing with bitmaps.  It runs a LOT slower on
  54. color displays.
  55.      The vast majority of time seems to be used in erasing the pixmap
  56. each round, & there isn't much to do about that.  My tests have indicated
  57. that blanking individual asteroids rather than the whole screen would
  58. take comparable time, unless you had a complicated routine to optimize
  59. blanking.
  60.      If you modify this program, please send me a copy.  Modifications
  61. I would like to see include:  sound (esp. for Sparcstations), drawing
  62. the asteroids to pixmaps so they can be put on the screen quicker
  63. (though not much quicker - the X calls seem to take most of the time),
  64. an options screen to set parameters such as speed, whether bullets
  65. can be fired before your current ones are dead, whether to start in the
  66. center of the screen between levels), a permanent high score file
  67. to be displayed sometimes between games, and jagged fractal asteroids
  68. (not just removal of the lines to the center; I like those).
  69. ---------------------
  70. ast.docs:
  71.                  Xasteroids
  72.         Copyright 1990 by Phil Goetz
  73.             goetz@cs.Buffalo.EDU
  74.  
  75. Keypress        Command
  76. --------        -------
  77.     e           Rotate counterclockwise ("left")
  78.     r           Rotate clockwise ("right")
  79.     w           Rotate 45 degrees counterclockwise
  80.     t           Rotate 45 degrees clockwise
  81.     d           Increase counterclockwise rotational velocity
  82.     f           Increase clockwise rotational velocity
  83.     o           Thrust
  84.     p           Fire
  85.     `           Shields
  86.   space         Hyperspace
  87.     s           Start new ship in center of playing field
  88.                 (Also used to start a new game)
  89.    esc          Pause
  90.     Q           Quit
  91. Speed commands: Key associated with faster speed is to the right of its
  92.                 corresponding key associated with slower speed.
  93.     .           Decrease delay:  Speed game up
  94.     ,           Increase delay:  Slow the game down
  95.     m           Decrease size   ("Minimize")
  96.     n           Increase size
  97.     b           Increase # of moves/frame
  98.     v           Decrease # of moves/frame
  99.     2           Increase scale of movement
  100.     1           Decrease scale of movement
  101.  
  102. Object          Score
  103. -------         -----
  104. Big asteroid    25
  105. Medium asteroid 50
  106. Little asteroid 100
  107. Enemy spaceship 500
  108. Enemy bullet    500
  109.  
  110. Commands can only be entered when the mouse pointer is in the
  111. asteroids window.
  112.  
  113. Resize the window with your window manager
  114. at any time for a different playing field.
  115. ---------------------
  116.