← projects

IFTendo-Battleship

Team (IFT) · 2023

C++Arduino IDEESP8266Wi-Fi (SoftAP)OLED I²CKiCadPCBSMT

GitHub

Overview

A Battleship game running on a home-made Game Boy: a custom PCB with an OLED screen and eight tactile buttons (D-pad plus A, B, Select and Start), written in C++ in the Arduino IDE. Two consoles play together. One becomes the host and opens its own Wi-Fi access point, the other joins it as the client.

The IFTendo Game Boy PCB
The IFTendo console, its OLED showing the game's Wi-Fi access point (SSID: Game_Boy_Battleship).

How it works: host and client

  • The host boots a Wi-Fi SoftAP, its own network, and shows the SSID, password and IP on the OLED. Then it waits.
  • The client joins that network. From there the two consoles talk directly, with no router in between.
  • Game state travels over Wi-Fi so both screens stay in sync.

How to play

  1. Turn on the host. It starts the access-point server and displays “Waiting for a client”.
  2. Turn on the client. It connects to the host.
  3. Both players press Start to begin.
  4. Place your fleet. Three boats each: Select picks a ship, the d-pad moves the selector (valid cells appear dotted), A drops the boat.
  5. Fire with B on the cell where you think an enemy boat is. Sunk boats show a cross.
  6. Sink every enemy boat to win. Press Start to replay.
Client joining the host
The client joins the host's network.
Both players press Start
Both players press Start.
The game begins
The game begins.
Placing a boat
Placing a boat: dotted cells, then A.
Firing; sunk boats shown with a cross
Firing. Sunk boats show a cross.
Victory screen
All enemy boats sunk. You win.

Hardware and build

Custom PCB designed in KiCad, assembled by hand in SMD and THT. An ESP8266-class board (NodeMCU), an OLED over I²C, eight buttons. It was a hands-on way to learn electronics end to end, from schematic and board layout to embedded C++ under the constraints of the microcontroller.

Materials and hardware: team credit

The console hardware and materials were shared work. Credit to the collaborator's repository.

A full explanation video is available in the GitHub README.