A robust, multiplayer, turn-based Battleship game built in C++ using the SFML library for networking. This project demonstrates a strong understanding of Object-Oriented Programming (OOP), Network Socket Programming, and Software Architecture.
It features a Client-Server architecture allowing for LAN/WAN play, utilizes the Singleton design pattern for state management, and includes a professional Windows installer.
| Feature | Description |
|---|---|
| ** Networking** | TCP/IP socket connection handling via SFML Network module. |
| ** OOP Design** | Utilizes Inheritance (Ship classes), Polymorphism, and Encapsulation. |
| ** Design Patterns** | Implements the Singleton Pattern for the GameManager to ensure state consistency. |
| ** Gameplay** | Cursor-based aiming, dynamic ship placement, and hit/miss tracking. |
| ** Distribution** | Packaged with Inno Setup for a one-click install experience. |
| ** Testing** | Code reliability verified via Microsoft Native Unit Test Framework. |
- Language: C++17
- Networking/Graphics: SFML (Simple and Fast Multimedia Library) 3.0.2
- IDE: Visual Studio 2022
- Build Systems: MSBuild (Visual Studio) & CMake support
- Version Control: Git
The Easy Way:
- Download the latest installer from the [Releases] tab on the right.
- Run
Battleship_Setup.exe. - Launch the game from your Desktop shortcut.
If you are a developer and want to build the project yourself:
- Clone the repo:
git clone https://github.com/Carlbytes/BattleShip_cpp_Game.git - Open
BattleshipGame.slnin Visual Studio 2022. - Select Release and x64.
- Build Solution (
Ctrl+Shift+B).
Prerequisites: SFML must be installed (sudo apt-get install libsfml-dev).
mkdir build && cd build
cmake ..
make
./BattleshipGame