#### Archived

This topic is now archived and is closed to further replies.

# How you set up your project.

This topic is 5451 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
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,....)

##### Share on other sites
..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

##### Share on other sites
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]

##### Share on other sites
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.

##### Share on other sites
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.

##### Share on other sites
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

1. 1
2. 2
3. 3
4. 4
Rutin
19
5. 5

• 14
• 14
• 9
• 9
• 9
• ### Forum Statistics

• Total Topics
632927
• Total Posts
3009253
• ### Who's Online (See full list)

There are no registered users currently online

×