Just as how a writer works from an outline or mind map, or an artist works from a rough sketch, nearly all games start from some sort of a rough concept or design document.
A design document's purpose is to describe nearly everything about a game. In the case of an RPG, it would describe how the player moves around the game world, how the player interacts with enemies and NPCs, how combat works, and more. The design document becomes the basis upon which all the game code is built.
Usually, a game starts with a very rough concept.
For example, let's consider the RPG we'll be making in this book. I might have the idea that this game would be a linear turn-based RPG adventure. It's a very rough concept, but that's ...