haypers's Recent Forum Activity

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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!

  • Thanks a million! Let me know if anyone has any simple tutorials I could look at!

    Also, I am assuming I have to keep worker mode off for it to work. Let me know if this is not the case.

  • Hey guys. Sorry to bother you. This is an ancient thread. Normally I don't post on threads this old, but seeing as the last post was only six months ago, I figured I'd try it. I am currently trying to find a way to save my player's in-game wealth (how much in-game currency they have) to a database. I want to do this so I can add in-app purchases for more currency, and not worry about losing that data. It seems firebase is the best way to do this, and rex's plugins are the best way to connect to it. I have talked a lot about this across the board in various threads, but can't get super good answers to my questions.

    So, Is this something I can accomplish with these plugins?

    Do these plugins still work with the current construct 3 runtime? Do you recommend me use them?

    If so, Could one of you send me a link to the up-to-date plugins?

    And, If you know of any super simple tutorials for less avid programmers (like myself), point me in their direction. thanks!

  • So, I have a bit of a follow-up set of questions now. I want to add firebase database features. Most people say to use rex's plugins. But I can't find a good tutorial on how to use these plugins. From My understanding, I need at least these three, so I installed them:

    And I have downloaded a whole library of construct 3 runtime rex plugins. Could someone redirect me to a good tutorial of how to use these things? Thanks.

haypers's avatar

haypers

Member since 10 Mar, 2018

Twitter
haypers has 8 followers

Trophy Case

  • 6-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies