Chain Reaction Pro

Chain Reaction Pro is an advanced Android strategy board game built with Kotlin. It combines Minimax AI, local Pass & Play, LAN multiplayer, custom 3D-style graphics, procedural audio, and haptic feedback into a complete multiplayer gaming experience.


📌 Description

Chain Reaction Pro was developed to explore Android game development, artificial intelligence, real-time networking, custom graphics rendering, and interactive game mechanics.

The game supports offline single-player gameplay against AI, local multiplayer for 2–6 players, and LAN multiplayer where players can automatically discover and join game rooms over the same Wi-Fi network.


📸 Screenshots





✨ Features

  • 🧠 Three AI difficulty levels: Easy, Medium, and Hard
  • ♟️ Hard AI powered by Minimax with Alpha-Beta Pruning
  • 📱 Offline Single-Player mode
  • 👥 Pass & Play mode for 2–6 players
  • 📡 LAN multiplayer over Wi-Fi
  • 🔎 Automatic LAN room discovery using NSD/mDNS
  • 🌐 Host-authoritative TCP networking
  • 🎨 Custom 3D-style glossy orb graphics
  • 💥 Dynamic chain-reaction explosion animations
  • 🎵 Procedurally generated sound effects
  • 📳 Haptic vibration feedback
  • 🔄 Connection heartbeat and turn recovery

🎮 How It Works

The objective of Chain Reaction Pro is to eliminate all opponents by taking control of the board.

Players take turns placing orbs into empty cells or cells already controlled by them. Each cell has a critical mass depending on its position on the board.

  • Corner cells: Critical mass = 2
  • Edge cells: Critical mass = 3
  • Interior cells: Critical mass = 4

When a cell reaches its critical mass, it explodes and distributes its orbs to adjacent cells. Any opponent orbs in those cells are converted to the current player's color.

If another cell reaches its critical mass as a result, another explosion occurs, creating a chain reaction that can spread across the board.

After every player has made at least one turn, a player with no remaining orbs is eliminated. The last remaining player wins the game.


🧠 AI System

Chain Reaction Pro includes three different AI difficulty levels:

  • Easy: Uses random move selection.
  • Medium: Uses tactical greedy decision-making.
  • Hard: Uses Minimax with Alpha-Beta Pruning to evaluate future game states.

The Hard AI searches through possible future moves and evaluates the resulting board states to select a stronger move. Alpha-Beta pruning reduces unnecessary branches in the search tree and improves the efficiency of the Minimax algorithm.


📡 LAN Multiplayer

The game supports multiplayer between Android devices connected to the same Wi-Fi network.

The host creates a game room using Android's Network Service Discovery (NSD/mDNS), allowing other devices to automatically discover available rooms without manually entering an IP address.

The multiplayer system uses TCP sockets with a host-authoritative architecture to keep the game state synchronized between connected players.

A ping/pong heartbeat system and connection recovery mechanisms help handle temporary network interruptions and disconnected players.


🎨 Graphics, Sound & Haptics

The game uses a custom Android Canvas renderer to create its visual effects.

The OrbView component renders glossy 3D-style spheres using radial gradients, animated glow effects, and continuous rotation.

Instead of relying on large pre-recorded audio files, the game generates sound effects procedurally using Android's AudioTrack API.

Haptic feedback is implemented using Android's vibration APIs to provide physical feedback during gameplay.


🧰 Tech Stack

  • Kotlin 1.9.0
  • Java 17
  • Android SDK
  • Android XML & ViewBinding
  • Material Design 3
  • Android Canvas
  • RadialGradient
  • Minimax & Alpha-Beta Pruning
  • TCP Socket Networking
  • Android NSD / mDNS
  • AudioTrack
  • VibratorManager

▶️ Download & Installation

Download Chain Reaction Pro:

Click Here to Download APK

👉 Download the APK and install it directly on your Android device.

Requirements:

  • Android 7.0 (API 24) or higher
  • For LAN multiplayer, connect all devices to the same Wi-Fi network

To install:

  • Download the APK from the link above
  • Open the downloaded APK on your Android device
  • Allow installation from the required source if prompted
  • Install and launch Chain Reaction Pro

💻 GitHub Repository

Source code available here:

👉 https://github.com/assishmoncs/chain-reaction