Standard Project Structure Layout

Started by
10 comments, last by ryan20fun 9 years, 5 months ago

I struggled for years with structuring my 'engine'. The first few years I was coding I just went at it with reckless abandon, with little regard for organization. It was only later that I recognized the value of more thought-out organization, but I quickly became neurotic. I have many folders in my projects folder full of half-started projects where I was mentally masturbating all the potential organizations and configurations - all while avoiding writing code.

Nowadays I just follow my instincts, and some basic ideasl.. Sometimes it takes some work trying to add something new and making it fit a project's established organization and structure, but it's never too hard, or impossible. Sometimes it just takes a break to figure a simple solution that is elegant and concise.

The important thing that I learned in all my days trying to make the perfect structure is that poorly structure code is better than a solid structure that has no code.

Advertisement

I started off using the defualt VS behavior: Every file for a project goins into the projects folder.

Then after some time I started looking around at what others are using( like you are ).

Then I came up with this:


Project settings(Configuration Properties\General):
	Output directory		: "..\..\..\Build Output\$(Configuration)\$(PlatformShortName)\"
	Intermediate directory	: "..\..\..\Build Output\Intermediate\$(Configuration)\$(PlatformShortName)\$(ProjectName)\"
________________________________

Solution directory structure template:

<Solution Folder>
|
+---Solution : The main solution and project folder.
|	|	<Solution Name> Solution File
|	|
|	+---Engine : The folder that "Engine" projects go in.
|	|	|
|	|	+---<Project Name> Project File
|	|
|	+---Tools : The folder that "Tool" projects go in.
|	|	|
|	|	+---<Project Name> Project File
|	|
|	+---Prototypes
|	|	|
|	|	+---<Project Name> Project File
|	|
|	+---Games
|		|
|		+---<Project Name> Project File
|
+---Include : The main header folder.
|	|
|	+---Engine : The main "Engine" header folder.
|	|	|
|	|	+---<$(ProjectName)>
|	|		|
|	|		+---Any required sub folders
|	|
|	+---Tools
|	|	|
|	|	+---<$(ProjectName)>
|	|		|
|	|		+---Any required sub folders
|	|
|	+---Prototypes
|		|
|		+---<$(ProjectName)>
|			|
|			+---Any required sub folders
|
+---Source : The main source file(s) folder.
|	|
|	+---Engine : The main "Engine" source folder.
|	|	|
|	|	+---<$(ProjectName)>
|	|		|
|	|		+---Any required sub folders
|	|
|	+---Tools
|	|	|
|	|	+---<$(ProjectName)>
|	|		|
|	|		+---Any required sub folders
|	|
|	+---Prototypes
|		|
|		+---<$(ProjectName)>
|			|
|			+---Any required sub folders
|
+---Game Code : The main game code file(s) folder.
|	|
|	+---Any required sub folders
|
+---Project data : The main project assets( images, meshes, audio ) folder.
|	|
|	+----<Project data> data required for a project( like a games data file )
|
+---Documents : The main document(s) folder.
|	|
|	+---Any required sub folders
|
+---Build Output : The main project build files folder.
|	|
|	+---<$(Configuration)>
|	|	|
|	|	+---<$(PlatformShortName)> Output file(s)( exe's, DLL's etc )
|	|
|	+---Intermediate : The folder where intermediate build files go.
|		|
|		+---<$(Configuration)>
|			|
|			+---<$(PlatformShortName)> Output file(s)( exe's, DLL's etc )
|				|
|				+---<$(ProjectName)>
________________________________

That is my general file structure.

I do have sub-folders for specifiec files:

  • Particle system
  • Interfaces

HTH

-Ryan.

Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

This topic is closed to new replies.

Advertisement