iDevGames Forums
best practise: make a basic project to use as library for other apps - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: best practise: make a basic project to use as library for other apps (/thread-9569.html)



best practise: make a basic project to use as library for other apps - sefiroths - Nov 24, 2011 02:17 AM

i'm starting a new project using cocos3d and bullet named "dice6".
i'd like to have at the end a simulation of 6 faces dice, adn recognize what is the face "up".
when the project is finished, i'd like to use it on all the future project that uses 6 faces dices, like board game, ecc...

what is the best practise to achive this goal?
can i add to the future project "dice6.xcodeprj" and good to go, or no?

should i start any project from that project?
if i'd like to add this to old projects, should i add in the project all sources of dice6?

thanks


RE: best practise: make a basic project to use as library for other apps - backslash - Nov 24, 2011 07:13 AM

Well, you can't add one Xcode project to another.
Since this is likely to be quite a small project (one or two classes), you could just include the .m and .h files in other projects. Alternatively, you can build a library or framework (static libraries being the easiest way of doing things) to use in your future projects.
You may also want to look into setting up a new template, if the dependancies and things get complicated.


RE: best practise: make a basic project to use as library for other apps - sefiroths - Nov 25, 2011 06:59 AM

thanks


RE: best practise: make a basic project to use as library for other apps - SethWillits - Nov 25, 2011 01:20 PM

(Nov 24, 2011 07:13 AM)backslash Wrote:  Well, you can't add one Xcode project to another.


Uhh, yeah you can. It's called project dependencies and they work fantastically. You build the app it automatically builds the library etc.