← Back to Projects

AI Sequence Game

Cross-Platform Mobile Strategy Game

📱 Flutter 🎯 Dart 🤖 AI Algorithm 🎮 Game Development
🎮

Play Instantly Online & Android APK Available

Experience real-time matchmaking, live chat emotes, and offline AI practice. Play instantly in your web browser or download the app directly to your Android device.

Project Overview

A visually premium, highly responsive real-time multiplayer implementation of the classic Sequence board game. Built using a Go-based backend and a Flutter frontend, this project delivers seamless cross-device synchronization and robust offline AI logic.

Core Features

  • Robust Matchmaking Queue: Connects players into matchmaking rooms based on stakes and available tables. Automatically handles disconnections and forfeits.
  • State-Synchronized Game Board: High-performance, non-scrollable, responsive layout that locks grid sizing on all devices (mobile and desktop).
  • One-Eyed & Two-Eyed Jacks Rules: Standard Sequence rules with Two-Eyed Jacks acting as wild cards and One-Eyed Jacks enabling opponent token removal.
  • Real-Time Live Chat Emotes: Contextual chat bubbles pop up next to players' avatars when sending hello, salty, or trash-talk emotes.
  • Interactive Offline Mode: Features an advanced AI opponent with a 25-second golden turn timer, clock ticking/sprinkle audio, and side-sliding played-card history drawer.
  • Admin Audits: Features coin balance adjustment tools, match history queries, and player transaction reviews.

Engineering Stack

The application leverages WebSockets for instant state propagation and customized HTTP APIs for credentials and session security.

Frontend Hub

Flutter, Dart, and Provider for responsive, state-synchronized reactive rendering at 60 FPS.

Backend Engine

Concurrent Go web server built with Gorilla WebSockets, JWT session management, and hybrid SQLite/PostgreSQL (Supabase) persistence.

Match Architecture

Multiplayer lobbies, auto-turn skip monitors, and clean rule separation for offline/online modes.

Architecture & Design

The backend utilizes a hybrid SQLite & PostgreSQL (Supabase) setup. By default, it uses a local SQLite driver (`sequence.db`) for lightweight development, but dynamically scales to Supabase (Postgres) in production when a connection string is configured. The frontend dynamically syncs with the game room via persistent WebSocket connections, secured with signed JWT claims containing authenticated User IDs.