Network Battleship Game - Socket and Thread Integration in Java

A fully completed project that allows setting up a server for Battleship and playing online

Project Overview

Java JavaFX Sockets Threads

General Information – This project was developed while learning Java. From the beginning, the goal was to effectively utilize threads, JavaFX, and network connections. As a gamer, I found the timeless Battleship game to be a perfect fit for this purpose. The project helped me improve both my technical skills in Java and OOP, as well as my ability to develop a game as a product - one that is fully intuitive, functional, and free of errors for the end user.

How It Works – The project is divided into a server and a client program. The server handles all game logic behind the scenes, while the client provides the user interface. When launched, the client connects to the server and allows users to create an account or log into an existing one.

Key Features

Server / Client Architecture

Fully separated server and client programs communicating via sockets, with the server managing all game state and logic.

Accounts & Login

Players can create accounts and log in to access persistent statistics and profile data across sessions.

Custom Lobbies

Players can create lobbies with optional password protection, giving full control over who can join a match.

In-Game Chat

Built-in chat system allows players to communicate with each other during the match.

Player Profiles & Stats

Players can search for other users' profiles and view their game statistics.

Stability & Anti-Cheat

Handles disconnections gracefully, cleans up inactive lobbies, and prevents cheating during gameplay.

Project Links