|
| 09 Jul 2011 03:50 PM |
I have an idea for another data persistence item. If you already have found a way to do this, please post here.
My idea is to be able to save data (string, instance, bool, number), but not to a player. Be able to save it DIRECTLY to a game. Not the server, but the game. I.E. This could be used to access statistics for say, a global leaderboard, or maybe a way to see if your friend plays it, and what his stats are?
Here is how it would work:
Player:SaveBoolToGame(key,val) Player:SaveNumberToGame(key,val) Player:SaveInstanceToGame(key,val) Player:SaveStringToGame(key,val)
Player:LoadBoolFromGame(key,player) Player:LoadNumberFromGame(key,player) Player:LoadInstanceFrommGame(key,player) Player:LoadStringFromGame(key,player)
This would allow for the loading of any players item from the game, and using it on any server.
Uses(A short list):
Tracking player chat(Yes, really!), Viewing the longest time alive on a survival game, Seeing the best ranking player on an RPG, Seeing the best player on a war game, Seeing (PD) achievements of other players, and which is most common, vise versa, And lots, lots more!
Please, post feedback, what you think is wrong, or right, and see if we can get this made! |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jul 2011 03:56 PM |
Hmmm......
This seems like a good idea, but there should only be one method(If Lua supports over-loading methods):
Player:SaveGameData(key,val)
and for loading:
Player:LoadGameData(key,player)
Easy. Oh, and SUPPORT. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 03:57 PM |
| I know right? So many people could use this for leaderboards, and it would be a basic thing to learn! So supporting. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 03:57 PM |
| I like the idea of a single piece. Maybe Player:LoadDataFromGame(valtype,key,player) or so? |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 04:00 PM |
"I like the idea of a single piece. Maybe Player:LoadDataFromGame(valtype,key,player) or so?"
Yeah, like that, but this'll only work if Lua supports overloading methods like Java, so don't get too trigger-happy yet. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 04:00 PM |
| Oh, and, does anybody know if Lua supports overloading methods? |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 04:01 PM |
| Hand me a gun, the magazine is gone in a second. Lol, but it would still be nice, wouldn't it? To load a global leaderboard? I just love the idea. Thanks for supporting. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 04:11 PM |
| Bump, also I don't know. That's a good question. Also who feels they should upgrade the Object browser and give examples of what each thing is? I think they should. |
|
|
| Report Abuse |
|
|
superflee
|
  |
| Joined: 28 May 2008 |
| Total Posts: 244 |
|
|
| 09 Jul 2011 04:22 PM |
Using this data persitance method, we could bind the servers together! I support! |
|
|
| Report Abuse |
|
|
yrupoop
|
  |
| Joined: 29 May 2010 |
| Total Posts: 754 |
|
| |
|
| |
|
|
| 10 Jul 2011 03:59 PM |
Why use the method on the player? It would make more sense to do something like:
game:SaveString("testString", "Example")
But I definitely like the general idea. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 04:00 PM |
| Yeah, I thought about that right after the initial post. But yeah, and you would have to state the player that had it saved, as well. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 04:04 PM |
But you wouldn't always be saving data involving a player.
And you could have a string "highplayer" and a number "highscore" working together in the first place. |
|
|
| Report Abuse |
|
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
|
| 10 Jul 2011 04:05 PM |
| I like it because then it lowers the needs for badges now that you could be able to create a whole leaderboard of players who played the game with all thier stats. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 04:06 PM |
@Shob; They already have that. It's called Data Persistence. -_- I mean, the ability to VIEW a GLOBAL leaderboard, of EVERYONE who has ever entered/played the game. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 04:08 PM |
| I'm still trying to figure out how to scrtip Data Persistence. |
|
|
| Report Abuse |
|
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
|
| 10 Jul 2011 04:12 PM |
@slime
Read my post carefully:
I like it because then it lowers the needs for badges now that you could be able to create a whole leaderboard of _players who played the game_ with all their stats.
"players who played the game"
That means everyone. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 04:12 PM |
| You have to say global leaderboard. They already have a leaderboard. Sheesh. |
|
|
| Report Abuse |
|
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
|
| 10 Jul 2011 04:14 PM |
| I can use the term leaderboard because it doesnt matter if one already exists, but it matters what you put in it. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 04:15 PM |
@Shobo The current data persistence allows for you to get stats from any player. Which is fine for some cases, but not for others.
This suggestion is for something like an inter-game highscore board, or for a global leaderboard that is independent of WHICH players are in-game. |
|
|
| Report Abuse |
|
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
|
| 10 Jul 2011 04:17 PM |
@Nickardson
I understand what the idea is, and I was just expressing a use for it which was clearly misunderstood. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 04:19 PM |
| No more fires plox. This is a peaceful suggestion. |
|
|
| Report Abuse |
|
|
Nikilie
|
  |
| Joined: 28 Jun 2011 |
| Total Posts: 6132 |
|
| |
|