directory structure

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • directory structure

      I like the directory structure that you propose in the book but there is one small thing that bothers me - the ipch folder that is automatically created.

      I would like to keep the vs solution and project files in the Source folder without the annoyance of temporary files like you describe under Best Practices.

      In the GCC code, it looks like you have added this folder to source control. I'm thinking about changing the location and I'm just wondering if there is a good reason to leave this folder alone.

      Also, where you do typically store the .pdb file for the Release build as well as the .map file?
    • RE: directory structure

      Originally posted by neuristic
      I like the directory structure that you propose in the book but there is one small thing that bothers me - the ipch folder that is automatically created.

      I would like to keep the vs solution and project files in the Source folder without the annoyance of temporary files like you describe under Best Practices.

      In the GCC code, it looks like you have added this folder to source control. I'm thinking about changing the location and I'm just wondering if there is a good reason to leave this folder alone.

      Yeah, the ipch folder is automatically created. It shouldn't be added to source control, that was an oversight. I deleted it from SVN.


      Also, where you do typically store the .pdb file for the Release build as well as the .map file?

      You store them in Lib\Win32Release.

      -Rez
    • RE: directory structure

      Originally posted by rezination
      Yeah, the ipch folder is automatically created. It shouldn't be added to source control, that was an oversight. I deleted it from SVN.

      I see that you can set "Always Use Fallback Location" and it will default to using your temporary directory instead but I'm thinking that most people just accept it and don't bother.

      I guess that this is part of the reason that you have the Msvc directory, to keep it from getting in the way.

      Originally posted by rezination
      You store them in Lib\Win32Release.

      I'm using Game and not Lib but based on my understanding, they serve the same purpose depending on the type of project.

      If you put these files in Game\Win32Release won't they be accessible to the public? Do you set up some sort of automated process to clean up the additional platform\config directories in Game any time you need distribute it?

      It doesn't really matter for me because I usually include the .pdb and .map files with any release build I send out but I was just curious how they are managed in a professional project.
    • It's really up to you. My own game engine uses a different setup. I have the game directory at the root. Inside this directory are five other directories:

      bin - This is where the Release executable and all the final game files live. To create a build, I copy & paste this directory to another place and rename it. Then I run a script that culls out all the SVN temp files and anything else I don't want.

      docs - Any documentation I write goes here. This includes design docs, class diagrams, etc. For example, in the docs folder of the simulation game I built a few months ago, I have several photos of my whiteboard where I wrote out a bunch of mathematical formulas for how the AI works. There's also an Excel spreadsheet that models the AI using those formulas.

      media - I store all of the source files for any media I have in this directory. Things like PSD files, sprite sheets before I tweak them, WAV files, etc.

      obj - This is where all my temporary files go. All the crap that Visual Studio generates gets tossed into this folder. There's usually one folder inside obj for each build configuration. I also send the debug EXE to this folder. The idea is that I can delete this folder without effecting anything.

      src - This is where all the C++ code is. The vcxproj file lives here too.

      It's also worth noting that I have totally separate folders for the game and the engine. They live next to each other (so the root game directory is a sibling to the root engine directory). They both live under a folder called DL. DL stands for Development Line and is my main branch. Whenever I finish a project or hit a major release, I branch the engine and the game into RL (Release Line). That way, I can always go back and build the last major release of the game, even if the engine has changed significantly. I just load up that branch. This has been extremely useful; a big problem with having a single engine used by multiple projects is that you have to keep maintaining all those old projects as you change the engine.

      -Rez