3
\$\begingroup\$

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?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ What data would you not want the user to change? This sounds like you should be using the content pipeline. \$\endgroup\$ Commented Apr 18, 2011 at 23:59

1 Answer 1

5
\$\begingroup\$

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.

\$\endgroup\$
7
  • \$\begingroup\$ Sounds great. By "content processor" do you mean content pipeline? Can the XNB be reversed engineered? \$\endgroup\$
    – riv_rec
    Commented Apr 19, 2011 at 2:53
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – Steve H
    Commented Apr 19, 2011 at 3:22
  • \$\begingroup\$ Ha...you get a check. \$\endgroup\$
    – riv_rec
    Commented Apr 19, 2011 at 3:23
  • \$\begingroup\$ 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. \$\endgroup\$
    – Steve H
    Commented Apr 19, 2011 at 3:24
  • 2
    \$\begingroup\$ @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. \$\endgroup\$ Commented Apr 19, 2011 at 5:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .