Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I come from a .net web background so I am accustomed to using xml .config files. What is the XNA equivalent? It seems to me that using the same practice of a xml config leaves your game open to easy modification (which can be good, I know). In my day-life web development the configs live on servers where users can't access. XNA games live purely on the client (most of the time).

Say I have some values I want in a config, can the config be obfuscated or is there a different configuration management system for XNA? Is the only solution to hardcode the values back in before release so they are not accessible?

share|improve this question
1  
What data would you not want the user to change? This sounds like you should be using the content pipeline. –  Michael Coleman Apr 18 '11 at 23:59

1 Answer 1

up vote 5 down vote accepted

Your dev machine takes the XML & uses the content processor to convert it into a binary XNB file which is distributed to your customers. The XNA runtime on the customer device can understand and load it. The customer device does not need to ever have the raw XML on it.

share|improve this answer
    
Sounds great. By "content processor" do you mean content pipeline? Can the XNB be reversed engineered? –  riv_rec Apr 19 '11 at 2:53
1  
Yes, content processor/pipeline. If someone cares enough about your game to reverse engineer it, consider yourself flattered... and know that you've got what it takes to be a game dev superstar. –  Steve H Apr 19 '11 at 3:22
    
Ha...you get a check. –  riv_rec Apr 19 '11 at 3:23
    
I've been around XNA since day one and am not aware of anybody reverse engineering an xnb... I suppose theoretically it can be done but probably isn't a real threat. –  Steve H Apr 19 '11 at 3:24
2  
@Spencer You don't need to reverse engineer the XNB format to be able to read the file - because you can just use XNA itself to read it! You can only rely on XNB for very basic obfuscation (it basically converts your data to a binary file and compresses it). It is not at all secure. –  Andrew Russell Apr 19 '11 at 5:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.