home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / enxle1f6 / html / casual / old_docs / designspecs.txt < prev   
Encoding:
Text File  |  1996-08-14  |  2.0 KB  |  59 lines

  1. The Java Battle Client-Server Model Specs
  2. -----------------------------------------
  3.  
  4. Introduction:
  5.  
  6. The Java Battle game operates via several
  7. running processes, possibly distributed
  8. over a wide area network like the internet.
  9. The game is organized and referee'd by
  10. a server. Human players interact with a 
  11. game by connecting with clients. The clients
  12. are responsible for taking the information
  13. given to it by the server and displaying
  14. it, and also for receiving input from the
  15. player and transmitting it to the server.
  16.  
  17. Communication:
  18.  
  19. The communication between the client and
  20. server is bidirectional. The server sends
  21. information such as board state updates
  22. to the client. The client sends information
  23. such as vector addition or removal requests
  24. to the server.
  25.  
  26. We are going to make a number of assumptions
  27. in order to come up with a reasonable network
  28. model which will allow the game to be played
  29. over a network in which some clients are not
  30. guaranteed a large amount of bandwidth.
  31.  
  32. Our model will assume that a client can
  33. receive information at a rate of 1000 bytes per
  34. second. We will also assume that we are 
  35. interested in executing 2 "turns" every 
  36. second. In other words, in an ideal world,
  37. the entire board will be updated on the client
  38. 2 times every second.
  39.  
  40. This means that we can transmit 512 bytes maximum
  41. to an individual client in one turn. This upper
  42. bound will allow us to determine how large the
  43. playing field is and how much information we
  44. can associate with each cell in the field.
  45.  
  46. If we assume that the board terrain is not 
  47. going to change during the course of a game,
  48. and that cities can not be created and 
  49. destroyed, we need to transmit the following
  50. information about each cell during a transmission:
  51.  
  52. * the cell's location (row x col)
  53. * the player inhabiting the cell (or empty)
  54. * the number of troops in the cell
  55. * the state of the vectors in the cell
  56.  
  57. Assume a board size of 16 x 16. Then we have
  58. the location fitting into 8 bits (4+4).
  59.