locked
Content Pipeline Assembies RRS feed

  • Question

  • So I created a separate project to hold my custom importers, and added that to my game project's list of "XNA Framework Content Pipeline Assembies" (Project Properties > Content Pipeline).

    Here's my problem: the 'Configuration' and 'Platform' drop downs are greyed out (disabled) so I can only add one reference to the project and have to choose to add either the Release version or the Debug version.  I've got the importer library setup as a dependency of the game project, so if I make a change to my importers, it automatically recompiles them first, then compiles the game (repacking the content with the new assembly).  The problem though is if I add the Release assembly to my game project, but have the solution set to Debug, it builds the debug version of the assembly but still uses the old release version of it when building the project.  Or if I add the debug, then I run into problems with switching to building the release version of my game.  Doesn't seem like this would be too much of a hassle, but it's already bit me a couple times and I'm just getting started.

    What I'd like to do is to add the debug assembly to my game project's debug configuration, and the release to its release configuration.  It looks like it's almost possible because the drop downs are there staring me in the face, but they're greyed out, so I can't actually use them.  Is there something I'm missing?

    Wednesday, November 29, 2006 11:53 PM

Answers

  • presumably, one could write a content processor that would encrypt your asset to .xnb, and decrypt it on the way out.  However, I'm not sure if those crypto assemblies are available in the 360's compact framework ... so you may be stuck with windows.

    Of course, you've still got the analog hole mentioned above ... this is something that even AAA titles contend with so I wouldn't worry about it :-)
    Thursday, November 30, 2006 2:26 PM
  •  Ultrahead wrote:
    Really? What if you are using third-party assets and the license sets as mandatory that you must distribute those assets embedded a/o encrypted so that no one can grab them?

    Not concerning somebody personally but   the smallest \ cheapest developer(,artist..)  usually  has the biggest  willness to do something like this.
    What does your modeller / artist afraid of?  
    1) To prevent illegal using  the common  licence is quite sufficient.
    2) Suppose  your program will be published and the precious content will be seen (on the screen) by an art genius and it make him deeply impressed. That's the worst case because  genius  can  use your ideas free of charge  and  produce  better artwork, but ... he will never clone your content.
    3)  All the other normal people  will be glad to play your game. 
    4)  A very few people (small part of total quantity of game developers\artists played  your game) will copy your content as a material to produce their non-public demos,  etc. 
    5) And  there are always couple of odd guys  that will be digging  into your program deeply, especially if it'll have some kind of cute encryption. And there is no cheap weapon against them. 

    Numbers  5) and advanced 4) have ability to get your  normal content from encrypted pack as well with almost no effort.

    So there is no sense to produce packing\encrypted content (meaning protection, not from performance point of view ). Just waste your time. (IMHO)       

    Thursday, November 30, 2006 4:50 PM
  • What protection do you give your car when you park it? How do you know that no-one will break into it when you're not there? You don't. You just assume that most people are honest, and that the benefits of being able to go into a store outweigh the risk that someone will smash your window, averaged over your life.

    Same thing with art: You protect it through your EULA (and, implicitly, through copyright). However, given that the graphics hardware must have the de-crypted bits to actually render them, some user can also get those same de-crypted bits by spoofing the hardware. Thus, the binary, undocumented "xnb" format should be sufficient for most "non source" licenses for licensed art (at least the licensed art I have been in contact with). If they specifically mention encryption, you could encrypt the vertex buffer on the way into the xnb file, and decrypt after loading, using any simple encryption algorithm (anything from XOR through X-TEA). That doesn't require the crypto API, it just requires a page of code.

    Thursday, November 30, 2006 7:08 PM
  • As far as I know there isn't currently any way to specify different assemblies based on the configuration.
    Friday, December 1, 2006 6:51 PM

