Sign in to follow this  
chadsxe

Need some advice on which path to take....

Recommended Posts

First things first - VC++ 2008 Excuse me if I say some things wrong but I am not 100% sure how to verbalize it. I have been building a engine that handles input, graphics, audio, and system work that I can reuse and update as I see fit. I want to be able treat this engine as a completely seprate project then any project that actually uses it. I am not talking about on a code level (I have already figured out how I am going to tie into it) but on a project level. For example in order for me to use the engine it I have to open a project containing all the source files of the engine and then build my independent project code in the same project. Instead I would like to possibley have the engine code in one project and the independent application code in another project that knows to look in the "Engine Project". Like I said I am not sure if I am verbalizing this correct. I am pulling this from left field but would I be wrong in thinking turing my engine in .lib would be an option? Any suggestion will help... Regards Chad

Share this post


Link to post
Share on other sites
I organize it so that the game is its own project, the engine is its own project, any game plugins or engine plugins are all their own projects. Anything I use in one distributable (the game and its engine dependencies) are organized into a solution.

In this way each game has its own copy of the engine source. If the engine is finished, you might not have it be part of the solution, and just link with a local copy of its distributables (.lib, .dll, .exe, whatever)

Share this post


Link to post
Share on other sites
Again...sorry if I sound stupid

So if you have two projects under one solution is there anything I need to do to have one project be able to see the the other project. I mean in a sense of setting visual studios up.

Regards

Chad

Share this post


Link to post
Share on other sites
Chad, I think I understand precisely what you are asking. If you have an engine that itself doesn’t form an executable, but is really reusable code for other programs, what you want to do is make it a library. There are two forms: static and dynamic (also called shared). So the first thing you want to do is read up on libraries (both static and dynamic) on wikipedia, google, etc., to understand the topic a bit. You might not get the details, but the concept should click in your head.

Share this post


Link to post
Share on other sites
Quote:

...You might not get the details,...


There are also Walkthroughs that do provide some details:

Creating and Using a Managed Assembly (C++);

Creating and Using a Dynamic Link Library (C++);

Creating and Using a Static Library (C++);

...at your fingertips actually (i.e via your Visual Studio start page)

ala:

http://msdn2.microsoft.com/en-us/library/0x6hy671.aspx

Share this post


Link to post
Share on other sites
@everyone

I think you all helped me answer my question. I have built a solution with multiple projects. The "Game Project" has to be told it is dependent on the "Engine" project. The "Engine Project" has to be told not to output an .exe but instead a static lib.

On top of that I need to learn a lot about lib's so I am off to my reading.

Regards

Chad

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this