Welcome to Yamble: Yap to Gamble, a real-time AI-based multiplayer game built with Flutter and Firebase Firestore. This project aims to create a dynamic and engaging gaming experience where players compete by solving AI-generated scenarios.
Yamble: Yap to Gamble is a realtime multiplayer game developed as a mobile application using Flutter and Firebase Firestore. The game supports multiple users simultaneously, creating an engaging and competitive gaming environment. AI-generated scenarios present unique challenges to players, who must submit their best solutions within a time limit. These solutions are then evaluated by the AI, determining their success and contributing to the players' ranks and scores. The game's intuitive design ensures a smooth and user-friendly experience, with real-time updates and feedback enhancing gameplay.
Key features of Yamble include:
- Realtime multiplayer gameplay with Firebase Firestore for data sync
- AI-generated scenarios for unique challenges
- Solution evaluation by AI for fair scoring
- Ranks system and leaderboard to track player performance
- Intuitive and user-friendly interface for an engaging experience
- Flutter
- Firebase Firestore
- Generative AI (Gemini 1.5 Flash)
- Flutter installed on your machine.
- Firebase account for backend integration.
- Google AI Studio Account for generative AI.
- Install Java JDK (add to PATH), Android Studio, VS Code (or any preferred IDE), Flutter SDK, etc. to install all needed tools (SDK, NDK, extra tools) for Android development toolchain, please refer to this link.
- Clone this repository.
- Run
flutter pub get
to get rid of problems of missing dependencies. - Generate keystore to sign in release mode with command
keytool -genkey -alias server -validity 9999 -keyalg RSA -keystore keystore
using keytool from Java. - Rename the generated keystore with
<anyName>.keystore
. - Place the
<anyName>.keystore
to app-level Android folder (android/app/). - Create new file with name
key.properties
inside project-level Android folder (android/) with properties/contents as follow:storePassword=<yourKeyPassword> keyPassword=<yourKeyPassword> keyAlias=<yourKeyAlias> storeFile=<anyName>.keystore
- Using your browser, navigate to Firebase Console to setup the Firebase integration.
- Click add project then proceed with the steps shown in Firebase Console web (setup Authentication, Firestore DB and Storage).
- Download
google-services.json
and place it to app-level Android folder (android/app/). - Edit
.env.example
name to.env
, then edit value of each environment variables according to your API (check Firebase Console for all Firebase-related API, Gemini for Generative AI API Key). - If you don't want to generate your own AES-128/192/256-CBC key, run
dart run build_runner build --define secure_dotenv_generator:secure_dotenv=OUTPUT_FILE=encryption_key.json
. If you decided to generate your own, rundart run build_runner build --define secure_dotenv_generator:secure_dotenv=ENCRYPTION_KEY=yourEncryptionKey --define secure_dotenv_generator:secure_dotenv=IV=yourIvKey --define secure_dotenv_generator:secure_dotenv=OUTPUT_FILE=encryption_key.json
. - Edit
.vscode/launch.json.example
, pay attention to the comments. Edit the value ofENV_ENCRYPTION_KEY
andENV_IV_KEY
to your generated AES-128/192/256-CBC key (encryption_key.json
). - Run
flutter build apk --release --split-per-abi --obfuscate --split-debug-info=/debug_info/ --dart-define ENV_ENCRYPTION_KEY=your_encryption_key_here --dart-define ENV_IV_KEY=your_iv_key_here
for splitted APK (each architecture) orflutter build apk --release --obfuscate --split-debug-info=/debug_info/ --dart-define ENV_ENCRYPTION_KEY=your_encryption_key_here --dart-define ENV_IV_KEY=your_iv_key_here
for FAT APK (contains all ABIs) - Your build should be at
build/app/outputs/flutter-apk
Facing problems? Kindly open an issue.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request