Retrieving snapshots of game statistics
Posted
by
SatheeshJM
on Game Development
See other posts from Game Development
or by SatheeshJM
Published on 2014-08-21T12:25:39Z
Indexed on
2014/08/21
16:30 UTC
Read the original article
Hit count: 273
What is a good architecture for storing game statistics, so that I can retrieve snapshots of it at various moments?
Say I have a game, and the user's statistics initially are:
{
hours_played = 0,
games_played = 0,
no_of_times_killed = 0,
}
When the user purchases something for the first time from within the game, the stats are
{
hours_played = 10,
games_played = 2,
no_of_times_killed = 5,
}
And when he purchases something for the second time, the stats are
{
hours_played = 20,
games_played = 4,
no_of_times_killed = 10,
}
Let me name the events as "purchase1" and "purchase2"
How do I model my statistics, so that at any point in the future, I will be able to retrieve the snapshot of the statistics at the time when "purchase1" was fired. Similarly for "purchase2" and any other event I will add.
Hope that made sense..
© Game Development or respective owner