Page 1 of 1

Change .dat to xml?

Posted: Mon Apr 13, 2009 5:55 pm
by myjean17
Would it be better to change the file format ".dat" to xml, since xml seems better. If so, what makes it that much better? (I know nothing about xml)

Re: Change .dat to xml?

Posted: Mon Apr 13, 2009 10:14 pm
by Sophia
If you know nothing about it, what makes you think it's better?

Re: Change .dat to xml?

Posted: Tue Apr 14, 2009 1:18 am
by beowuuf
For your information, http://en.wikipedia.org/wiki/XML. The answer is 'standardisation across platforms in general makes it a potentially better format', but in this case a resounding 'no' for DM Java and other clones.

There seems to be little reason to have a cross-platform version of the file structure right now, as all clones have different and unique properties that won't port across.

Every clone is a work in progress by the designer - they are spending their time improving the engine as it stands. I'm not sure any would wish to spend their time freezing the engine, standardising the own data files, and trying to learn the other engines for accepting dungeons in to their own clones. Especially since many dungeons would break most likely when ignoring the incompatible parts.

Re: Change .dat to xml?

Posted: Tue Apr 14, 2009 8:31 am
by ian_scho
...It's an interesting idea though!

I'd prefer the JSON format over XML.

Re: Change .dat to xml?

Posted: Wed Apr 15, 2009 9:52 am
by Roquen
DMJ's .dat files are evil....but:

XML is (for virtually all usages) a solution searching for a problem (i.e. 100% hype) .

As an example the dungeon defination of DM is roughly 33KB. Using Swoosh to extract into XML the resulting file is roughly 5.5MB. It compresses (with LZMA) down to about 90KB. So, with this example, the engine would have to decompress a 90Kb file to 5.5 Mb, process the abstract text defs of XML (a CPU intensive process) into binary data which ultimately is about 33KB worth of data. And the supposed point of all of this is to make the data "human readable"...which is rarely (compared to other solutions) true. Compare some Swoosh output to (say) an RTC text file for one example.

Having said that, I'm using some XML in my hacked version of DMJ for two purposes:
1) Import/Export format to ease conversion between fileformat changes.
2) Provide support for new engine features which are not supported in the editor.

And the only reason I've choosen XML is because it's very easy to use in Java.

Re: Change .dat to xml?

Posted: Wed Nov 18, 2009 10:30 pm
by TheGleep
Roquen: could you tell me how to do the extract-to XML thing? I think I could make good use of that...

Thanks

Re: Change .dat to xml?

Posted: Thu Nov 19, 2009 7:45 am
by Roquen
I haven't gotten around to completing it. What exactly are you looking for?

Re: Change .dat to xml?

Posted: Thu Nov 19, 2009 11:15 am
by Bit
brrrrr!
And if anyone would ask if Christophe won't rewrite the encyclopedia in UML, I'll show you that there is a fireball on 7th level!

Re: Change .dat to xml?

Posted: Thu Nov 19, 2009 4:36 pm
by TheGleep
Actually, I'm thinking of a web-based version (I know there was one, but it's defunct)...and XML would be a nice way to get started.

Re: Change .dat to xml?

Posted: Fri Nov 20, 2009 7:42 am
by Roquen
If your looking for base data for the original dungeons, then you can use Swoosh to extract to XML. Or grab the text files from RTC.

Re: Change .dat to xml?

Posted: Fri Nov 20, 2009 8:21 am
by ian_scho
And here it is: http://greatstone.free.fr/dm/
Another interesting dm resource

Re: Change .dat to xml?

Posted: Fri Nov 20, 2009 4:33 pm
by TheGleep
Thanks - I'll be looking into that.