Skip to content

Carlbytes/BattleShip_cpp_Game

Repository files navigation

🚢 Battleship C++ Console Game





Project Overview

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.


Key Features

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.

Tech Stack & Tools

  • 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

How to Play (Windows)

The Easy Way:

  1. Download the latest installer from the [Releases] tab on the right.
  2. Run Battleship_Setup.exe.
  3. Launch the game from your Desktop shortcut.

Building from Source

If you are a developer and want to build the project yourself:

Windows (Visual Studio)

  1. Clone the repo: git clone https://github.com/Carlbytes/BattleShip_cpp_Game.git
  2. Open BattleshipGame.sln in Visual Studio 2022.
  3. Select Release and x64.
  4. Build Solution (Ctrl+Shift+B).

Linux (CMake)

Prerequisites: SFML must be installed (sudo apt-get install libsfml-dev).

mkdir build && cd build
cmake ..
make
./BattleshipGame

About

Software Dev for gaming group project

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •