haypers's Forum Posts

  • This was something we talked about way earlier in the forum, but this forum has been edited, moved around, and chopped up so many times, that I doubt I could still find it.

  • Ok. So, you are using Google to authenticate users. Now, I could only ever get the email and password option to work for me. Back during the before times, rex himself was able to use google to authenticate users, and his example project uses a google sign in window and works flawlessly. As far as I'm aware however, Rex never told anyone how to get Google's approval to use their authentication system. In order to use Google's approval system, you need to register your application with them. I tried to figure out how to do this myself many moons ago, but I never figured it out.

    I know this is not the answer you wanted to hear, but I recommend using email to authenticate. You can see the finished product of my game here: haypers.itch.io/pinwall if you need an idea of how it would work. Go to the settings and hit the cloud save button to check it out.

    If you somehow have figured out how to actually use the Google approval system, let us know how. I don't think your AUTH is capable of actually working outside of the development environment.

  • I'm afraid that's not nearly enough information to help debug. Send some shots of the code and pluggin properties.

  • I totally agree, Ekodesrianto. I spend almost a year learning things to get my project to work. It is so hard to use these plugins if you are new. The real problem is that construct 3 is yet to provide a real Firebase plugin, or any easy form of cloud save plugin.

  • ya. In Rex's example projects, It appears as though he had figured out how to do it, but I could find no tutorial for that functionality, and google themselves don't have a super user friendly interface for people like us who are trying really hard not to make game development complicated. I just have a simple 'create an account' page in settings that lets my users create an account, and in turn, use my online services such as saving data to the cloud, and posting to the leader board.

  • So, if you want to use Google API to sign in, you will have to use the Google API console and verify your firebase domain. While this is possible, I never did it as it was way to complicated and time-consuming. Instead, I have my users make an email and password login. While Google is convenient, I am yet to figure that one out all the way. I think there is an email login example cpax. Also, go to your firebase console, and check to see what authorization methods you have enabled in the authentication tab I think. Sorry it took a bit to respond. I've been in the mountains this week.

  • Anytime. Come back when you find something you just can't figure out.

  • Ya, I've switched to my computer for this post. get ready for a rant. And significantly less typos. So. Here is the thing about rex's plugins. They work great. Flawlessly. but rex himself only spoke broken English, and there are little to no tutorials besides rex's own site documentation, and like I said, its all in broken English. So here is a little overview of what got me stuck when I was in your shoes. I've spend weeks to months digging through the web to find this basic information. I don't want you to do the same. Once you have created your app on the Firebase console for free, the console will give you the URL you seek. Here is some information you will want.

    1 plugin properties:

    (all online documentation sucks)

    a: authentication

    Domain - leave this blank. it is a depreciated property anyway. its original purpose was to move authentication data from a root file in the data base to a sub file.

    b: API v.3

    API key: this is a key Firebase provides you to identify your app. It is a bunch of random numbers and letters.

    Auth Domain: the URL Firebase gives you for authorization. looks like this: GameNameAndID.firebaseapp.com

    Database URL: The URL of the database you make on Firebase. Only use original data bases. non of those fire-store things. Looks like this: gamenameandid.firebaseio.com

    Storage Bucket: the storage bucket location Firebase provides for you. looks like this: GameNameAndID.appspot.com

    Log: Keep this on 'NO'

    c: Save Slot

    Domain: the file directory within your database that the save slot data will be saved it.(leave blank to use the root location)

    Sub Domain: The sub directory within that directory (keep blank to use root location)

    d: Leader board

    Domain: the file directory within your database that the leader board data will be saved it.(leave blank to use the root location)

    ID: (sometimes referred to as the subdomain, because that's what it is) The sub directory within that directory (keep blank to use root location)(if you have multiple leader boards, this is where you would separate them. Change this value in your script via the set domain action to switch between leader boards.)

    2. Firebase database authentication rules:

    Every Firebase database has a set of rules that determine who can edit and post data to and from the server. If you know how to write these rules, great. If not, listen carefully: the domains and subdomains that you use for your app in various plugins will greatly determine exactly how you need your rules to be laid out. If you use save slot, its pretty easy. If you use leader board, its a little complicated. if you use both, you have another thing coming (assuming you don't know how to make these rules in the first place. Its not terribly complicated if you have experience.). I won't bother to post all the examples here, because that would take all day. If you go to the rules tab of the data base in your Firebase console, you can edit these rules. Mine look like this:

    {

    "rules":{

    "SaveSlot":{

    "$user":{

    ".read":"auth.uid === $user",

    ".write":"auth.uid === $user"

    }

    },

    "Leaderboard":{ ".read":true,

    "$gamemode": {

    "$user": {

    ".write":"auth.uid === $user"

    }

    }

    }

    }

    }

    This is set up to that my save slot, and leader board directories have different rules on how you can read and write to them.

    3.exporting

    a.While these things work flawlessly, for some reason, and I have no idea why, the construct 3 minification option hates them. When exporting, using complicated minification will make your apk not run. Simple minification still works though. maybe this will be fixed with the last update, IDK yet.

    4. tutorials

    a.They don't exist.

    b. Use the example projects that are provided in that zip file. That is how I figured most this stuff out. They are your biggest resource when it comes to learning how to use these plugins.

    5. worker mode

    a. never use worker mode when using any of rex's plugins. his scripts require the ability to send and receive data over the internet, and the scripts that do that require specific global access that the worker mode does not provide

    b. this should not affect your performance significantly.

    6. authentication services. If you wish to use Facebook or google authentication services to have players sign in, than you will need to go to that service provider and ask for permission. This is fairly complicated, and I never figured it out. I always just use email sign in, and have users create a password and email account. I could find no tutorials on how to get the google or other authentication services working, so I just don't use them. Let me know if you figure it out.

  • Ya, super annoying. It is not that I don't trust scirra's Google play object, I just don't want my users to be forced to go to several different places for different online services. I could not save the players progress anywhere online with the Google play object, so I just did it all with the same firebase database and rex's plugging.

    github.com/erenertugrul/construct-plugins/releases/download/rex_firebase/rex_firebase_pack.zip

    This is a link to all the current working c3 runtime Rex firebase pluggings. You can thank Eren for this.

    I've got savedata (saveslot), leaderboard, authentication, and API v3 all working together flawlessly in my project.

  • Wish I could help, but I've all but given up with the Google play plugin. Until scirra give it an overhaul to allow save game features, I don't want to use it. I've taken to using rex's firebase plugging pack for c3 since then for any online services.

    When you upgrades the runtime, you may have messed something up with it internally. Perhaps remove and re add the object itself. A lot of work, but it could be done. Add a comment wherever it is references, delete it, and re add it maybe?

  • I found the problem. And I can't fix it. Basically, for whatever reason, rex's leaderboard plugin requires full read and write access to the entire firebase database to work. You can not update your ranks if you have not left your database rules open to everyone. I already had rules in place for my save slot data, and even giving full read and write access to just the leaderboards still is not enough. This rule set that I created doesn't work. {

    "rules":{

    "SaveSlot":{

    "$user":{

    ".read":"auth.uid === $user",

    ".write":"auth.uid === $user"

    }

    },

    "Leaderboard":{

    "$gamemode": {

    "$user": {

    ".read":true,

    ".write":"auth.uid === $user"

    }

    }

    }

    }

    }

    I can use the save slot plugin all I want, but the leaderboard plugin requires full access, and I don't want to set the rules to do that. Any ideas?

    Update: I'm sorry. I feel bad for giving you all so many notifications. But I actually just found my problem. If you slightly adjust how you give the read permission, so that it looks like this:

    {

    "rules":{

    "SaveSlot":{

    "$user":{

    ".read":"auth.uid === $user",

    ".write":"auth.uid === $user"

    }

    },

    "Leaderboard":{ ".read":true,

    "$gamemode": {

    "$user": {

    ".write":"auth.uid === $user"

    }

    }

    }

    }

    }

    It works fine. My bad yall, just ignore me.

  • Hey yall! It may interest you all to know that I have successfully gotten rex's auth, save slot, and API v3 plugins working on a published android app. See PinWall on the google play store if you want to look at it. That took forever, but after signing in, all your coins and purchases are stored on a Firebase database. In the last few days, I have been trying to get the Leader board plugin to work. I guess I just don't understand how it works. I figured if I have all the players signing into Firebase anyway, why not just use the leader boards through Firebase with Rex's Firebase leader board plugin? Well, I have studied and scoured rex's example projects, but I simply can't get the leader board plugin to work. If any of you have used it before, please let me know, I'd like a little help.

    I basically re-wrote one of the example projects into my current game and whenever I try to post a score, I get a post score error trigger. It doesn't help that I really have no idea what the back end should look like. Do I need to create a child in the database with the same name as the leader board's domain before the plugin will work? Do I need to fill out the domain property on the leader board plugin with a URL or something? Rex left his empty in the example projects, but I don't know what else could be the issue. His project still works fine. I am able to use his example projects to write data to his database, and with a little tampering of his code, pull that same leader board data from another device. So I know the plugins are working, I just simply don't know how to implement the leader board plugin. Any ideas?

  • Hey, guys. I just exported my first debug apk with firebase all set up. Works perfectly in preview. But, once exported to apk, the app doesn't load. The loading bar and logo appears, finish, and the screen remains black. Any ideas?

    Update: I figured it out. Ignore this post. Sorry to bother yall. Thanks for your help.

  • Cool, that's what I wanted to know. Thanks.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey, yall. Quick question: Where is a player's non-consumable item purchase stored by scirra? In the manual on IAP, scirra says:

    Non-consumable purchases can be bought once per user. A good use for this type of purchase is to distribute your game for free but with the majority of the content locked from the user. To unlock the rest of the content the user can purchase a premium upgrade. The plugin keeps track of these types of purchases for you across multiple user devices.

    Is it stored via the player's google account? Their credit card? Can it save across android and apple at the same time? I don't understand how the IAP plugging can keep track of a player's data across devices when they never actually sign in to anything. Just some clarification would be nice.

    I am currently implementing firebase features on my android game and wanted to know how I should handle saving digital goods ownership data. Should I just not save non-consumables and just let the IAP plugging do all the work for them? I don't like that idea, because then a player's consumable goods data (that I store on firebase) and non-consumable goods data (stored by scirras IAP plugin) could be unsynced, and that would be a nightmare, but on the other hand, if I save it to firebase, then there is the possibility of firebase and the IAP plugging disagreeing. Note that I plan on creating a release of this game on the iPhone if the future allows.

    See my problem? Thoughts? Thanks!