[PLUGIN] Firebase

Post your completed addons to share with the community

Post » Wed Nov 13, 2013 8:07 pm

Hazzah!

hopefully I have got rid of that error, and now it exports ok and also minifies ok.

was a lot more involved than I bargained for. Oh and authentication is working with facebook or email/password
B
14
S
5
G
1
Posts: 60
Reputation: 1,052

Post » Fri Nov 15, 2013 11:06 am

download plugin

run LIVE multi-user demo

Maybe its hard for non-git users to get to the plugin, so now the plugin is also distributed as a zip. I have also put up the exported demo application too. Try using it with multiple browsers at the same time, they all update at once! Magic!

For those with a curious mind, I am using TravisCI to automatically zip up the source files on a git commit, and write the plugin and demo to the github page branch (gh-page). So you can be sure the plugin link is always the latest release, and any contributions made will be distributed promptly (its fully automatic)

B
14
S
5
G
1
Posts: 60
Reputation: 1,052

Post » Fri Dec 06, 2013 11:20 pm

hey there im really interested in using your plugin, ive done a little work with it and even gotten a demo of my own started (and working!), but suddenly I'm getting an error from your plugin. Maybe you can help?
screenshot of the error:http://i.imgur.com/LGRxpNo.pngydt892013-12-06 23:20:48
B
7
S
2
Posts: 20
Reputation: 1,090

Post » Sat Dec 07, 2013 11:59 pm

Glad you had it working for a while!

Looks like you are trying to get a value before a callback has fired.

You can't use the expressions ValJSON, ValString etc. until inside a "Firebase callback" or "Firebase once callback"

If that doesn't help send me your capx to tom dot larkworthy at gmail dot com.
B
14
S
5
G
1
Posts: 60
Reputation: 1,052

Post » Mon Dec 09, 2013 3:00 am

Oops! Thanks for your help :D
B
7
S
2
Posts: 20
Reputation: 1,090

Post » Sat Jan 11, 2014 10:48 pm

hi its is possible to store passowrd, for example a user buy my app, then when he start the app the app give him a "licence password" for the app, the password have to be stored on a server.

also i dont know if its possible to check if the password exist, and how to check if the app is runing on 1 computer only, i ned to make an app who can be used in one computer by one user only (like almost every steam game)

thanks
B
37
S
15
G
7
Posts: 1,681
Reputation: 9,614

Post » Sat Jan 25, 2014 1:02 am

sorry to miss this. I am busy developing the server side technology extensively to build anti-cheating transactions (here)

I think your question is answered here


and kinda here


I think you need to work out a client solution of generating a key for the device and putting that in the user credentials. But that will be up to the technology platform you serve the game from to work out. Firebase will be no help at all, as it does not even collect meta-data like IP.

Tom

tlarkworthy2014-01-25 01:04:14
B
14
S
5
G
1
Posts: 60
Reputation: 1,052

Post » Sat Jan 25, 2014 5:48 pm

Hi I am getting an error trying to login with Facebook:



You know what is causing this?

Thank you!

Edit: Nevermind I got it, had to change to my Firebase URL



And how do I get the access token of the Facebook user using Firebase? And what if the access token changes during runtime? Could I get the new one?

I like the firebase plugin, but it kinda is a blow to have to pay for the service if you go over certain limits, and certain amount of people logged in... :/GameThirsty2014-01-25 21:29:56
B
18
S
6
Posts: 348
Reputation: 2,633

Post » Tue Jan 28, 2014 6:11 pm

So in the wrapper, I have not exposed the auth token of the facebook user, but its in there. There is a login object that has all the details like id, as well as the authentication specific stuff. You would have to add a function to the plugin to retrieve the facebook auth token.

I am not an expert on how Facebook works. The link above seems to suggest this token has some limitations but I don't understand what those are.

I love Firebase, its considerably faster than any self hosted solution, and does clever client side caching. You only have to pay once your app becomes popular, so I think its a really good deal that you get to play with it first. I have developed with Google App Engine too and it is SLOW!!! (and also you have to pay once usage increases). So if you know of any other solution I would love to hear.



B
14
S
5
G
1
Posts: 60
Reputation: 1,052

Post » Sat Mar 01, 2014 8:46 pm

I got asked about how you maintain live data connections to many opponents at the same time. What is the looping stratergy to iterate over multiple records and setup everything in construct 2? Here is the best solution I came up with:

place each JSON player record as a child of "/users/" in your Firebase e.g.
/users/fred/
/users/john/

Create a container object in construct two that associates all the separate graphical elements together (like the label that displays the name). Mine is ui_card, and ui_name, ui_status etc. This example was for a lobby, hence the construct 2 GUI elements were fairly boring sounding objects.

We will use RexRainbow's HashTable (https://www.scirra.com/forum/viewtopic.php?t=65765&start=0) to parse JSON objects coming back from Firebase.

Now to keep all players game objects synced we maintain a list of player data by:
1. register a *child_added* callback to Firebase ref("/users"). This will get called every time a new record is available (including for initialization)
2. create the child_added callback.
2a Create the construct 2 container and register its UID into a player_list dictionary (handy for name lookups later).
2b register a *value* callback on the specific player's record
3. create the callback for when the value of a specific player's record changes. When a networked player's data changes you can load the new data into your graphical representation so it affects the game world immediately.

Image
B
14
S
5
G
1
Posts: 60
Reputation: 1,052

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 6 guests