Question for IOS Support post

General Discussions Regarding L. Spiro Engine

Question for IOS Support post

Postby codeslasher » Sat Mar 17, 2012 3:25 pm

My engine is organized into mini-engines, which are each their own projects (brought together into one master project) and build into separate libraries. The sound library, terrain library, physics library, etc. This keeps things highly modularized and ensures a logical connection between components. It would be similar to keeping each library in its own folder inside as part of the master project, except that it forcibly ensures that libraries can’t lazily #include files from outside their designated scope simply by adding another ../ to the #include path. It also makes it very clear how each library related to the other libraries.

Hi lspiro, could you please explain this some more with examples? Especially the part about preventing lazy includes.
In my projects,I've used seperate projects for maths,primitives etc but still have to do -
#include "../Maths/Vector.h"
from other parts of the engine.
How are you handling this kind of connection between the projects.
codeslasher
I Have a Question
 
Posts: 5
Joined: Wed Mar 07, 2012 4:47 pm

Re: Question for IOS Support post

Postby L. Spiro » Fri Mar 30, 2012 5:20 am

I am a little late. Sorry.
This image probably explains it fully.
Image


For any given module, set the header search paths to include the paths to the code from the other modules, then include in the form of:
Code: Select all
#include "Vector/LSMVector3.h"

This way people can’t make an include that should not be done, such as trying to include the engine from the math library.
Instead they will have to rethink their design and come up with a correct solution.


L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them.
- L. Spiro 2011
L. Spiro
Site Admin
 
Posts: 54
Joined: Thu Jul 21, 2011 2:59 pm
Location: Tokyo, Japan

Re: Question for IOS Support post

Postby codeslasher » Fri Apr 06, 2012 11:11 pm

Thanks for the information, will try it out soon.
codeslasher
I Have a Question
 
Posts: 5
Joined: Wed Mar 07, 2012 4:47 pm


Return to General Related

Who is online

Users browsing this forum: No registered users and 0 guests

cron