Game Maker Studio Setup Firebase Tools

This tutorial details Game Maker Studio Setup Firebase Tools. Please carefully read the documentation for not getting any errors/bugs.

All Firebase extensions only work on Game Maker Studio 2.2.4+

Creating a Firebase Project

For creating a firebase project, head over to Firebase Console. If you haven’t logged-in with your Google account yet, you’ll be greeted with a login screen. After that Projects screen will be presented to you.

Select Add project, you’ll then be shown a window.

Project name : The name of your project, you can write it as your Game’s Name.
Project ID : Identifier of your project, must be unique.
Locations : These are the location centers that’ll be used for some of the Firebase Tools. For Analytics, I recommend you to choose your own country or where you live. For Cloud Firestore, I recommend you to choose whichever serves you to best. Your database will be located in this area and therefore serve better for the players living close to it.

Click Create Project Button to proceed. Now, Firebase usually changes its UI but you should get the context easily. We will create an Android App on our Firebase project now.

On the Project Overview screen, you’ll see a big area. Click the Android Icon (Marked in dashed circle on the image above). This will bring a new screen, there we will fill our Android App’s details.

Android package name must be the same as your Android package name that you set on Game Maker Studio IDE. Click to Register app button to proceed.

Finally, you’ll get to the page where you will download your google-services.json file.

Download this file and put it on your Desktop. We will use this file in a moment.

Now, we’re done with Firebase Panel. We can now move onto the Game Maker Part.

Setting Up Game Maker Studio for Firebase Tools

Unfortunately, Game Maker Studio does not include “changing runtime files on the IDE”, we must do it manually. First, check your Game Maker Studio Runtime version.

My current version is By the time you’re reading this, the version may be different. We need this information because we will go to that folder.


Now select the folder which contains your runtime : For me, it’s

Now, first thing to do is to backup your original android folder. Copy paste it and rename the new one as android_original.

Now, go to the android folder. There you’ll see runner folder, open it. We must edit two files inside of it.

In here, we only need to change two things;

  • RootFilesbuild.gradle
  • ProjectFilesbuild.gradle

Now, go to RootFilesbuild.gradle (You can open it with Notepad). Insert the following code inside the dependencies bracket.

 classpath ''

