Firestore - can i create a database?

Hi,

does anyone of you have experience with the Firebase->Firestore feature?

I would like to use the Firestore to create a database to use it in “realtime” for a rather slow round based board game. It’s purpose would be to create a new data set each time a game session will be created (lobby like system).

But i can’t find anything about creating a database in the wiki

https://wiki.gdevelop.io/gdevelop5/all-features/firebase/firestore

Do you have any idea if it can work?

Thanks!

2 Likes

It works, but you need to monetize your game in order for it to be plausible.

There is a limit to the number of free daily write/read/deleite actions at firestore, and that limit is very easy to reach.

Thanks for the hints Digi.

I figured out that because of the very limited read/write/delete actions in Firestore it makes more sense to go with Realtime Database. I don’t need microsecond read/writes to the database so it is OK. The download amount is limited to 10GB without payment, so for the beginning it will do the job. Later it’s 1$/GB which is the point where it would be necessary to monetize.

The no-cost variant has only one database, so it’s not possible to exactly create one. If you switch to the blaze plan, you can have more databases. However, in GDevelop i still don’t see the option to create one and i think it’s OK.

In case some of you are wondering how to make new fields in the database, you could go like this:

This would add all the structures (including the root “Players”) if not already present in the database. VariableStrings can be easily used in the path string.

1 Like