Archived

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

How you set up your project.

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Guest Anonymous Poster
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 this post


Link to post
Share on other sites
Guest 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

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites