How you set up your project.

Started by
5 comments, last by DarkNebula 20 years, 5 months ago
Not that it''s extremly important, but I would like to know how you all set up your VC++ workspaces like file and folder wise and how you seperate the files, and the code you create into those files. - DarkNebula
Advertisement
Just make a folder for each important section. For a game, there''s a folder for audio, one for 3d engine, one for AI,... Don''t use the standard VC layout for files, create a myProject/sources folder and move everything there, you have to change the properties too, all temporary files go to myProject/temp and binaries are moved to myProject/exe. In the root sources folder, you can put global includes (globals.h, myMath.h,....)
..The folders in VC must exactly reflect what''s on your hard-disk with the folders configuration,... (a bit like in C# with VSNet), I found this to be easier to maintain and looks more professional
MyProject||--> Source Code|    ||    |--> Engine|    ||    |--> Texture loaders|    ||    |--> Model loaders|    ||    |--> ...||--> Assets|    ||    |--> Textures|    ||    |--> Models|    ||    |--> Scripts|    ||    |--> ...||--> ... 
CApp. CApp run. Run App, run

[edited by - iNsAn1tY on November 13, 2003 6:24:37 AM]
My opinion is a recombination and regurgitation of the opinions of those around me. I bring nothing new to the table, and as such, can be safely ignored.[ Useful things - Firefox | GLee | Boost | DevIL ]
quote:Original post by Anonymous Poster
..The folders in VC must exactly reflect what''s on your hard-disk with the folders configuration,... (a bit like in C# with VSNet), I found this to be easier to maintain and looks more professional


Do you also do that with header files? When including a header you have to give the path to it too, so at certain places you have to use "../header.h" or "../models/mod.h" or something like that. PERSONALLY I find that look a tad weird (I blame the lack of experience), but if that''s the way it''s commonly done then I can change my way of working.
STOP THE PLANET!! I WANT TO GET OFF!!
I remove the standard header/source section that VC++ gives you as I like to place my header files with my source files and only have one cpp file per class, named after the class it contains.

I include the root directory of the project as an include directory and then when I include files I always give the full path name using <>

i.e.
#include <vital/Common.h>
#include <util/LogManager.h>
#include <engine/renderer/IRenderWindow.h>

I have directories like vital that contain vital header files etc that are needed in most engine files

I have a util directory that contains engine utility classes like Loggers, vectors, math stuff

Then I have an engine directory that contains render, input, sound,

I also have a gui directory that contains the gui stuff the engine supports.

------------------------------------------------------
50% of me is a huge nerd! How about you?
Right now I have a folder with a lot of cpp and headers in it. Should I even seperate that folder even more like, GUI, 3D, 2D... Etc? Or even CPP, and Headers?


- DarkNebula

This topic is closed to new replies.

Advertisement