generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why isn't Data Persistence Per-User-Per-UNIVERSE?

Previous Thread :: Next Thread 
jewelycat is not online. jewelycat
Joined: 10 Sep 2008
Total Posts: 17345
06 Mar 2014 04:14 PM
I mean, DataStore is nice and all, but it's not meant for (and imo absolutely shouldn't be used for) individual player stats, unless the top few are being recorded for a global leaderboard. So what's the point of making universes if any games using them can't have universal per-user data?

Blog: "...you could even make your own Minecraft. Your own Clash of Clans. Your own Skyrim."

Let's make Skyrim, but every time you're teleported to a new area, you have to restart your character entirely. :l
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
06 Mar 2014 04:21 PM
I think the whole point is that you can. I have yet to look into universes, but I thought that one of the features of data stores is that you could use the same data stores from anywhere in the system of universes.

Are you sure you are not doing something wrong?
Report Abuse
jewelycat is not online. jewelycat
Joined: 10 Sep 2008
Total Posts: 17345
06 Mar 2014 04:22 PM
DataStore is universal, yes.

Data Persistence is not. If you are teleported to a new place, regardless of whether or not it is under the same universe, the data is separate.
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
06 Mar 2014 04:25 PM
You could have players wait at a loading screen/walk around for a minute, max, and then load their stats. Not the best system, but it is pretty useful.

For instance, you could use :SavePlace and :CreatePlace to make a world that 1(or more) player(s) can start, then modify, and then come back to, without worrying about interference from other players(i.e. build a base)

You could use DataStores to control who has access to which places/servers. If you want to ban someone from a place, you either have to use a Personal Server, or wait until they join the game to ban them. With the data store, you can check if they have access to the place without even allowing them into the place.

You can use the data store for cross-server markets.

You can use data stores to keep track of the rest of a big world, and create a game similar to Planetside/WoW(keeping track of team-owned holds, bases, etc)

You might even consider using :SavePlace to make your own Personal Server(really only useful for NBC)
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
06 Mar 2014 04:27 PM
Oops -- I ended up cutting out a sentence and making the post confusing. The first sentence is a partial solution to "you have to restart your character entirely. :l" The rest are possible things you can do with universes/data store.
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
06 Mar 2014 04:28 PM
I guess that you will have to use data stores for storing player information in, whether you like it or not. I really think that in the long run you will prefer the Data Stores over Data persistence, due to the fact that it doesn't fail when the server disconnects and the fact that there are so many more possibilities with it.
Report Abuse
jewelycat is not online. jewelycat
Joined: 10 Sep 2008
Total Posts: 17345
06 Mar 2014 04:33 PM
@Echo, yes all that stuff is great, but the first one is just an ugly 'solution' to the Data Persistence problem.

The player would have to wait every time they changed places for their data to load. And if I have 10,000,000 place visits on a game, I don't think DataStore can handle 10mil keys (assuming 1 key per player) of data for each user individually. All saving and loading would have to stay under the request limit. It doesn't seem like an efficient way to do things.
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
06 Mar 2014 04:39 PM
Quote from the Data Stores page on the Wiki:

"DataStore is throttled to prevent flooding of services. Only 60 requests + 10 * numberOfPlayers can be made per minute. For example, if you have 2 players in your game you can make up to 80 requests per minute (60 requests + 10 requests * 2 players)."

Each player can have 10 requests. I am not entirely sure if requests mean BOTH updating and retrieving the data stored.

An idea could be to keep a "player storage" within the ServerStorage service, which holds the information about the player. So any updates to the inventories or characters will update their player data stored inside ServerStorage. This means that requests don't have to be made every time a update is needed.
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
06 Mar 2014 04:40 PM
Forgot a sentence.

