Mobile AppGame DevelopmentReal-Time

Fleet Frenzy | Multiplayer Battleship Mobile Game

2025-11-10
2025-12-19
Fleet Frenzy | Multiplayer Battleship Mobile Game - Image 1
Mobile AppGame DevelopmentReal-Time

Overview

Fleet Frenzy is classic 10x10 Battleship rebuilt as an arcade console game for iOS, Android and the web. Two boards side by side in landscape, hand-drawn ship sprites, captain portraits in the HUD, generated chiptune sound effects and haptics.

The interesting part is under the hood: one shared rules package runs on four different runtimes, each with its own authority model.

Mode Authority Connection Ranked
Play vs Bot Client Offline No
Quick Match Colyseus server Internet ELO
Private Match Colyseus server Internet + 6-character code No
LAN Battle Host device Bonjour / TCP peer to peer (iOS) No

Two rules hold everywhere: the client only sends intent, never results, and the opponent's ship positions never appear in any payload until the match ends.

What I Built

Mobile Client

An Expo React Native app with a lobby, drag-and-rotate fleet placement with shuffle, the battle screen and a result screen. A single Zustand store drives the UI, and a session generation guard stops late network events from an old match leaking into a new one.

Bot AI

Three difficulty levels. Cadet fires at random, Captain hunts on a checkerboard and locks onto an axis after two hits, and Admiral uses a probability-density heatmap that folds hunting and targeting into one scoring function. The bot only ever sees its own public shot history, so the same class runs offline and on the server.

Authoritative Multiplayer Server

A separate Node.js server on Colyseus with ranked, private and practice rooms. Every shot goes through one validation path, the synced schema only carries public information, and turn timers apply penalties for idle players. Results are written to PostgreSQL through Drizzle in a transaction.

Matchmaking and Rating

An in-memory queue sorted by rating that pairs the closest neighbours, widens the tolerance the longer a player waits and falls back to pairing the two longest waiters. Standard ELO with K = 32, a floor of 100 and a start of 1000.

Security

Device-bound accounts with HMAC proof of possession and 24-hour JWTs, ownership checks on queue tickets, and per-IP rate limits on registration.

Key Technologies Utilized

  • Expo SDK 54, React Native 0.81, React 19 and TypeScript
  • Zustand for client state
  • Colyseus rooms and schema sync over WebSockets
  • Express, PostgreSQL and Drizzle ORM on the server, containerised with Docker and ready for Fly.io
  • Bonjour and TCP native module for iOS LAN play
  • Vitest tests on the shared rules and bot, with GitHub Actions CI
  • Web build packaged for itch.io as an offline HTML5 game

Project Gallery

Fleet Frenzy | Multiplayer Battleship Mobile Game - Image 1
Fleet Frenzy | Multiplayer Battleship Mobile Game - Image 2
Fleet Frenzy | Multiplayer Battleship Mobile Game - Image 3
Fleet Frenzy | Multiplayer Battleship Mobile Game - Image 4
Fleet Frenzy | Multiplayer Battleship Mobile Game - Image 5
Fleet Frenzy | Multiplayer Battleship Mobile Game - Image 6

Project Timeline

Shared rules, bot AI and offline match

1 week

Colyseus server, matchmaking and rating

2 weeks

Arcade UI, art pipeline and audio

2 weeks

LAN battle, itch.io build and repository split

1 week