Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hermes/bosweb/web234/b2344/sl.harringtonweb/public_html/pmwiki2.php:2) in /hermes/bosweb/web234/b2344/sl.harringtonweb/public_html/pmwiki2.php on line 1570

Warning: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web234/b2344/sl.harringtonweb/public_html/pmwiki2.php:2) in /hermes/bosweb/web234/b2344/sl.harringtonweb/public_html/pub/skins/simple/simple.php on line 39

Warning: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web234/b2344/sl.harringtonweb/public_html/pmwiki2.php:2) in /hermes/bosweb/web234/b2344/sl.harringtonweb/public_html/pmwiki2.php on line 866
Harrington Web : Brian - Battleship

Home > Projects > Course Projects > Battleship


This is a simple networked battleship game that I developed for one of my classes at the University of North Texas. Currently the Server is written in C++ and the client is in Java.

Playing

  1. Start server with port: ./server 12345
  2. Start clients with name, server host, and server port. Name must be unique for each client as in the example below.
  3. On one of the clients press the Join button.
  4. Select the user you want to play.
  5. Press OK. The user who hit Join has the first turn.
  6. Click on opponents ocean to shoot. Red means you hit a ship, Black means you missed.

Example for running clients:

java -jar battleship.jar brian www.yourserver.com 12345 
java -jar battleship.jar jared www.yourserver.com 12345 
java -jar battleship.jar bob www.yourserver.com 12345 
java -jar battleship.jar joe www.yourserver.com 12345 
... 

Chatting

  1. Click on Message to send text area.
  2. Type in chat message.
  3. Press return. Text will show up in Messages received text area.

If no user is selected in the Send to area, it will send to everybody who is connected to the server. If users are selected it will only send to the selected users.

Screenshots

After starting a game:

Brian's screen

Brian's screen.

Jared's screen

Jared's screen.

During the middle of a game:

Brian's screen

Brian's screen.

Jared's screen

Jared's screen.

End of a game:

Brian's screen

Brian's screen.

Jared's screen

Jared's screen.

Download

 
Page last modified on August 20, 2006, at 04:46 PM.