Hi,
I have started working on cocos2d-x as newbie with my first prototype which came out to be descent end product. Now I am working on my final game projects so need help to structure the same. So my question is…
I’ll be creating 5 different games with many functionality being same Score,Bonus,Level, SDK Box integrations like FB,Analytics, Inapp with player registration and all to my own server. I am also using cocos studio for a complete front-end development. I am trying to create an MVC style architecture for my game with many parts being same. So is there any proper way like creating Libs with cocos2d-x implementation or should I just use old copy/paste method in all projects ?
We used symlink for cocos2d-x folder, if using git you can use submodule for cocos2d-x, but at the end we decided to have all files together without symlink, because in some games we not need extra integration and then it’s hard to customize cocos2d-x as it affecting all project.
So my proposal for you would be:
use bitbucket for git repository management
create separate repository for each project
create repository for your own helpers/classes which will be used in all projects
create for each game new project, to have separate cocos2d folders -> add needed integrations to it, with sdkbox it should be easy.
Add your custom helpers as submodule to each project, so when you will checkout you will get latest code in all your projects.
Configure Continuos integration (teamcity, jenkins) it will try to compile your project on each commit, so you can be sure that you didn’t brake anything while changed code in one project…
There is example for adding submodule to project as third_party folder:
git submodule add -b master myteam/cocos2d-x-third-party.git third_party
myteam represents bitbucket url https://bitbucket.org/myteam/cocos2d-x-third-party.git
First of all Thank you for your response.
We have AWS code-commit for git repos so will use that instead of bitbucket.
I complete understood what u’ve explained except 1 part…
what do you mean by “create for each game new project, to have separate cocos2d folders ->” @energyy
does this mean each cocos2d-x cpp folder should have my separate helper folder for needed integrations.
each project should have it’s own cocos2d folder not shared, but helpers you can share by placing them in class folder as submodule. At some point you will have one project more sucessfull and there will be new version of cocos2d-x available and if you want update it to new version, it will be easier to replace it only in one project, so you will not mess others.
Regarding AWS, If your team is less then 5 people bitbucket is for free to use, so it less issues with maintenance than your own AWS.
Ok understood now.
and for AWS that is company policies so can’t change it 
Thanks Anyways for you time and efforts… 