Setting Up the Project : Directory Structure 1


In this post I am going to cover the third party libraries, project breakup, and current directory structure that I follow. Even though its not perfect, it has served me well so far

Third Party Tools

  • libogg and libVorbis- Sound
  • TinyXML – XML
  • Zlib – zip

Projects in the Solution

  • Base
    • common data structures and classes
    • Dependencies – None
    • Project Includes – None
    • Additional Includes – None
  • Utilities
    • All Utility Functions
    • Project Dependencies and Libraries – Base
    • Project Includes –  Base
    • Additional Includes – TinyXML and Zlib path
  • AI
    • AI related Functionality
    • Dependencies – Base, Utilities
    • Project Includes – Base
    • Additional Includes – None
  • GraphicsEngine
    • All Graphic related code
    • Dependencies – Base, Utilities
    • Project Includes – Base, Utilities
    • Additional Includes – DirectX Includes
    • Additional Libraries – None
  • Sound
    • Wrappers for playing sound
    • Dependencies – Base, Utilities
    • Includes – Base, Utilities
    • Additional Includes – DirectX Includes, Libogg path
  • Physics
    • All Physics related code
    • Dependencies – Base, Utilities
    • Includes – Base, Utilities
    • Additional Includes – None
  • GameBase
    • Functionality that needs to be setup every game
    • Dependencies – Base, Utilities, AI, GraphicsEngine, Physics, Sound
    • Includes – Base, Utilities, AI, GraphicsEngine, Physics, Sound
    • Additional Includes – None
  • Game
    • GamePlay Logic (This project will be swapped for different games)
    • Dependencies –  Base, Utilities, AI, GraphicsEngine, Physics, Sound, GameBase
    • Includes – Base, Utilities, GraphicsEngine, GameBase, Sound, AI, GameBase
    • Additional Includes – DirectX includes
  • Main
    • The exe file
    • Dependencies – Base, Utilities, Game, GameBase
    • Project Includes – Base, Utilities, GameBase
    • Additional Includes – None

Directory Structure

For each Project I mantain 2 folders

  • Include
    • This folder contains all the interfaces for the respective project. This folder will be included in the all projects that are dependent on it. This way, the underlying implementations need not be released. It also reduces the compile time, if i change the implementation
  • Src
    • This folder contains all files for the actual implementation. Most of the classes would be inheriting from one of the interfaces in the Include folder

Final Thoughts.

Now that we have the basic directory structure mapped out, the next tutorial will deal with actually setting up the project for the Visual Studio environment

Till Next Time


Leave a comment

Your email address will not be published. Required fields are marked *

One thought on “Setting Up the Project : Directory Structure