A GDD is divided into several pieces:
*Overview
*Story
*Characters
*Non-Playable Characters(NPCs)
*Enemies
*Level Design
*Mechanics
*Interface
An overview contains the concept, genre, market, and features of the game. The concept tells what the game is about and is the core concept of the game. The genre is the type of game. The Marketing plan tells if you are going to sell the game and who you’re going market it to. The features list the things that set the game apart from the rest.
The story is what’s going on in the game. You inform the player about events that are occurring in the game and how they fit into it. The theme of the plot should match the game. List the plot elements and be through with your story.
Characters are the stars of the story. You should list the characters personalities, backstory, weapons, roles in the story, relationships, appearances, and abilities if they apply for the game. When making a character, try not to make them too shallow or too perfect. You characters should be unique and individuals, not generic and bland.
NPCs are just background characters who hang out doing nothing, even if the world is ending. Allies, Neutral, and Hostile are the three types of NPCs. Allies will assist you for a reason, Neutral are just on their own side, and Hostile lash out against you.
Enemies are the opposition. These break down into Normal enemies and Bosses. Most normal enemies are cannon fodder, but they still need to be thought out. Bosses are usually important to the plot and should be as well developed as characters.
Level design should have a description of each level as well as placement of enemies, items, important points, etc. You should also tell how the player interacts with the environment and how to progress to the goal of the level. You should also tell how the level connect.
Mechanics are the functions of the game. These includes the controls, which should be well explained and defined. If you don’t have this section then technical information won’t have anywhere to be placed.
Interface is the user’s window into the game. These include health, score, etc. In general display only what needs to be shown and don’t clutter the screen.
These are basics of a GDD. Some parts can be omitted and others can be added, it depends on the game you’re making. This is in no way a fixed guide, as you will constantly need to change around the document as your game evolves.