As you may know, in this game users catch monsters, and these monsters have tons of attributes of their own. There's a lot of them, and one goal is to "catch 'em all", so an active player would potentially have hundreds in their possession. Even after playing a few hours they would have dozens.
The problem I have is with:
1) Object count limits
2) Bandwidth consumption (for loading and saving objects)
With only 25K objects, storing each monster as an object would fill the DB quickly. That would be 100 monsters for 250 players. My plan then is to stick a few monsters in the Player object, and have a second object that stores all other monsters (let's call it the box). So, only two objects per player....but one will be kind of big, and the second will be absolutely massive. This would leave room to grow, though; now thousands of users could play long hours without hitting the storage limit.
My question then:
1) What would be your recommended design, if not like above?
2) Will the impact from loading and saving these massive objects be significant? (My intuition says yes!)
Below is a pretty realistic use case. The Pokemon gameboy games have this many values assigned to each monster. Would 400 of these assigned to one user in one object be doable, and would it chew up LOTS of bandwidth?
- Code: Select all
'exampleuser' = {
1: {
Species: 'Exampachu',
Nickname: 'Butts',
isEgg: false,
Level: 5,
Exp: 331,
Status: 'Burn',
CurrentHP: 40,
EV_HP: 50,
EV_Attack: 50,
EV_Defense: 50,
EV_SpecialAttack: 50,
EV_SpecialDefense: 20,
EV_Speed: 20,
IV_HP: 20,
IV_Attack: 16,
IV_Defense: 13,
IV_SpecialAttack: 12,
IV_SpecialDefense: 18,
IV_Speed: 30,
Item: 'Light Ball',
Ability: 'Rain Dance',
Nature: Timid,
Cool: 100,
Tough: 90,
Beauty: 70,
Smart: 120,
Cute: 50,
Moves: {
1: {Name: 'Tackle', PP: 15},
2: {Name: 'Growl', PP: 40},
3: {Name: 'Thundershock', PP: 20},
4: {Name: 'Thunderwave', PP: 20}
}
}
}