All replies

  • 1) Go to "Tools->Options" and CHECK in the bottom of the dialog the option "Show all settings".

    2) CHECK the "Show advanced build configurations" in "Tools->Options->Projects and Solutions".
    Thursday, November 30, 2006 2:58 AM
  • BTW, speaking of assemblies and the content pipeline, let's say I create a game but I don't want others to get their hands on the sounds, meshes, textures, an so on; are assets protected once the assembly is build (for PC platform)? I mean, can someone "retrieve" the assets from an assembly with ease?

    Thursday, November 30, 2006 3:13 AM
  • Generally speaking there is no big sense in hiding/crypting your game content because there are some tools (both for DX and OGL based programs) to intercept your Draw call and get all the textures, geometry, shaders for any frame.  Don't be afraid to show your artwork directly.
    Thursday, November 30, 2006 6:48 AM
  •  neogir wrote:
    Generally speaking there is no big sense in hiding/crypting your game content because there are some tools (both for DX and OGL based programs) to intercept your Draw call and get all the textures, geometry, shaders for any frame.  Don't be afraid to show your artwork directly.


    Really? What if you are using third-party assets and the license sets as mandatory that you must distribute those assets embedded a/o encrypted so that no one can grab them? The fact that one uses XNA does not necesarily mean that one must also have created all of the content. You could have buy meshes from a graphic expert, collection of sounds, etc.
    Thursday, November 30, 2006 2:18 PM
  • presumably, one could write a content processor that would encrypt your asset to .xnb, and decrypt it on the way out.  However, I'm not sure if those crypto assemblies are available in the 360's compact framework ... so you may be stuck with windows.

    Of course, you've still got the analog hole mentioned above ... this is something that even AAA titles contend with so I wouldn't worry about it :-)
    Thursday, November 30, 2006 2:26 PM
  •  Ultrahead wrote:
    Really? What if you are using third-party assets and the license sets as mandatory that you must distribute those assets embedded a/o encrypted so that no one can grab them?

    Not concerning somebody personally but   the smallest \ cheapest developer(,artist..)  usually  has the biggest  willness to do something like this.
    What does your modeller / artist afraid of?  
    1) To prevent illegal using  the common  licence is quite sufficient.
    2) Suppose  your program will be published and the precious content will be seen (on the screen) by an art genius and it make him deeply impressed. That's the worst case because  genius  can  use your ideas free of charge  and  produce  better artwork, but ... he will never clone your content.
    3)  All the other normal people  will be glad to play your game. 
    4)  A very few people (small part of total quantity of game developers\artists played  your game) will copy your content as a material to produce their non-public demos,  etc. 
    5) And  there are always couple of odd guys  that will be digging  into your program deeply, especially if it'll have some kind of cute encryption. And there is no cheap weapon against them. 

    Numbers  5) and advanced 4) have ability to get your  normal content from encrypted pack as well with almost no effort.

    So there is no sense to produce packing\encrypted content (meaning protection, not from performance point of view ). Just waste your time. (IMHO)       

    Thursday, November 30, 2006 4:50 PM
  • What protection do you give your car when you park it? How do you know that no-one will break into it when you're not there? You don't. You just assume that most people are honest, and that the benefits of being able to go into a store outweigh the risk that someone will smash your window, averaged over your life.

    Same thing with art: You protect it through your EULA (and, implicitly, through copyright). However, given that the graphics hardware must have the de-crypted bits to actually render them, some user can also get those same de-crypted bits by spoofing the hardware. Thus, the binary, undocumented "xnb" format should be sufficient for most "non source" licenses for licensed art (at least the licensed art I have been in contact with). If they specifically mention encryption, you could encrypt the vertex buffer on the way into the xnb file, and decrypt after loading, using any simple encryption algorithm (anything from XOR through X-TEA). That doesn't require the crypto API, it just requires a page of code.

    Thursday, November 30, 2006 7:08 PM
  • What does your modeller / artist afraid of?

    Well, I'm not the one to judge that.

    My question was a technical one. I did not mean to open a debate about license types. Like it or not, there are developers, either indies or pros (and some enterprises within the latter) that do require that kind of protection for sounds, music, etc. So, whether I agree or not is not the case provided I can comply with those terms and conditions technically.





    Thursday, November 30, 2006 7:15 PM
  •  Ultrahead wrote:
    1) Go to "Tools->Options" and CHECK in the bottom of the dialog the option "Show all settings".

    2) CHECK the "Show advanced build configurations" in "Tools->Options->Projects and Solutions".

    What should this have accomplished?  The drop downs are still disabled in the Content Pipeline section of the project properties.

    Friday, December 1, 2006 1:55 AM
  • Sorry. Thought you were referring to the dropdowns of the solution's config & platforms.

    EDIT: maybe it's not available 'till v1 final.
    Friday, December 1, 2006 1:49 PM
  • As far as I know there isn't currently any way to specify different assemblies based on the configuration.
    Friday, December 1, 2006 6:51 PM
  • Yeah, they are enabled on some panes (like the Build and Debug tabs), but disabled on others like the Content Pipeline.  I'm mostly wondering if this is intentional, or an oversight, or if I just don't know how to enable them, and if there are plans to change it in future revisions, and if I should submit a bug/feature request.
    Friday, December 1, 2006 7:18 PM