Project Storage / Repo Structure Suggestions

Project Storage / Repo Structure Suggestions
0.0 0



Is there a suggested method to store and version control a project alongside cocos2d-x?

It seems like the best method would be to keep them in separate repos, and re-direct the personal project to use the output of the cocos2d-x build, using relative paths. However, it seems like the template guides you to keep your project in the root of cocos2d-x. I guess another option would be to keep it within cocos2d-x, and make the personal project a sub-module.

Also, when a new version comes out, is it suggested to build a new project shell, and re-populate it with the contents of the existing project? It seems like there is a lot of change happening, which could easily be missed in a port. If so, re-directing the dependencies every major release could get painful. Perhaps a major-version porting guide would quell this concern.



I’m using a SVN repo that contains only my cocos2d-x project, which i can link then to a folder inside cocos2d’s folder. When I updated from 2.0.4 to 2.1-beta I created a new folder inside the new version’s one and made a checkout from my svn repository. Then I updated my project’s links to use the new version. I know it’s not the best way to do this, but that’s how I did…


Ah- so you started out with your project outside of cocos2d, which used the builds stored in the cocos2d project, then essentially moved your project inside of cocos2d-x? I basically did the same thing, because the template changed so much that I found it easier just to make a new project and pull all of my work into it. I was too lazy this time around to change all the dependency paths, though. Maybe some kind of path definition define in the template would make this easier?

Do you version control the entirety of the cocos2d project, along with your project inside of it? I thought about doing that, but if I add more projects later, Id certainly want to version control those independently. This lead me to think about making my project a git sub-module of a cocos2d fork. That seems a bit contrived, though, as cocos2d doesn’t depend on my project, but the other way around.

Unfortunately, I keep coming back to the idea that my personal projects should be outside of cocos2d, which seems like a painful road if there are lots of changes to the cocos2d structure : (


I’m versioning only my main project, loading cocos2d externally. When I updated, I didn’t use a new template, just copied my work to the new folder.