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.