This means that when a player wants to swap universes, that is when you use Data Storage to save the changes made to the character, ready to be picked up from the new universe.
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
06 Mar 2014 04:40 PM
You could temporarily save the stats to the Data Store, then when the user teleports to the place, save it to their Data Persistence, and then delete the data from the Data Store.
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
06 Mar 2014 04:41 PM
There's a delay in loading/saving?
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
06 Mar 2014 04:42 PM
@bohdan: There's a 1 minute delay for Data Stores syncing with other places in the universe.
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
06 Mar 2014 04:44 PM
Ouch, that 1 minute delay is going to hurt. Early days though. It will probably be improved in the future. But for now, I guess you have to find some other way to waste the player's time while the data stores sync.
Report Abuse
Bubby4j is not online. Bubby4j
Joined: 25 Dec 2008
Total Posts: 1831
06 Mar 2014 04:44 PM
PLUS the server also gets 60 requests to start out with.

It really is plenty. If you only count the 10 per player, that means every single minute you could store 10 key/value pairs. It's plenty.

As I understand it, DataStores are meant to basically replace Data Persistence. There's no point in the developers spending time making DP work per-universe.
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
06 Mar 2014 04:48 PM
@Decomp: It depends how the teleporting is implemented. If you separate the place into chunks, then it's going to be a bigggg problem, but if you only have the player teleported when going to a new area, such as a cave, it won't be that much of a problem. You can easily cover it up with a loading screen that lasts 1 minute(if that). Based on the way the wiki worded it, it seems that it doesn't always take 1 minute. On top of that, if you save your data to the store, 5 seconds before the data store in the server is synced, then you only have to load 5 seconds - however long it took you to load the new place.
Report Abuse
MettaurSp is not online. MettaurSp
Joined: 20 Mar 2010
Total Posts: 3179
06 Mar 2014 04:49 PM
Why not ("%d:statHere"):format(player.userId) for player stat keys? I am working on updating a game to use a table for per player stats.
Report Abuse
MettaurSp is not online. MettaurSp
Joined: 20 Mar 2010
Total Posts: 3179
06 Mar 2014 04:49 PM
Wow, really late post o3o
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
06 Mar 2014 05:35 PM
Its nice, because I can set the scope to "user:userId" and then store all the info there. Useful in my RPG with multiple characters ;D
Report Abuse
MettaurSp is not online. MettaurSp
Joined: 20 Mar 2010
Total Posts: 3179
06 Mar 2014 05:37 PM
That is a possible scope? I couldn't find any scope list in the documentation o3o
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
06 Mar 2014 05:37 PM
...It can be anything.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
06 Mar 2014 05:39 PM
Just creates a different scope

Like

do --global
local Data1 = {1, 2, 3}
end
do --user:123456
local Data1 = {1, 2, "Nope"}
end
do --user:123457
local Data1 = {1, 2, "Avi"}
end
Report Abuse
MettaurSp is not online. MettaurSp
Joined: 20 Mar 2010
Total Posts: 3179
06 Mar 2014 05:41 PM
Ah, okay. I was assuming it was defining whether it was per place or not or something like that. Then again, it would be an enum if it was like that.
Report Abuse
flump is not online. flump
Joined: 30 Jul 2008
Total Posts: 1039
06 Mar 2014 06:05 PM
I know people are saying that it takes a minute for data to sync to all the other servers but is that really going to be a problem when it takes more than few seconds to get into the new server anyway?
Report Abuse
Durfungus is not online. Durfungus
Joined: 07 Feb 2009
Total Posts: 15988
06 Mar 2014 06:11 PM
it doesnt take a minute to sync, mine syncs instantly, if you dont believe me test it here

http://www.roblox.com/Durfunguss-Place-Number-37-place?id=147392117

[HELP, DURFUNGUS IS SPREADING] LEEDLE LEEDLE!
Report Abuse
jewelycat is not online. jewelycat
Joined: 10 Sep 2008
Total Posts: 17345
06 Mar 2014 07:04 PM
And so far almost everyone has ignored the most important factor: number of players. No duh your game updates instantly. Get 5,000 players in your game and see how well that goes. No duh I can make a new scope/key for each player, now do that for 10,000,000 unique players and see how well that goes.

And @whoever suggested clearing keys after they're transferred to DP, look at how much can go wrong. Server can crash, player data is no longer saved universally, player gets data-reset. And how would you know whether or not the data is updated? Even if you save a tick() with it, tick() varies by different server timezones.

This is not a legitimate per-player saving system, it's an ugly, hacky, inefficient, and all around bad use of DataStore.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image