954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

looking to create a textbased browser game

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.

writerervin
Newbie Poster
13 posts since Nov 2010
Reputation Points: 10
Solved Threads: 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.

Insensus
Junior Poster
112 posts since Mar 2011
Reputation Points: 70
Solved Threads: 46
 

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?

writerervin
Newbie Poster
13 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

What do you mean by hard coding something into a table?

Insensus
Junior Poster
112 posts since Mar 2011
Reputation Points: 70
Solved Threads: 46
 

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.

writerervin
Newbie Poster
13 posts since Nov 2010
Reputation Points: 10
Solved Threads: 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

Insensus
Junior Poster
112 posts since Mar 2011
Reputation Points: 70
Solved Threads: 46
 

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

writerervin
Newbie Poster
13 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: