Basically, i've been a hobby game programmer for a long time (well about 10 years - i'm now 30 years old) and i'm always thinking about new ideas. Recently, my wife must've noticed that i'm always talking about ideas and never doing. So she just urged me to actually do it. (Normally i write ideas / little snippets in excercise books all around the house).
So i attempted to start a design document for my games but my mind starts drifiting about more and more ideas and i just cant get the game design doc written. I dont know what it is but i think its because the design document is not doing anything.
So anyway, what i attempted to do in my latest game example is to actually start on the database and use that as a design template. So using my current game as an example:
So my new game is set in space so my first line of thought was how do i define the game world? well it makes sense that the "regions" of space would be broken up into Solar Systems so i created my first table called "solar_system". So what goes into a solar system? Well you need planets to make up a solar system so i made a table called "planet". Now a planet can only exist in 1 solar system so i added a "solar_system_id" field into the planets table.
What else can be in the solar system? well i'm going to want to have space stations so i made a "station" table and because a station could exist on a planet or in space, i made a station_solar_system_link table and a planet_station_link_table. Inside the station, i'm going to want to have "stores" setup so goods can be bought and sold so i make a "stores" table and link it to stations with the "station_id" field. I'm going to want to have some form of storage system so i make an "inventory" table and a store can have storage space and a ship can have storage space so i link the "inventory" tables to the "store" table and another link to the "ship" table etc...
Basically, i just keep flowing through and making the database structure to handle the ideas that i have. Its amazing how well this is working for me as i still have to plan what features i want and how i want it to work. The most detailed one i have gone through so far is the Mission system. The tables involved are:
Mission - This stores the general info about the particular mission
Mission_condition - this is where you can create a whole bunch of conditions that need to be met to enable the mission
Mission_condition_type - Stores all the types of conditions you can have so i know how to interpret the values in the mission_condition table
Mission_Mission_Condition_link - Because i want the ability to have multiple conditions for a mission and conditions can be re-used for multiple missions, this table will enable me to link any number of conditions to the mission
Mission_reward - this is where you create the various rewards that can be received for completing a mission
Mission_Reward_type - Stores the type of reward so the reward values are handled correctly i.e. Qty of a particular resource, qty of an actual item, qty of rep etc..
mission_mission_reward_link - Enables you to link multiple rewards to the mission
Mission_task - Stores the actually tasks that need to be done for the mission - built to handle any type of task i can come up with
Mission_task_type - Stores the type of task so the values are handled correctly - enables me to offer different mission tasks (eliminate enemy, deliver item, earn particular rep etc..)
Mission_mission_task_link - Enables mutliple tasks to be assigned to a mission
So you can see that by designing the database tables, i have actually started the mission design process and i have designed the tables in such a way that when i eventually start designing the various missions i want to offer, the database structure is not going to be holding it back so its going to be very easy for me to actually code the missions.
The reason this is working soo well for me is the fact that i am actually doing something that is going to be used in my programming so its not "wasted" time. (i fully understand the advantages of a design document and its obviously not wasted, but for me i am just struggling to put time into the doc when i could just be making the database).
I just wanted to share this technique incase there are others out there having a similar issue to myself. I'm certain there is negatives to this way and i'm not claiming that this is an awesome way or the best way to design games. But if you are having trouble starting your game or find writing the design document to be a waste of time, try designing the database first and see if it works for you.
The basic premise i am keeping in the back of my head while making the database is i dont want an ability or feature to be unable to be done because of my database structure. So i'm keeping the database in a very normalized state and making sure that i'm giving it the flexibility so when i actually go to add features into the game, that the database structure supports it.
Just an FYI
![:)](http://public.gamedev.net/public/style_emoticons/<#EMO_DIR#>/smile.gif)