Right now our content is being compiled over the course of 10 minutes. Given that we literary have no content yet, it is a huge timebomb waiting to explode once we start ading it. As we build the game from different PCs, passing the files (specifically the ever changing solution file) from one PC to another inevitably causes content recompilation.

We are trying to find ways to solve this problem. One approach is to split the content into a number of content projects and, theoretically, the build will be done on multiple threads. But the problem we run into is the fact that each model we build references a shader file, the main shader file used to draw it. In order to make sure that every asset has access to the shader file, we put it into a separate content project. Now the problem is, the full recompilation now produces no data in the debug folder and we have no idea why this happens. We tried this approach on a small solution with tow textures (one in each of the two conten projects). They built correctly and we were able to use them in game, but with skeletal models, using custom content processor and referencing a common shader file we get empty content folders in Debug.

Has anyone done something like this and maybe solved a similar issue? Is it possible to reference a common shader file from multiple content projects in theory? Any info would be appreciated.

  • \$\begingroup\$ Unless you're updating assets constantly, it'll only compile once. How many assets do you have? 10 min. sounds pretty bad. \$\endgroup\$
    – William
    Nov 22, 2013 at 13:56
  • \$\begingroup\$ We have almost nothing: like five skeletal models and around 30 one to five-polygon models with spritesheet textures. The textures are usually 4086x4086, but their size is negligent as they have a tone of "holes" (where alpha=0), we store them in png. But skeletal models have over 700 animation keys each. In any case this is nothing compared to what we plan to add. Adding assets only rebuilds the new but moving a project even to another folder ALWAYS causes full recompilation. I must admit that I know how to check the reason (enabling comments in the debug window) but I was too lazy to do it. \$\endgroup\$
    – cubrman
    Nov 22, 2013 at 14:11
  • \$\begingroup\$ I can't tell you exactly what's wrong, but I've never heard of anyone having issues with asset compile times in XNA, which makes me think something is borking up somewhere. \$\endgroup\$
    – William
    Nov 22, 2013 at 15:55
  • \$\begingroup\$ blogs.msdn.com/b/shawnhar/archive/2009/08/14/… Check the comments, one guy has the same problem as me, while the other states that his project takes up to two hours to recompile. They both try to solve it with multiple content projects. \$\endgroup\$
    – cubrman
    Nov 22, 2013 at 17:41


You must log in to answer this question.

Browse other questions tagged .