Archived

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

Cherub

games and XML...

Recommended Posts

Hi, More and more I see games using XML files (Age of Mythology, and some others I can't remember )... how are these used in games? Thanks [edited by - Cherub on November 1, 2002 11:25:20 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Because XML allows people to use their own data types, it is often used to store data. For example, a GUI for your game might use XML to define the height, width, default location, color, and other various attributes of a window. In game it can be used to define the default player values, such as how much ammo, health, and other various aspects associated with a players character. Durring the compile process the XML files are parsed and the variables are imported into the code, and it results in a very flexible system where "Tweaking" these values doesn''t nessassaraly impact the programmers. Effectively if the programmers did their job right, a designer could modify all these values late in the development stage with a smaller chance of a bug occuring than if a programmer had to go in and edit a few lines of code in order to do the same thing.

Share this post


Link to post
Share on other sites
From an implementation standpoint, the most common way I''ve seen XML utilized is through MSXML functionality on Windows. You can look up a reference on how it works in the Web Development/XML and Web Services section of the MSDN Library.

Share this post


Link to post
Share on other sites
I''ve actually written an article on XML in games, which is in the pipeline at the moment. So it should be out any time.. ooh, next 3 years?

Superpig
- saving pigs from untimely fates
- sleeps in a ham-mock at www.thebinaryrefinery.cjb.net

Share this post


Link to post
Share on other sites