So, the programming guide seems to be missing a key chunk of information, that is, the file structure of a project.
What files should I be editing?
Where do new files go?
When I ran ‘cocos -run -p win32’ the folder was a mess with lib files mixed with resource files mixed with dlls and the .exe. Is there a way to have that not happen?
Why does the resource folder get dumped in with everything instead of being it’s own sub directory?
Do I need to run ‘cocos -run -p win32’ every time I want to test my code? Is there a way to do it through visual studio so I can debug my code?
If you take a look at a game installed in program files, things like lib files, resource files, scripts etc are tucked away in their own folders. Whats needed to achieve that level of tidiness with my own built project?
The guide just jumps into design concepts and doesn’t cover any of this at all! I want to know about the start and the end goals so I know where to aim while coding!
All your new classes go in to the (projectroot)/Classes directory. If you want to run the project from Visual Studio then go to your (projectroot)/proj.win32 directory and open the solution in there. Then compile and run. It’s built with VS2010 AFAIK but you can update it to use 2012 etc. The file structure isn’t very optimized for Windows32 but that’s not really a big issue. It doesn’t affect usability.
If you want more structure you should create folders inside resources, such as Resources/audio, Resources/levels/level1 etc. Scripts would also go in resources I imagine, Resource/scripts.
All you need to know is that all your code goes in the Classes directory and all your resources (images/sound) go in the Resources directory. Make sure you also drag and drop them in to the Visual Studio project if you are using Visual Studio. You don’t need to drag and drop the resources in Visual Studio however.
What start and end goals are you talking about that is a bit of a vague statement?
Hey thanks for the replies guys. Sorry I didn’t get back sooner, I was overseas without internet while visiting with family for the holidays. (Got to love the farm life)
By start, I mean setting up the project directory and files. I wouldn’t want to make things up as I go along and end up with a difficult to maintain project at the end of it.
By the end goal, I mean a project that’s published in the form of an installer or some other means of distribution (I guess a .zip would work if anything). I’d like the resultant file structure of the installed game to be organized so that library files are in a library folder, resources go in their own folder etc.
It looks like you answered my question about resources and the like. Is there a way to sort those .lib files into their own sub directory when the project is built?