Hi all,
I'm currently creating a folder structure for the game I'm working on. Now I want this structure to work with both Win desktop and App store development. So far I've got everything building on both, using separate solution and .vcxproj for desktop and metro.
However I have an issue on Metro when it comes to the Asset folder and the App store logo settings. For various reasons I've moved a few of the directories about. This includes the Asset folder which I'm going to put all my built assets in it. I have separate offline tools for building various file formats, including custom file formats. Also during development these will be separate files, but for the final release game I'll be merging all the file into a few custom binaries to improve loading times and avoid seek overhead on disk. I've been writing game professional for many years and have found this method to be the most optimal way to develop.
So that's the reason for having a custom directory structure. However, by having an Asset folder in a different place to the main .cvxproj file, the logo png files don't get deployed correctly.
The directory structure looks something like this:
mainline Game1 Game1 Source ..various .cpp files WinDesktop game_desktop.cvxproj WinAppStore Assets smalllogo.png logo.png splashscreen.png storelogo.png game_app_store.cvxproj Assets GameFiles Myfile.txt Game1_desktop.sln Game1_appstore.sln Package.appxmanifest
Now I've put the .cvxproj files in subdirectories as there are a lot of other files generated by visual studio. I want to try an keep the project files as tidy as possible and not cluttered.
However I've underline where the problems occur.
Firstly I have had to put an Asset folder at the same level of the game_app_store.cvxproj file. If I don't do this then the logo's don't get deployed correctly to the Game1\Appx\Assets folder in the built application.
I was wondering if this was configurable in VS. I'm using VS 2012 Express, which obviously has some limitations and this may be one of them. I've opened all the VS solution, project and other settings files into a text editor to see if there was a manual way to edit this, but couldn't find anything.
Also the other Assets directory, containing Myfile.txt, doesn't get copied across, even though the file properties are set asContent. The only way for this to work, is to put the MyFile.txt, into the other Assets folder.
Questions:
- So is this a limitation in VS and I'm not able to have assets split across two areas?
- Does the Asset folder need to be at the same level as the .cvxproj file?
- Can I just copy files, using a post build step to the Game1\Appx\Assets folder myself. I've tried this out, with a manual copy, and it seems to work. However, I'm not sure if this would get through certification. Does VS create a manifest file when compiling and if I manually copy additional files into the Appx folder will certification fail?
I can obviously get around all this my moving the folder structure back to something that VS wants. I just would like to organise my project so it's more cross platform and I'm free to have whatever structure I want.
Any help would be appreciated.
Thanks
Edited:
Directory structure example format went wrong, so have now redone it.
Update:
I tried to put a Post-build event. This sort of worked where I could copy additional file to the AppX folder. However this only works in limited circumstances. If I clean out the built app and rebuild the solution, you don't automatically get the AppX folder. You either need to run the app of select 'Deploy Solution'. This copies everything to the deploy folder, include any asset files. This happensafter the Post-build event.
When first deploying you get the following output...
Creating a new clean layout...
Therefore the files that were copied in the Post-build event get deleted. So it doesn't always work. I also looked at the Custom Build Set. In the 'Execute After' drop-down there are many options but I can't find anything like post-deploy.
I think I'm going to have to create by game projects separately and just share the game code between them and not try to have the same directory structure for all platforms.