Semester Project Introduction
1. Introduction
- Semester project built around distributed simulation program Robowar
- Participants communicate with Robowar server through a
client program
- Client requests actions
- Server reports game status
- Client can be very simple - mapping keystrokes to actions - or very
complicated - completely automatic
- Your final semester project will be to write a client program for
Robowar
2. The game
- Simple simulation of spaceships orbiting in gravity well
- Gravity source is "the sun"
- Ship obeys Newtonian physics (as opposed to Star Trek physics)
- Each player gets one spaceship
- Each spaceship can:
- Turn left
- Turn right
- Fire thrusters
- Fire torpedo
- Enter "hyperspace"
3. Screen shot
4. Orbital maneuvering
- Spaceship can turn left or right incrementally
- Thrusters increase velocity along current axis
- Torpedos fire with current velocity plus increment along current axis
- Hyperspace instantaneously changes location and retains original velocity
- At ith use, ship destroyed with probability
i/10
5. Scoring
- Ship destroyed if:
- Struck by torpedo
- Flies into sun
- Flies off edge of playing field
- Player scores 10 points for each opponents' ship destroyed
- Player scores -5 points each time own ship destroyed (ship can be
"rebooted")
6. Architecture
- Server program
- Typically runs on
europa.eecs.lehigh.edu
- Manages simulation
- Accepts connections from clients
- Client program
- Runs on desktop UNIX workstation
- Accepts user input
- Sends commands to server
7. Client-server protocol
- Uses TCP/IP
- Client sends commands to server:
- Start/restart ship
- Turn, fire, fire thrusters
- Hyperspace
- Server sends status to client:
- Location of spaceships and torpedos
- Score
- Spaceship termination event
8. Server location protocol
- Server listens for "ping" messages (UDP)
- Responds with own address
- Client locates with broadcast
Last revised 1 November 2005