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
- Start server with port: ./server 12345
- Start clients with name, server host, and server port. Name must be unique for each client as in the example below.
- On one of the clients press the Join button.
- Select the user you want to play.
- Press OK. The user who hit Join has the first turn.
- 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
- Click on Message to send text area.
- Type in chat message.
- 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.

Jared's screen.
During the middle of a game:

Brian's screen.

Jared's screen.
End of a game:

Brian's screen.

Jared's screen.