home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / programm / 3339 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  8.1 KB

  1. Xref: sparky comp.programming:3339 comp.unix.programmer:5745 comp.unix.misc:4652 rec.games.corewar:1538 rec.games.programmer:5138 comp.org.ieee:597 comp.org.usenix:1096 comp.lang.c:18729 comp.lang.c++:18264 comp.software-eng:5096
  2. Path: sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!ut-emx!ccwf.cc.utexas.edu!ahmedh
  3. From: ahmedh@ccwf.cc.utexas.edu (ahmed h al-mehdi)
  4. Newsgroups: comp.programming,comp.unix.programmer,comp.unix.misc,rec.games.corewar,rec.games.programmer,comp.org.ieee,comp.org.usenix,comp.lang.c,comp.lang.c++,comp.software-eng
  5. Subject: Description of The 1991 IEEE CS National Programming Contest
  6. Message-ID: <85642@ut-emx.uucp>
  7. Date: 21 Dec 92 05:41:45 GMT
  8. Sender: news@ut-emx.uucp
  9. Reply-To: ahmedh@ccwf.cc.utexas.edu (ahmed h al-mehdi)
  10. Followup-To: comp.programming
  11. Organization: The University of Texas at Austin, Austin TX
  12. Lines: 150
  13. Originator: ahmedh@bashful.cc.utexas.edu
  14.  
  15. :---------------------------------------------------------------------:
  16.  
  17.       Description of the 1991 IEEE CS National Programming Contest
  18.  
  19. :---------------------------------------------------------------------:
  20.  
  21.  
  22.  
  23. Many people have asked for either a description or a copy of the
  24. contest driver from last year.  Unfortunately, the master tape was
  25. corrupted and its immediate backup was stored incorrectly.  For some
  26. time, we have been unable to locate the automatic backup, however, we
  27. recently found it.  Included here is a description of the game "Gobble"
  28. which was used as the virtual world in the 1991 National Programming
  29. Contest.  It bears few technical resemblances to the 1993 NPC, but the
  30. "team effort" aspect of the game is important to note and will be
  31. preserved.
  32.  
  33. At present, we are very busy trying to finish the 1993 NPC code to meet
  34. our deadline of January 30th for a mock contest needed to playtest the
  35. world, and we do not have time to massage the 1991 NPC program and
  36. release it.  We are sorry about the inconvenience and hope that this
  37. description will serve to illustrate how the contest driver worked.
  38.  
  39. npc.ece's internet address has recently changed to 128.83.196.60 .
  40. Mails that were sent to npc on Dec. 18 may have bounced. Please mail
  41. them again.  We apologize for any inconvenience. 
  42.  
  43.  
  44. -Dave Taylor,
  45.  1993 NPC Chair
  46.  
  47. ---
  48.  
  49. "Gobble" description-
  50.  
  51.   The game contestants had to create players for was called "Gobble".
  52. It was basically a capture-the-flag game.  The object was to get one
  53. of your players to the middle of the screen, pick up the turkey, and
  54. return it to your side.  On each team were three players, Ma, Pa, and
  55. Squirt.  Ma was very strong and was armed with a frying pan which could
  56. be swung very quickly but had a short range, and she moved slowly.  Pa
  57. was almost as strong as Ma, but he was armed with a hoe which has a
  58. slightly longer reach but less power than a frying pan; he was slightly
  59. faster than Ma.  Squirt is the weakest but fastest player, armed with a
  60. slingshot which takes a long time to shoot but has an infinite range.
  61. If a player is hit enough times (depending on his strength), he or she
  62. will pass out temporarily and recuperate his/her strength.  There is no
  63. way to kill another player permanently, and the turkey could not be
  64. killed.  Furthermore, the person carrying the turkey cannot shoot and
  65. moves at half speed.
  66.  
  67. The world looked like this:
  68.  
  69.   ________________________________________________________
  70.  |                                                        |
  71.  |                                                        |
  72.  |                  BB                                    |
  73.  |                 BBBB                                   |
  74.  |                  BB                                    |
  75.  |                 ______     _______                     |
  76.  |                |                  |                    |
  77.  |___             |                  |                 ___|
  78.  |p  |            |                  |                |  p|
  79.  |o M|            O                  O                |M o|
  80.  |r P|            O        T         O                |P r|
  81.  |c S|            O                  O                |S c|
  82.  |h  |            |                  |                |  h|
  83.  |___|            |                  |                |___|
  84.  |                |______     _______|                    |
  85.  |                                                        |
  86.  |                               BB                       |
  87.  |                              BBBB                      |
  88.  |                               BB                       |
  89.  |                                                        |
  90.  |                                                        |
  91.  |________________________________________________________|
  92.  
  93. Legend-
  94.  
  95.   M = "Ma" starting position
  96.   P = "Pa" starting position
  97.   S = "Squirt" starting position
  98.   T = Turkey starting position
  99.   O = Window- can see through but not walk through or attack through
  100.   B = Bush- can walk through and attack through but not see through
  101.   | or _ = Wall- can not walk through, see through, or attack through
  102.  
  103. The characters (Ma, Pa, Squirt, Turkey), the bushes, and the weapons'
  104. areas of effect were modeled as circles.  The walls of the house,
  105. windows, and the porch areas were modeled as rectangles.  The world
  106. coordinates were 2D "floating point"- it was not a matrix-based game.
  107. A point reflected a pixel position on a Sun workstation (resolution =
  108. 1152x900) for convenience.
  109.  
  110.   Each character had a specified attack range, attack rate, attack
  111. strength, "hit points", and movement rate.  The players wrote
  112. individual clients which controlled each player on their team.  The
  113. game processes (in UNIX) were laid out as follows.
  114.  
  115.  _________
  116. /Heartbeat\
  117. \_________/ ------------------------.
  118.                                     |
  119.                                     v
  120.                                   ______
  121.                                  /Server\
  122.   .------+--------+------------> \______/ <---------+------+---------.
  123.   |      |        |                                 |      |         |
  124.   v      v        v                |  |             v      v         v
  125.  ____   ____   ________            |  |            ____   ____   ________
  126. /Ma 1\ /Pa 1\ /Squirt 1\      .----'  '----.      /Ma 2\ /Pa 2\ /Squirt 2\
  127. \____/ \____/ \________/      |            |      \____/ \____/ \________/
  128.                   v            v
  129.                             _____       ________
  130.                            /Sound\     /Graphics\
  131.                            \_____/     \________/
  132.  
  133.  
  134. The heartbeat process provided ticks to the server and served to time
  135. the rate at which the game turns were processed.  The sound and
  136. graphics servers were given the complete state of the world so that
  137. they could illustrate it and do the sound effects on workstations
  138. separate from the ones with the character processes to give them all
  139. the CPU.  The server sent different information to each client,
  140. depending on what it could see in the game.  It also took commands from
  141. the clients such as "move to X,Y", "attack at X,Y", and "pick up/drop
  142. turkey".
  143.  
  144. Technical information-
  145.  
  146.   All communications was through TCP/IP sockets to insure that data was
  147. not lost and to enable a game to be played on four machines with the
  148. clients of one team on one machine, the clients of another on the
  149. second, the graphics and sound on a third, and the server and heartbeat
  150. on a fourth.  Although the original intent was simply to spread the
  151. load around, this provided an interesting side-effect.  If one of the
  152. processes on one team used too much CPU time, the other processes on
  153. the team suffered, providing a potentially useful balance in the game.
  154.  
  155.   All code was written in C, and the client interfaces were in C.  The
  156. graphics used the Sun pixrect library, using the full screen as the
  157. playing field (256-color), and the sound used the Sun's internal 8kHz
  158. speaker.  The socket communications were in ASCII and used the
  159. fprintf() and fscanf() functions to communicate.  The background tiles,
  160. animation tiles, texture maps, and starting/ending movies were all
  161. drawn by hand and digitized.  All artwork was scanned in on a Microtek
  162. flatbed scanner on a Macintosh and were retouched using Adobe
  163. Photoshop.  The sounds were digitized from several sound effects CD's.
  164. The music was performed live and digitized.
  165.