Battleship in C

Strategic battleship game with multiplayer mode, AI opponents (Spark & Fireball), custom save/load system, and cross-platform audio support.

📅 S5 Polytech Sorbonne
⏱️ 3 months development
👥 Individual Project
C Game Development AI Audio Programming File Systems

Project Overview

Battleship in C is a comprehensive implementation of the classic naval strategy game, featuring advanced AI opponents, multiplayer capabilities, and modern game features while maintaining the nostalgic charm of the original board game.

The project showcases advanced C programming techniques, AI algorithm implementation, and cross-platform development practices in a complete gaming application.

Game Features

  • ⚓ Classic Battleship gameplay
  • 🤖 AI opponents (Spark & Fireball)
  • 👥 Multiplayer support
  • 💾 Save/Load game system
  • 🔊 Cross-platform audio

Game Demonstration

Watch the complete gameplay demonstration showcasing all features of Battleship built in C:

System Architecture

Core Components

  • Game Logic: Turn-based game flow management
  • Board Management: Grid-based ship placement and tracking
  • AI Engine: Strategic decision-making algorithms
  • User Interface: Console-based interactive interface

Data Structures

  • Game Board: 2D arrays for ship and hit tracking
  • Ship Objects: Structures for ship properties and states
  • Player Data: Score tracking and game statistics
  • Game State: Serializable game progress data

AI Implementation

  • Probability Maps: Statistical target selection
  • Pattern Recognition: Ship layout prediction
  • Strategy Adaptation: Dynamic difficulty adjustment
  • Memory Systems: Previous move analysis

Cross-Platform Features

  • Platform Detection: Automatic OS identification
  • Audio Abstraction: Unified sound interface
  • File System: Portable save file management
  • Console Interface: Cross-platform terminal controls

Key Learning Outcomes

This project provided extensive experience in multiple areas of software development:

C Programming

Advanced C concepts including memory management, file I/O, and modular programming design.

🧩

Algorithm Design

Implementation of AI algorithms, probability calculations, and strategic decision-making systems.

🎯

Game Development

Understanding game loops, state management, and user experience design principles.

🔧

Cross-Platform Dev

Techniques for creating portable applications that work across different operating systems.

← Back to Projects