recently im trying to create a isometric game for facebook pretty much like Empires and Allies in facebook , i have used as3isolib to create the game , the user interactions are almost ready , but im stuck in designing the database for it .

i tried to search online but i could'not find any source or sample db designs for it ,,, i have big problem in design db in the way that can handle the different item types , like , housing , research labs , units , their staus and so on, let's say when we build a house it would have different levels to be completed , or different building has different product , and some item's product is still a product , like military house which produce soldiers ... if any body can guid me or a sample design i'll really appreciate it . Thanks.

  • \$\begingroup\$ It looks like you asked this question twice on two sites: stackoverflow.com/questions/7261764/… \$\endgroup\$ – thedaian Aug 31 '11 at 19:22
  • \$\begingroup\$ :D yes i put in 2 different websites to find out the answer.. actually i have designed some simple one , it works fine ,, the systems which i had done before were not games, and in smaller scale .. the games like this has a very big scale , that's why i need some guides about it :) maybe i design it but at the end if i have not considered some parts it may makes a big trouble to modify the design and codes, :) \$\endgroup\$ – Delavega Aug 31 '11 at 19:45

Marco even though it's a huge project doesn't mean you have to think about everything at once. Try and take it step by step, think about what the core feature is of this game you are trying ot make is and build out from that. Don't try and think of the entire scope and design EVERYTHING at once.

When using a relational database you want to think about everything in how they relate to each other, try and visualize everything you are trying to make as an object with their own properties and then figure out the relation ship between them all. For instance you have a player object that represents the player, the player has an email address, password, and lets say and avatar image, Well there you go! That's your first table. Now we have all these different kinds of item objects, such as buildings which have names, types (housing, research lab, etc), then their are unit objects and so on... Well you have your buildings table, and units table. Then what you can do is create a new table called "player_units" which could just contain a player id and the units id, that would be defining a relationship right there.

If you try not to over think everything and take baby steps, building out and thinking about features as you needed them it won't be that difficult to design the database.

  • \$\begingroup\$ Thanks joseph for your guide , i think that's the real problem since i was trying to picture the whole system at once, and makes me lost, i try to use your guide and go step by step to come out with a complete , its a good lesson ,(however i dono why when i asked this question in stack overflow i got 3 vote down and my question closed :D quite disappointing ) ;) \$\endgroup\$ – Delavega Sep 1 '11 at 5:05
  • \$\begingroup\$ Glad it helped, remember always start small ;-) Good luck! :-D \$\endgroup\$ – Joseph Burchett Sep 1 '11 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.