Setting Up the Project - Part I (Directory Structures)

Published December 14, 2011
Advertisement
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, its served me well so far

[subheading]Third Party Tools[/subheading]

  1. [font=Arial]FMod - Sound[/font]
  2. [font=Arial]TinyXML - XML[/font]
  3. [font=Arial]Zlib - zip[/font]

[subheading]Projects in the Solution[/subheading]

  • Common

    • Common includes, macros etc that should be included in every project
    • Dependencies - None
    • Project Includes - None
    • Additional Includes - None
    • Third Party Libraries - None
  • Base

    • common datastructures/classes such as wrappers for string
    • Dependencies - None
    • Project Includes - Common
    • Additional Includes - None
    • Third Party Libraries - None
  • Utilities

    • All Utility Functions such as Logger
    • Dependencies - Base
    • Project Includes - Common, Base
    • Additional Includes - Third Party includes (see extern below)
    • Additional Libraries - [font=Arial]Winmm.lib tinyxml.lib zlibwapi.lib[/font]
  • AI

    • AI related Functionality
    • Dependencies - Base, Utilities
    • Project Includes - Common, Base
    • Additional Includes - None
    • Additional Libraries - [font=Arial]None[/font]
  • GraphicsEngine

    • All Graphic related stuff
    • Dependencies - Base, Utilities
    • Project Includes - Common, Base, Utilities
    • Additional Includes - DirectX Includes
    • Additional Libraries - [font=Arial]d3dx9.lib DxErr.lib d3d9.lib winmm.lib dinput8.lib dxguid.lib[/font]
  • Sound

    • Wrappers for playing sound ([color=#ff0000]might move to Graphics Engine later[/color])
    • Dependencies - Base, Utilities
    • Includes - Common, Base, Utilities
    • Additional Includes - Third Party includes (see extern below)
    • Additional Libraries - [font=Arial]fmodex_vc.lib[/font]
  • GameBase

    • Functionality that needs to be setup every game
    • Dependencies - Base, Utilities, GraphicsEngine
    • Includes - Common, Base, Utilities, GraphicsEngine
    • Additional Includes - DirectX Includes
    • Additional Libraries - [font=Arial]None[/font]
  • Game

    • GamePlay Logic (This project will be swapped for different games)
    • Dependencies - Base, Utilities, GraphicsEngine, GameBase, Sound
    • Includes - Common, Base, Utilities, GraphicsEngine, GameBase, Sound, AI
    • Additional Includes - DirectX includes
    • Additional Libraries - [font=Arial]None[/font]
  • Main

    • The exe file
    • Dependencies - Base, Utilities, Game
    • Project Includes - Common, Base, Utilities, Gamebase, Game
    • Additional Includes - None
    • Additional Libraries - [font=Arial]None[/font]


  • [font=Arial][subheading]Directory Structure[/subheading][/font]
    [font=Arial]For each Project I mantain 2 folders[/font]

    • [font=Arial]Include[/font]

      • [font=Arial]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[/font]
  • [font=Arial]Src[/font]

    • [font=Arial]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[/font]



  • [font=Arial][subheading]Final Thoughts[/subheading][/font][font=Arial]Now that we have the basic directory structure mapped out, the next tutorial will deal with actually setting up the project for the Visual 2008 environment.[/font]

    [font=Arial]Till Next Time[/font]smile.gif
    0 likes 0 comments

    Comments

    Nobody has left a comment. You can be the first!
    You must log in to join the conversation.
    Don't have a GameDev.net account? Sign up!
    Profile
    Author
    Advertisement
    Advertisement