Firebase Extension
Create Realtime Games
Platforms
Works only in HTML5.
About this extensionFirebase is a complete platform for building mobile and web applications.
It provides a real time JSON database for storing and sync your data with applications.
Firebase Extension is a new Stencyl Extension that lets you use the Firebase
with three lines of code!
Recommendations for useA public multiplayer game requires better security rules to make this available online.
Use this only in pessoal prototypes or private educational games.
Do not use in commercial games and do not post on Itchio and etc .
The free version of Firebase supports only 100 simultaneous users.
Get it-
Download Firebase Extension(How to Install and Update an Extension)Get Start1. Create an account on firebase.The first thing you need to do to get started with Firebase is
sign up for a free account.
2. Create an application in firebase.To use this extension you will need:
apiKey and
projectID3. Firebase authentication.In Firebase project go to
Authentication ->
Sign-in method -> active anonymous
Stencyl Project1. Create a new project in stencyl.Access Stencyl to create your game.
2. Set Firebase apiKey and projectID and game attributes.Always use "/" to define the database URL
3. Use Game attributes to get data.4. Use Update block to update data in Firebase. In this example, when you click the W key, the player1 score increases by +1
5. How store data to different users? Data is Set and Get always as string.
Project Demo: how move charsStencyl0- Download and open project:
Download1- Open "Login scene"
2- Set your "apiKey" and "projectID"
3- Right side header panel: Change platform to "HTML"
4- Right side header panel: Click Button "Test game"
Game5- Insert input username as "player1"
6- Click button "Start"
7- Open other tab browser with same game url
8- Insert input username as "player2"
9- Click button "Start"
10- Use arrow keys to move
DocumentationFor details on data security and user authentication visit:
https://www.firebase.com/docs/security/----------------------------------------------
ApiKey Block (String) Inputs - Value (as String)
ReturnsThis is a action block that does not return a value.
----------------------------------------------
Create Game Attribute Block (STR)Inputs - Value (as Text)
ReturnsThis is a action block that does not return a value.
----------------------------------------------
update Game Attribute Block (STR)Inputs - Value (as Text)
ReturnsThis is a action block that does not return a value.
----------------------------------------------
Version HistoryVersion 1.0 - Deprecated
Version 2.0 - 06/11/2015 - Update Build 8737.
Version 2.0.1 - 06/11/2015 - Bug fix: Int to Float Number.
Version 3.0.0 - 20/06/2020 - Simplified version
Notes- It works only on HTML5.
- To "big data" post in format JSON string and use JSON parse.
- A public multiplayer game requires better security rules to make this available online.
- Use this only in pessoal prototypes or private educational games.
- Do not use this in commercial games and do not post on Itchio and etc .
- The free version of Firebase supports only 100 simultaneous users.
License:
The MIT License (MIT)Copyright (c) 2015-2020 Gurigraphics
Special thanks: mdotedot