Page 1 of 1

Project structure

Posted: Wed Jun 04, 2014 10:33 pm
by LJS
Edited post:
How should a bigger project be constructed so on compile time it isn't neccecary to build all parts. This especially to reduce compile time. To reduce that time I already have all includes into the cpp files and forward declarations in the header except for those object needed in the header.

Another point to keep in mind when stucturing should give the oppertunity to easily set up a testing application to focus on one feature but with a minimum effort adding other features into the testing application.

Original post:
How would a bigger project be structured. Do you create a static lib for all finished parts so you can create a test application fast for specific new features (which are implemented in that static lib when done) or are there other ways? May need to say that I am currently just an indie, all coding and artwork is of my concern. No team work here, so no team-sharing features needed.


Regards,
LJS

Re: Project structure

Posted: Thu Jun 05, 2014 12:36 pm
by Thyrion
My tactic is as much moduls as it makes sense for me.

Moduls:
physics (lib, dll)
Input(lib, dll)
window(lib, dll)
etc...

Tests:
physicsTest (exe)
inputTest(exe)
windowTest(exe)

Game:
exe

+ try to put as much data in files to load at runtime

reduce compiletime as much as possible (the biggest timesink in coding for me at the moment)

Re: Project structure

Posted: Thu Jun 05, 2014 8:13 pm
by LJS
Thanks for your reply.

That should give is a small boost. Also it makes changes in one of those easier. Why didn't I thought of this as it is almost the exact as I have at this time except I put all finished mess into one lib - which obviously does leave cracks in smooth operation.

R,

Re: Project structure

Posted: Sat Jun 07, 2014 12:17 am
by LJS
Actually I did what you said before I asked but it missed logic somehow. By you summing it up, I got it neat and tidy. Thanks, it works like a charm.

[edit]
Although I think I was unclear in what I meant.
as far as I have at the moment is:
characters.lib
debuggers.lib
engine.lib (ogre, bullet, OIS tight up together)
utilities.lib
(more to come)

and

game.exe

This gives me three advantages
- making changes in a one or two parts without building everything.
- making a test application quit rapid.
- keeping everything as general and independent as can be.

Re: Project structure

Posted: Sun Jun 08, 2014 1:35 pm
by Thyrion
is there a question? or just a statement :)