Game Development Reference
In-Depth Information
of a level, for instance, because INI does not support any idea of nesting paramet-
ers and sections.
Because INI is so simple and widely used, a large number of easy-to-use libraries
is available. In C/C++, one particular library I'm a fan of is minIni, because it
works on a wide variety of platforms and is very easy to use.
XML
XML , or Extensible Markup Language, is a file format that is an expansion of the
concept of HTML. Rather than using set HTML tags such as <html> , <head> ,
<body> , and so on, in XML you can have any custom tags and attributes you
want. So to the uninitiated, it might look a lot like HTML, even though it's not.
The Witcher 2 used XML extensively to store all the parameters of the different
items that could be found in the game. For example, here's an entry that stores the
stats of a particular sword:
Click here to view code image
<ability name="Forgotten Sword of Vrans _Stats">
<damage_min mult="false" always_random="false"
min="50" max="50"/>
<damage_max mult="false" always_random="false"
min="55" max="55"/>
<endurance mult="false" always_random="false"
min="1" max="1"/>
<crt_freeze display_perc="true" mult="false" al-
ways_random="false"
min="0.2" max="0.2" type="critical"/>
<instant_kill_chance display_perc="true" mul-
t="false"
always_random="false" min="0.02" max="0.02"
type="bonus"/>
<vitality_regen mult="false" al-
ways_random="false" min="2" max="2"/>
</ability>
OnebigcriticismofXMListhatitrequiresalotofadditionalcharacterstoexpress
the data. There are many < and > symbols, and you always need to qualify each
Search WWH ::




Custom Search