Page 1 of 1

mongoDB to Store Game MetaData?

Posted: Wed Jun 10, 2020 8:17 am
by poids
Hi I am currently in very early planning stages for what I want to be my first real game and was thinking about introducing a global scoreboard that would store and compare top scores from different players around the world.

Since mongoDB is free when running off M5 or any small AWS free-tier instance, I was thinking of using it store score information and any other user meta-data that I feel like would enhance feature and functionality within a game (other fields could include email, username, timestamps, geoquery info to compare top scores within certain regions of the world).

Has anyone done anything like this?

I am thinking about mongoDB because it is something I use frequently as a data engineer but I have no idea what game devs use to store and user metadata.

Re: mongoDB to Store Game MetaData?

Posted: Sat Jun 13, 2020 10:14 am
by poids
I ended up finding this site with mongoDB API for lua:
https://api.mongodb.com/lua/0.1/

I want to try with some sample data but my thinking is I would perform read at beginning of the game and a write at the end after game is finished.

All meta-data would be store in tables just in virtual memory until game is complete and write is performed.

I'm really kind of guessing that this is how things are done but it makes sense to me.

I just found that API as first result on google search, but if there is lua/mongoDB API someone has used and can recommend, please let me know

Or if there is a whole different way I should approach handling player meta-data, I am open to any and all suggestions since I am still learning.

Re: mongoDB to Store Game MetaData?

Posted: Sat Jun 13, 2020 3:21 pm
by unek
you'd have to create & set up an API somewhere on a server that the game would connect to and that would validate and insert the records into the database. you can do it with any programming language and use EC2 or Lambda or something to run it.

connecting to your mongodb instance directly from your game would give every player full access to it - reading, removing, inserting, altering records.