0

Hi there. I'm looking to create a textbased browser game based on my old favorite anime. I figured out the basic structure of the data, but i've got one problem. is there a way to set the data up where a single user can have several of one item, each one upgradable seperately? I would appreciate any help.

3
Contributors
7
Replies
9
Views
6 Years
Discussion Span
Last Post by 8g2h8bt9
0

This is just a suggestion but maybe it'll be the key to you figuring it out.

Keep an 'items' table containing all the items in your game with a structure like:
id, type, upgrades, owner
Then you could just fetch all items with a certain type and a certain owner enabling multiples of one item upgradable seperately.

0

thanks for the input. also is there a way that the user can have a variable number of an item without hard coding the number into the table?

0

i mean like putting into the table the maximum number of total items. i would like to be able to put it into the table, without having to worry if the maximum number isn't exceeded.

0

Well I think my approach is only limited by the physical MySQL limits which probably results in more than enough room for items unless your game goes really big.
But then you'd probably get some real programmers to do the job for you, eh. :p

0

the approach would to be to insert the item into the user table, then. that should work. i appreciate the help.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.