i’ve been working on a large scale game for a long time now and what ive realised is that a lot of players were struggling with loading in datastores, and because my game is so reliant on these datastores im trying to figure out whether or not if its just a me problem. currently im using 2 types of datastores: roblox’s datastores and an offsite datastore using google docs.
it seems that the primary culprit for the slow (or none at all) loading is the offsite datastore. is there any is there any way to reduce this lag? because in my testing phase when it gets to about 15 players on one map in the game, the datastore starts to falter. am i using an old method for a larger scale audience or is there any way to figure it out such as loading in less datastores?
theres no errors or anything, it just seems that the game refuses to load in data for a few people such as their location details that checks what their last province was, and they’re stuck in loading forever.
this is how i load my datastores:
(recently, ive been cutting down unnecessary datastores and merging a few into tables
--example of a saved datastore
--a handful of my datastores
Google Sheets is not really intended to be used like this. You are simply experiencing the compromises of using a free service as a quick access database that wasn’t intended to be a database.
Either stick with Roblox DataStores or use an external database rather than a calculation and graphing software full of non-db features that will slow it down.
Using Google Sheets as a database is not something I would recommend for games at scale. They’re good for smaller amounts of data that you may wish to manually edit and view but not thousands of entries that need to be frequently read from and written to.
That said, 15 players sounds incredibly low for you to be running into issues; how many requests are you sending per minute? I’ve seen Google Sheets used with larger numbers than this without running into any issues. Could it be possible you’re hitting Google’s rate limits?
There’s also something to be said about the macro you’re using in Google Sheets. If it’s the code I wrote back in 2015 there are a lot of improvements that could be made to it. I believe it iterates all keys in the database until it finds the correct one. Google has probably provided better ways to do this since 2015, so you could attempt to rewrite that code.
thanks for the tips, i havent looked too deep into the inner workings of external databases and i feel like i really should lol. is there anything you could recommend such as making my own or perhaps a better software?
15 is a bit of an understatement to be honest, im just talking more about 15 players on 1 province, during one of my testing phases we had about ~200 individual players on. (20 is the maximum for a single server, btw) after about 15 players on a single server the database began to crack, people weren’t able to load/go to certain provinces
yeah i was just reccomended to use it from someone who had a small scale game, who probably didn’t realise id have hundreds of individual players on. im thinking about sticking with the roblox datastores but i find them really awkward to work with, as they’re not very tangible (cant see the data stored, without running a code) and i struggle to work with stuff like that because im a very visual person.
is there any way in particular datastores can work cross-games in the universe system? i think i read about that but im not sure if that was just speculation.
Not within Roblox. You’d have to use an external service. Roblox’s DataStores can’t be read or written to past the game boundary.
could you recommend me a few services and/or methods? im not really sure where to look because ive taught myself how to code, i dont really have anyone to talk to about this
ive had a look and its been mostly mentioning web hosting but im not sure how i would format and link the databases.
stuff like this https://www.000webhost.com/
i am, however willing to spend money on a hosting system if it comes to that as i have a full-time job, i just do my game to wind off when i have free time
If your player count is in the hundreds, you will probably fall within the free tier of Amazon Web services. It’s a bit technical, but I set up mine with API Gateway, Lambda (using node.js) and DynamoDB and it works well if you are fairly good at logical programming.
It’s actually what DataStores use under the hood, but there’s so much additional flexibility and so many more things you can do when setting up your own custom system.