Skip to content

Installation

Luca Gregori edited this page Jul 25, 2023 · 2 revisions

To install Samurai Game on android, navigate within this repository to the release section and download the APK file. Copy the APK file to your device and before proceeding with the installation, make sure to enable the function: Install from unknown sources.

Once the game is installed, navigate to the settings to grant the application read and write permissions to files. Without this step, it will not be possible to use in-game statistics.

The game has been tested on Android version 6.0 (Marshmallow). For optimal performance and compatibility, it is recommended to have an Android device running Marshmallow or a more recent version.

Setting Up Firebase Environment

The provided script Firebase.gd is responsible for handling online services using Firebase in the context of the Samurai Game. Firebase is a popular backend platform that provides various services, including real-time databases, authentication, cloud storage, and more.

To use Firebase in your project and make this script work, you need to set up the Firebase environment:

  1. Create a Firebase Project: Go to the Firebase Console and create a new project if you haven't already.

  2. Enable Authentication: In the Firebase Console, navigate to "Authentication" and enable the "Email/Password" sign-in method. This will allow users to register and login with their email and password.

  3. Set Up Firestore: In the Firebase Console, navigate to "Firestore Database" and create a new database. Configure the security rules according to your requirements. Since this script doesn't provide any security rules, make sure to set appropriate rules for your use case.

  4. Get API Key and Project ID: In the Firebase Console, go to "Project settings" and get the API Key and Project ID. These will be used in the script as API_KEY and PROJECT_ID respectively.

  5. Update the API Key and Project ID: Open the Firebase.gd script and replace the placeholders API_KEY and PROJECT_ID with the actual API key and project ID obtained from the Firebase Console.

With these steps completed, the Samurai Game should be able to interact with Firebase and perform the specified online services, including user registration, login, data saving, data retrieval (leaderboard and current record score), and deletion.

Clone this wiki locally