[plugin] firebase

Post your completed addons to share with the community

Post » Wed Feb 11, 2015 12:41 pm

@rexrainbow
Is it possible to create a multiplayer lobby with rooms using your firebase plugins? May be lobby could be just a C2 object which is monitored on firebase server and rooms are items? I'm trying to figure out how to implement it.
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

Post » Wed Feb 11, 2015 12:55 pm

@xoros

Here is a demo of lobby and rooms. And Capx file1. Capx file2 - chat room only.
I had not finished these documents.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Wed Feb 11, 2015 1:17 pm

That's great, man - thank you!
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

Post » Fri Feb 13, 2015 1:41 pm

@rexrainbow

Following question:

Data get pushed to the firebase, but there's a weird randomly generated key like that "Ji29D5OOCXw8DoQe98_:" on top of each message. Is it possible to disable it or set this key manually?
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

Post » Fri Feb 13, 2015 2:21 pm

Ah, ok - it's possible to set manual key with "Set Value" method
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

Post » Mon Feb 16, 2015 1:13 pm

@rexrainbow

A small feature suggestion for the firebase "query" plugin:
- pick random dataset from the set query
- or maybe pick dataset by expression
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

Post » Mon Feb 16, 2015 3:43 pm

@xoros

Firebase does not support random picking directly. User needs to fetch all items then picking in local. But this solution might not efficient since it fetch all items back.
So that I made another plugin for picking with conditions (expression) - rex_firebase_itemfilter, it saved each key of item and the properties into individual nodes. Call "Action:Get random items" to get keys of random items (dataset), then fetch these items by keys in other plugin like rex_firebase. (rex_firebase_itemfilter only used to get keys)
There is another rex_firebase_itemtable for storing item (dataset) in 1d hash table.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Mon Feb 16, 2015 9:34 pm

Cool, I will try that.
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

Post » Mon Feb 16, 2015 11:56 pm

@xoros

Querying feature is the weakness in firebase, although firebase had added more functions in querying.
So my sloution is firebase (for real-time) + parse (for static data), it is another story...
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Tue Feb 17, 2015 9:06 am

Interesting, I will try parse for static data.
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 6 guests