100 likes | 247 Views
Ultimate Tanks. Paul Solt and Ines Pavon Data Communication and networks I Professor Kaminsky Monday, February 18 th , 2008. Game Description. Simplified tank game: move and shoot Top down view Open ended game Multi-player Multi-session. Application Protocol.
E N D
Ultimate Tanks Paul Solt and Ines Pavon Data Communication and networks I Professor Kaminsky Monday, February 18th, 2008
Game Description • Simplified tank game: move and shoot • Top down view • Open ended game • Multi-player • Multi-session
Application Protocol • Client asks to join session using tank name • Server acknowledges request • Client then asks to move, shoot , or quit • Server confirms each of those requests and analyzes consequences • If a tank gets shot it disappears from the screen before respawning • If a tank tries to move off the board • If a tank destroys other tank, update score
Message Encoding • TCP for transport layer • Binary encoding • [opcode (1 byte)] [variable length message] • Opcodes 1-13 • Error message if opcode not recognized
Client Program Design • Client interface to define behavior • Client main program • Implements client interface • Link to UI • Application logic on client side • Client proxy factory • Provides connection between server session and client proxy • Client proxy • Implements client interface • Communicates with server proxy
Server Program Design • Server interface to define behavior • Server adapter • Acts as initial link between client proxy and server session • Server session map • Keeps track of server sessions that are available • Server session • Game logic on server side • Server proxy • Communicates with client proxy
Live Demo • Part I: • One server session • Two or more tanks playing game • Part II: • Two or more server sessions • Two ore more tanks playing in each session