GithubHelp home page GithubHelp logo

tictactoe's Introduction

๐Ÿ‘พ Tic Tac Toe using Firebase Realtime Database


A Tic Tac Toe game Android app for playing in real time with two devices. Using Firebase, Compose and Hilt based on modern Android tech-stack and MVVM architecture.


๐Ÿšง IN PROGRESS ๐Ÿšง

Screenshots

Tech stack

  • 100% Kotlin based + Coroutines + Flow for asynchronous.
  • Hilt for dependency injection.
  • Firebase: Realtime database.
  • JetPack
    • Compose - A modern toolkit for building native Android UI.
    • Lifecycle - dispose observing data when lifecycle state changes.
    • ViewModel - UI related data holder, lifecycle aware.
  • Architecture
    • Clean Architecture.
    • MVVM Architecture (Declarative View - ViewModel - Model)
  • Material Design & Animations.

Features

  • Create game and copy the game ID to share it.
  • Join a game with the game ID.
  • Play the game.

Future Features (Contributions are welcome!)

  • Game history.

How to - Build guide

For security reasons, I have not added the google-services.json file. This file is responsible for establishing the connection to the Firebase database. Here, I will explain how you can set up own Firebase Realtime database for FREE, download google-services.json and how to use it. This is necessary if you want to download and build this Android project.

  1. Login to firebase console and add a new project.

  2. Give a name to the Firebase project.

  3. If you want you can enable Google Analytics. Click Continue.

  4. If you enabled Google Analytics select your preferred Google Analytics account and click Create project.

  5. Wait until your project is ready and click Continue.

  6. On your new Firebase project main screen click the Android icon to add Firebase to your Android app.

  7. Register the app:

    • โš ๏ธ Make sure to specify com.ft.tictactoe as the package name. โš ๏ธ
    • Optionally enter the nickname for the app.
    • Click Register app.

  8. โš ๏ธ DO NOT DOWNLOAD THE JSON FILE YET. โš ๏ธ Just click continue, it will be downloaded later when all the config is set up.

  9. The Firebase SDK is already added in this project. You can check if everything is fine just in case. Click Next.

  10. Click Continue to the console.

  11. On the main page of the Firebase project go to Build > Realtime Database.

  12. On Realtime Database page click Create Database.

  13. Choose your prefrerred location for the database and click Next.

  14. Choose any option for the security rules and click Enable, we will edit this rules later.

  15. Go to Rules tab and edit them specifying the following rules: Then click on Publish.

    {
      "rules": {
        ".read": true,
        ".write": true
      }
    }
    

  16. Finally, go to Project settings and download the google-services.json file.

  17. Last step: Add the downloaded file to your Android project under TicTacToe > app > src and build the project.

tictactoe's People

Contributors

fahad23sh avatar

Watchers

Fahad Alam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.