Skip to content

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Platform Android   Language Java   IDE Android Studio   Backend Firebase   Languages
Firebase Services Used
Firebase Auth   Firestore   Realtime DB   Cloud Functions

❌⭕ Online Multiplayer TicTacToe (Android)

TicTacToe game for Android with online multiplayer, built using Java and the Firebase platform. This project was originally created as a Final Project for the ironSource Android Summer Camp (2017) and has been expanded with additional features.

📷 Demo & Screenshots

🔎 Overview (40 seconds)

overview

🖼️ Short Demoes

Login Screen

Online Lobby

Game Over

login invite endgame

Gameplay

Language (Arabic/Hebrew)

Game Stats

gameplay rtl stats

✨ Features

  • Real-time Online Multiplayer: Play against friends or other users live.
  • Firebase Authentication: Secure user login and registration.
  • Player Lobby & Matching: Find other users and send/receive game invitations.
  • Live Game State Sync: Game moves are reflected instantly on both players' devices.
  • Multilanguage Support: Full localization for English, Hebrew, and Arabic, including Right-to-Left (RTL) layout support.
  • Push Notifications for Invites: Receive real-time game invitations via Firebase Cloud Messaging (FCM), even when the app is in the background.

🛠️ Tech Stack & Architecture

This project leverages a full Java + Firebase stack to create a real-time, serverless multiplayer experience.

Frontend

  • Language: Java
  • Platform: Android (Native)
  • IDE: Android Studio
  • UI: XML Layouts (with support for RTL languages)

Backend (Firebase)

  • Firebase Authentication: Manages all user sign-up and login sessions.
  • Firebase Realtime Database: Used for low-latency synchronization of game state. All active game moves (X's and O's, current turn) are written here to be streamed to opponent devices instantly.
  • Firebase Firestore Database: Used for more structured, persistent data such as user profiles, friends lists, and game history.
  • Firebase Cloud Functions: Used for sending push notifications for game invites.

Architectural Note

This project strategically uses both Firebase Realtime Database and Firestore.

  • Realtime Database was chosen for the active game board synchronization due to its extremely low latency, making it ideal for real-time events.
  • Firestore was chosen for storing user profiles, game statistics, and match history due to its powerful querying capabilities and more structured data model.

🎯 Key Learnings & Challenges

  • Real-time Data Sync: Implementing a stable, real-time game state synchronization between two clients using Firebase Realtime Database.
  • Complex State Management: Managing the game logic (turn handling, win/draw detection, disconnects) reliably.
  • Firebase Integration: Learning to integrate multiple Firebase services (Auth, RTDB, Firestore, Functions) into a single, cohesive application.
  • Localization (i18n): Implementing full internationalization, including the specific challenges of supporting Right-to-Left (RTL) languages like Hebrew and Arabic across all UI components.
  • Asynchronous Programming: Handling callbacks and listeners from Firebase to update the UI without blocking the main thread.

About

TicTacToe Android App with online multiplayer. Originally a Final Project for ironSource Android Summer Camp 2017, with more features added later.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors