Fearthecute schreef:
> Giel van Schijndel schrieb:
>> I wouldn't mind seeing special purpose scripts written in Lua. Whenever
>> your just storing data and describing object properties (which is just
>> about all that is being done in data/stats/*.txt AFAIK) though I think
>> XML is much more intuitive to use. It is also easier to create a
>> data-editor for XML than it is for Lua.
>>
> Because XML is a buzzword, xml is NOT good for everything.
> Its a markup language for a static tree-like definition list.
> And not for data storage...
>
As for the buzzword part I agree it is that much, but luckily, it is
more than just that (to my opinion). About describing XML as a data
storage container, let me rephrase that: XML is (to my opinion) better
for the purpose of describing than any programming/scripting language
is. The latter describes instructions/actions to be executed (e.g. by a
PC), whereas XML is designed to describe data, and importantly in this
case as opposed to plain text, it also describes the meaning of the data
(especially towards humans).
> And where do we have a tree-like static definition?
> How do you want to use it?
>
> ~~~~~
>
> <map name="MapName" player="2">
> <tile x="1" y="1" textureID="17" textureAlign="2" height="128" />
> <tile x="2" y="1" textureID="16" textureAlign="1" height="128" />
> <tile x="3" y="1" textureID="12" textureAlign="1" height="128" />
> <tile x="4" y="1" textureID="19" textureAlign="2" height="129" />
> ...
> </map>
>
> ~~~~~
>
> This produces MUCH overhead and will increase the filesize by n^4 or
> whatever...
>
> Or something like
>
> ~~~~~
>
> <map name="MapName" player="2">
> <mapdata>
> 1 1 17 2 128
> 2 1 16 1 128
> 3 1 12 1 128
> 4 1 19 2 129
> ...
> </mapdata>
> </map>
>
> ~~~~~
>
> That would be absolutly the same thing, like it's now handled.
> It's just beautyfied with some <NameHere></NameHere> tags.
> If you have something different in your mind, then i'm sorry :)
>
Yes, actually I have something different in mind. Just compare
http://svn.gna.org/svn/warzone/trunk/data/stats/repair.txt with my
attached example XML-file.
I agree that for the example you gave above, describing 3D-objects by
means of coordinates, XML isn't by far the best solution. Instead I
meant the data/stats/*.txt and mp/data/stats/*.txt files which has lots
of hierarchal relations, i.e. statistics about all sorts of objects.
The PIE-files (which define the 3D-objects if I'm not mistaken, and is
what you gave as example) are quite a different subject. I wouldn't use
XML for those exactly for that overhead you noted.
--
Giel
I looked at your repair.xml,it's alot better than the repair.txt format,much
more descriptive and understandable.
xml is probably the best solution for those .txt files in data/stats,since
it's universal resource type,our web master/contributors can update the info
on web site pages relatively easy with this change,and dont have to
'interpret' the .txt word by word,then submit it into wiki etc manually.
it will also save a lot of time to write a custom plain text dataformat from
scratch.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev