Skip to content

The iconic battleships game. Now in your console!

Notifications You must be signed in to change notification settings

bk20dev/battleships-console-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleships

The iconic battleships game. Now in your console!

screenshots of different game screens

🚢 Table of Contents

🐠 Features

Screen.Recording.2025-01-26.at.16.25.12.mov
  • Play against computer or other players in your LAN.
    application demo
  • Start or join a new network game.
    application demo
  • Place your battleships manually... or use a single button to distribute them randomly.
    application demo
  • Play with your friends and see their actions in real time.
    application demo
    application demo

🐬 Core Technology Highlights

This project was built with the goal of not using any external libraries, relying entirely on the features provided by C++20 and UNIX sockets. The game includes a user interface and network serialization, all implemented from scratch.

  • Elegant and colorful user interface built. using ANSI escape sequences.
  • Separate threads for keyboard input and network operations.
  • Low level networking with UNIX sockets.
  • Smart memory management.
  • Modern C++20 features, e.g. std::ranges.

🏝️ System Requirements

The game was written and tested on macOS Sequoia 15.3. It should also work on other UNIX-based systems like Linux.

  • A macOS computer (or other UNIX-based system).
  • A terminal supporting ANSI escape sequences (e.g. Terminal.app).
  • A terminal window of size 80x25 characters (width x height).