The final version the file should look like this (The code inserted at 12th line)
Be careful as Yoyogames sometimes update this code. Try to insert the code above to the correct place instead of just copying the code below!

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
    dependencies {
        classpath ''
        classpath ''
allprojects {
    repositories {

The second file we must edit is ProjectFilesbuild.gradle. You can open it with Notepad. Add the following code to the very end of the file

apply plugin: ''

The final version of the file should look like this

apply plugin: ''

android {
    compileSdkVersion ${YYAndroidCompileSDKVersion}
    buildToolsVersion '${YYAndroidBuildToolsVersion}'


    defaultConfig {
        applicationId "${YYAndroidPackageName}"
        minSdkVersion ${YYAndroidMinSDKVersion}
        targetSdkVersion ${YYAndroidTargetSDKVersion}
		multiDexEnabled true

	signingConfigs {
        release {
            storeFile file("${YYAndroidKeyStoreFile}")
            storePassword "${YYAndroidKeyStoreFilePassword}"
            keyAlias "${YYAndroidKeyAlias}"
            keyPassword "${YYAndroidKeyPassword}"

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
			signingConfig signingConfigs.release


dependencies {
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
	implementation 'androidx.appcompat:appcompat:1.0.0'
	implementation 'androidx.multidex:multidex:2.0.0'
    implementation files('libs/ini4j-0.5.2.jar')



apply plugin: ''

Finally, remember the google-services.json file we downloaded and put it on the Desktop ? Drag and drop this file to the ProjectFiles folder.


You have finished implementing Firebase tools to Game Maker Studio. Now you can use GMDevBlog Firebase Extensions in your apps.



Truely speaking, I don't know what am I doing most of the time.

19 Responses

  1. Dragonaz says:

    hello can you please help me it says :
    * What went wrong:
    A problem occurred configuring project ‘:com.dragonpirates.piratesbattle’.

    The library is being requested by various other libraries at [[16.3.0,16.3.0], [16.4.0,16.4.0]], but resolves to 16.4.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

    • Marty says:

      Hello Dragonaz. I believe you also use Yoyogames’ Google Play Services Extension. It occurs that both extensions conflict. One member reported this before on our Discord channel.

      Try this:
      Remove : apply plugin: ‘’ from ProjectFiles\build.gradle. See if the extension still works.

      • Dragonaz says:

        thanks marty it fixed the problem ! but when i launch the game on my android phone , firebase dont get any signal from the game ! i check the package name it is the same ! do i need to publish the game on google play first ?

        • Marty says:

          No need to publish your game on Google Play.

          I believe Google Play Services extension conflicts with my Firebase extensions.

          I am currently waiting for Yoyogames’ Game Maker Q3 Update, which will update Game Maker’s Android SDKs. This means that I’ll be able to update my Firebase extensions as well.

          A question, which Firebase Extension are you using?

          • Dragonaz says:

            im using the Analytics one !
            so do i need to wait for the gm’s and ur extension’s updates to be able to link the app with firebase ?

          • Marty says:

            I’m on vacation now, away from my computer. Once I got back, I’ll look for a solution. I have to check which version works better with Google Play Services extension.

            Sorry for now 🙁

    • Marty says:

      I have verified here that they updated the gradle version of Game Maker (See the report here

      This means that I can update all my Firebase Extensions to their latest versions.

  2. Hello i am using yoyr extension want to send these events how i can do this.
    a) level_up: when users get through a level
    b) game_fail: when users fail a level
    c) fullads_show: when an interstitial ad is
    shown successfully.
    d) videoads_show: when an rewarded
    video ad is shown successfully.

    • Hello Manjeet. The documentation for the Analytics is included here please check it. For your questions;

      A) You can use level_start & level_end functions. An example would be,
      firebase_analytics_event_level_start(“boss_level”); //When starting the level.
      firebase_analytics_event_level_end(“boss_level”, true); //When finishing the level. Argument1 = true means that user successfully finished the level. False is failed!

      B) Same as above. Only change the second function as
      firebase_analytics_event_level_end(“boss_level”, false); //False because failed.

      C) No need to log this as my extension automatically logs this for you on Firebase panel.
      D) No need to log this either because my extension also automatically logs this for you.

      Enjoy 🙂

  3. ZigZag says:

    Hi I have some issues compiling for Android with this, I suspect it’s due to the new yoyo notification extension since I get some duplication errors and they use firebase for that extension, are you able to look in to this? It works perfectly without 🙂
    Kind regards

    • Hello ZigZag. I am aware of this issue. It is caused because both parties try to initialize Firebase.

      The only solution is to use my Firebase Notifications extension which is way more powerful than Yoyogames’ extension. I’m currently working on it and will share it in couple days.

      Thanks 🙂

      • ZigZag says:

        Hi Marty

        Thank you for the reply, just wondering how far you are with the notification extension?
        I need notification, so as long you don’t support it, and I can not use your analytic extension with the one from YoYo, then I can not use your excellent analytic extension 🙂

        Kind regards

        • Marty says:

          I’ve yet seen your comment, so sorry for the delay. My last 3 months have been really really busy. I’m back now, and continue working on firestore extension.

          Once it’s finished, I’ll reshape the notification extension(Along with a custom server written with Golang)

  4. Kay Win says:

    Good job on this extension. I saw some requests for an iOS version. I have also written a simple firebase extension for Android but have no idea how to modify AppDelegate in GameMaker. It would be great if you can provide me some guidance. Thank you in advance

    • Marty McFly says:

      Hi Kay. Sorry to reply late. I haven’t had the chance to work on iOS extension yet. Simply, I don’t own an iPhone and it gets kinda harder for me to do the testing and things etc. So, I’m in the dark as well. Let me know if you find anything useful

  1. 17th April 2019

    […] Setup Firebase Tools for Game Maker Studio (Please also read “Setting Up” section below as it needs two more steps to include the library. […]

  2. 2nd November 2019

    […] Setup Firebase Tools for Game Maker Studio […]

Leave a Reply