Archived

This topic is now archived and is closed to further replies.

Experiences with XML

This topic is 5589 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I''m doing an adventure game engine (games much like Secret of Monkey Island, or Maniac Mansion, 2D) and I found XML as a good language to describe all the data of a game. Because it has a well defined structure, and Java (the language I´m writing this) has already an XML parser, it saves me a lot of time . I´d like to know if you have done this for your game previously, and tell us how did you went through it. Specifically, if there is any issue in the ''security'' part (say, if somebody can alter the data files in order to cheat). Mac for productivity Linux for development Palm for mobility Windows... for the Solitaire

Share this post


Link to post
Share on other sites
Have you ever had a look at SIGNED XML files?

We use them for licensing - you get a license file that is an XML file that if basically the configuration for your client, including, though, your name and the license number.

The XML file, though, is signed with a good and strong asymetric encryption - and the program only has the verification key.

VERY nice - ubreakable (especially if your whole program is also protected from manipulation by itself and the runtime).


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites
jkeppens: there is a very good parser from microsoft. its calles msxml. the actual version is 4.0. i tried a few other ones like from ibm or some open source things but they were more complicated or didn''t work very well.

Share this post


Link to post
Share on other sites
quote:

I´d like to know if you have done this for your game previously, and tell us how did you went through it. Specifically, if there is any issue in the 'security' part (say, if somebody can alter the data files in order to cheat).


XML stands for 'Extensible Markup Language' and like other markup-languages (HTML, VRML, etc...) it's Clear Text. Calling it a data file is a bit of a glorification.
In short, if you use XML, you couldn't make it any easier to modify the game data. And this should not be viewed as a bad thing, unless you're making a MOG.

...
quote:
Original post by thona
VERY nice - ubreakable (especially if your whole program is also protected from manipulation by itself and the runtime).


Reasonable protection I can believe, saying it's "unbreakable" raises credibility issues. The only type of encryption that's even close to unbreakable, is one-time pads (which are useless).

A lock is only as safe as it's keys - so it doesn't matter if you use 1Mb encryption that still doesn't make it safe.
quote:

...and the program only has the verification key.


That won't really matter when I pop-open the debugger, and change the successful check from a jz (or jnz) to a jmp.

Public-key cryptography only provides very high confidences that a message is authentic (that is from who it says it is). And only if the private key is kept safe. They do not prevent unauthorized data access what-so-ever - to do that you must physically prevent them from having access to the data (i.e. a network server doesn't send you any data from a file of you are not authorized to read it).

So all that XML encryption does, is provide a high-level of confidence that the configuration file is from you.

To think it does anything else, is to err.

[edited by - Magmai Kai Holmlor on August 26, 2002 12:56:25 PM]

Share this post


Link to post
Share on other sites
Check out Qt at www.Trolltech.com . It''s kinda expensive if you wanna purchase it but it has a built in XML parser (and a free trial version that you can keep updating ;P ).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
to add on to the previous AP:

Expat (http://expat.sourceforge.net/) is nice, very fast, and small, but it''s written in pure C.

Xerxes (http://xml.apache.org/index.html) is written in C++, but it''s rather large and I think you have to distribute a couple dll''s with your final program.

TinyXML (http://www.grinninglizard.com/tinyxml/) is in C++, is small and easy to use.

Share this post


Link to post
Share on other sites