[plugin] firebase

Post your completed addons to share with the community

Post » Sun Jul 17, 2016 10:56 am

That would be great!
Thanks :-)
B
59
S
21
G
14
Posts: 779
Reputation: 13,927

Post » Sun Jul 17, 2016 12:17 pm

norman74 wrote:@AndreasR

I can't release my game because i need firebase and canvas+. Webview+ has poor optimization. I hope they'll make it soon.


Hi,

I'm not sure if @Ludei makes a Firebase Plugin for Construct 2 working with Canvas+, we just can hope and pray :)
We will see what time brings. But if your game just waits for the release of the firebase plugin, I personally would recommend you to switch either to WebView+ or to release the game without the firebase feature at the moment.
Then, if (and it's a big if) Ludei decidces to make such a plugin, to add those features with an update.

Regards
Andy
Image Image iTunes: Match3 | Google Play: Match3
B
106
S
39
G
31
Posts: 1,170
Reputation: 29,229

Post » Sun Jul 17, 2016 2:26 pm

@AndreasR

Firebase is the main feature in my game, so i can't without it. About Webview+, it keeps around 50 fps, but in "heavy" moments ~30-40. And it's really annoying, beacuse my game fully optimized. But.. thanks for support :)
B
36
S
13
G
2
Posts: 200
Reputation: 3,868

Post » Sun Jul 17, 2016 3:41 pm

I made a Firebase Template for Syncing Account Date (Coins, Inventory).
https://www.scirra.com/arcade/tutorial- ... count-9616

This is currently in beta, so if you found any bugs or have any suggestions, just let me know.
Once the code is working perfectly, I'll release the source code of the asset on scirra.

Please note
Scirra Acarde is blocking the Google login. Please use the mail login instead.

Thank you!
Image Image iTunes: Match3 | Google Play: Match3
B
106
S
39
G
31
Posts: 1,170
Reputation: 29,229

Post » Sun Jul 17, 2016 4:08 pm

@AndreasR

Use "Expression:DisplayName", "Expression:PhotoURL" to get display name or photo url from google account / facebook account. (sample capx) In email - password login, call "Update profile" to set these values.

Inventory... I would like to use rex_firebase_itembook plugin to implement that. But it might be too complex for a simple use case.

Thanks for sharing this template!
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Sun Jul 17, 2016 5:37 pm

rexrainbow wrote:@AndreasR

Use "Expression:DisplayName", "Expression:PhotoURL" to get display name or photo url from google account / facebook account. (sample capx) In email - password login, call "Update profile" to set these values.

Inventory... I would like to use rex_firebase_itembook plugin to implement that. But it might be too complex for a simple use case.

Thanks for sharing this template!


It actually fetches the user image. But it gets blocked by Scirra Acarde. I'll add the Display Name with an upcoming update, thanks for that hint :)
Moreover I'll add more handlers (facebook and so on)

Image from origin 'https://shatter-box.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://games.scirra.net' is therefore not allowed access.


I haven't used your Inventory Plugin yet. I'll check it :)

Thank you!

Regards
Andy
Image Image iTunes: Match3 | Google Play: Match3
B
106
S
39
G
31
Posts: 1,170
Reputation: 29,229

Post » Sun Jul 17, 2016 10:43 pm

@rexrainbow

I am trying to get your FireBase Authentication plugin working on mobile(Facebook login) but cant for the life of me get it to work. I tried Cranberrys "InAppBroswer" plugin but this doesn't work properly ( it gets stuck on the FB login page after entering details ) and i have tried just using the "Browser" object to see if i can get it too work but no luck there either - Have you, or anybody else, using Cocoon, been able to get Firebase Auth to work on mobile?

Thanks for the plugins Rex, you are awesome.

Metric
B
9
S
3
Posts: 47
Reputation: 809

Post » Sun Jul 17, 2016 11:34 pm

@METR1C

According to @AndreasR said,
It should work for WebView(+) on CocoonIO and Intel XDK (install the inapp browser plugin), however it will not work with CocoonIO's canvas+ engine due to the fact that Canvas+ do not support websockets.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Mon Jul 18, 2016 1:15 am

@AndreasR

There are 2 possible plugins for saving items of users in firebase -

1. rex_firebase_itemtable which address a value by ( itemID, propertyName).
[itemID]
----[propertyName] - value
In your case, it will be ( userID, itemName ), for example ( userID, "coin" ) = 1000

2. rex_firebase_itembook which address a value by ( tableID, itemID, propertyName )
[tableID]
----[itemID]
--------[propertyName] - value
It support updating multiple tables in a writing access (atomicity).
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Mon Jul 18, 2016 7:04 am

rexrainbow wrote:@AndreasR

There are 2 possible plugins for saving items of users in firebase -

1. rex_firebase_itemtable which address a value by ( itemID, propertyName).
[itemID]
----[propertyName] - value
In your case, it will be ( userID, itemName ), for example ( userID, "coin" ) = 1000

2. rex_firebase_itembook which address a value by ( tableID, itemID, propertyName )
[tableID]
----[itemID]
--------[propertyName] - value
It support updating multiple tables in a writing access (atomicity).


@rexrainbow

Thank you for the links. I'll built an example for those plugins as well.
I'm also writing a tutorial for it then.
Feel free to link it on your website (I'll send you the links once I'm done).

Regards
Andy
Image Image iTunes: Match3 | Google Play: Match3
B
106
S
39
G
31
Posts: 1,170
Reputation: 29,229

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests