View Single Post
  #1 (permalink)  
Old November 8th, 2008, 11:39 AM
lord_midnight lord_midnight is offline
Registered User
 
Join Date: Nov 2008
Location: , , USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default some help designing my database

I got your book, I read part of it, and I liked it so much I bought a copy. I am going to use it as the basis of an online site/game I am making. The game is a turn based strategy game, played through a web-browser, probably using flash. Im not to the coding of the client yet, but Im trying to integrate as much as I can. When you go to the town square and post on the bulletin board, you are posting in the forum, etc.

 Right now, I'm setting up the login and forum system. Later, I will add more functionality and features. I'm taking a class on PHP/SQL at my college, but I am still pretty new at this.

I want to make sure I do things right, so I am trying to figure out the best way to setup my tables.

I need to discuss this with people, to better understand it.This is where I am so far:

fname, lname
username (unique)
password
B-day
email
referrer
IP
UserID (primary key)
location/timezone
avatar
faction
campaign

I also have units, which have several attributes, and each unit, though made from a template, can have customizations, like new skills, or items equipped. Not to mention the name. Each unit gets a randomly generated name.

There will be mini games, the first involves clicking on a map, and then getting an item based on that location, like a treasure hunt, but you only get one item per day.

I know I am going to need to add a little at a time, right now, I want to get the basics going, and registration and login system, and a forum. Chapters 1 and 2. I downloaded the source code, and I have read through it a couple times, still some things I don't get, but I think I'll be ok. It looks like most of what I need to do, is add columns to the SQL, and fields to the User class.

I was told by someone, that making a table for each user is a bad idea, Im not really sure why. I had thought that way, I could add a row for each unit they recruited, or item they found.

Basically, I have possibly thousands of users, I hope someday, each with numerous units, each unit just needs to be considered unique, and many items, and lots of other information. I also will have locations, each will be an isometric tile map to load in flash, and I will have data on many of those, as users can claim locations, and add fortifications, etc. I want to make sure I have everything planned out as best I can.

Big project, I have pretty much the rest of this year and most if not all of next year to work on this 20-40 hours per week. It wont be that hard if I just do it piece by loving piece. I need some help. I want to get the login system, and the forum by the end of November. So, I just want to make sure I setup the database right, so I don't end up making my users redo anything. Pointers, suggestions, information ?

Reply With Quote