Change .dat to xml?

This is a forum for the DM clone DM Java created by Alandale. Note it also has it's own set of forums at ezboard (link stickied)

Moderator: alandale

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
myjean17
Novice
Posts: 28
Joined: Thu Apr 09, 2009 1:50 am

Change .dat to xml?

Post 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)
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Change .dat to xml?

Post by Sophia »

If you know nothing about it, what makes you think it's better?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Change .dat to xml?

Post 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.
Was unable to (permenantly) kill off ian_scho (Haynuus), Ameena, oh_brother (Westian), money (Falkor), raixel (Petal) and Lord_Bones (Aurek) in the DM D&D game Time's Champions!

CONGRATULATIONS TO THOSE WHO MADE THE GAME WHAT IT WAS - GREAT!
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: Change .dat to xml?

Post by ian_scho »

...It's an interesting idea though!

I'd prefer the JSON format over XML.
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

Re: Change .dat to xml?

Post 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.
User avatar
TheGleep
Novice
Posts: 22
Joined: Sat Jul 23, 2005 1:06 am

Re: Change .dat to xml?

Post 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
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

Re: Change .dat to xml?

Post by Roquen »

I haven't gotten around to completing it. What exactly are you looking for?
User avatar
Bit
Arch Master
Posts: 1064
Joined: Mon Mar 03, 2008 10:53 am
Location: Nuts trees

Re: Change .dat to xml?

Post 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!
User avatar
TheGleep
Novice
Posts: 22
Joined: Sat Jul 23, 2005 1:06 am

Re: Change .dat to xml?

Post 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.
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

Re: Change .dat to xml?

Post 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.
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: Change .dat to xml?

Post by ian_scho »

And here it is: http://greatstone.free.fr/dm/
Another interesting dm resource
User avatar
TheGleep
Novice
Posts: 22
Joined: Sat Jul 23, 2005 1:06 am

Re: Change .dat to xml?

Post by TheGleep »

Thanks - I'll be looking into that.
Post Reply