PDA

View Full Version : Xml game...


DudetheCreator
2004.10.22, 10:30 PM
I'm not entirely sure what xml is, but apparently it's very useful. Could you program an entire application or game with xml?


Where could i get a good xml tutorial?

AnotherJake
2004.10.22, 11:11 PM
XML is not a programming language, it is a markup language. You can't "program" anything with it any more than you could by writing a web page. At best, you might "script" a game with it. XML is just an agreed upon tag markup format for text and that's all. It's the same thing as HTML but "agreed upon" to be as general and as flexible as possible. It's a cool name and it garners a lot of hype but there really isn't anything more to it than that. You can find tutorials on XML virtually anywhere on the net, you just have to make the effort to look.

rossum
2004.10.23, 01:34 AM
yes xml is hyped, and it is like html, but the main difference is that html displays information, like, put this logo here and this frame there, but does not know anything else, so it only really laysout stuff but doesn't really know much else. Xml is trying to be more intelligentt, it doesn't just layout graphics and text but can also interpert data so if you live in europe and your freind lives in arizona xml can understand that and interpret the time zone and make your website say oh "oh you live in europe it's night time here". In other words html displays information, xml interpretes it. Along game analogies html is the graphics and GUI and xml would be the AI

AnotherJake
2004.10.23, 02:16 AM
In other words html displays information, xml interpretes it.
HTML doesn't actually *do* anything. Neither does XML, they are both textual markup language definitions. The application that reads them does the "thinking", "displaying", and "interpreting". XML is an agreed upon standard definition of the recommended usage of this "universal" way of "marking up" textual documents, whereas HTML was designed to do only one thing -describe a document to a Web browser. XML is just a common protocol that was developed after people saw HTML and said, "hey, why can't we just use this for everything?" -Which is not a bad idea IMHO.

XML works very much the same way as HTML. The really big difference is that it is always understood how HTML will be used (well, supposedly), whereas XML relies on a Document Type Definition (DTD) to define how tags and other stuff within an XML document should be used. It should be noted however, that it is STILL up to the application reading this information to determine how it will be interpreted.

XML, no big whoop. Nothing to see here, please move on...

Taxxodium
2004.10.23, 03:51 AM
I remember seeing a teacher make a Snake game with XML and XSLT. I don't remember how he did that but it is possible.

Unfortunatly XSLT is not very well supported on the Mac, unless you use libraries like libxslt. I heard that Safari 2.0 (for Tiger) will have XSLT support though.

BeyondCloister
2004.10.23, 06:04 AM
The big plus with XML is that any application can take the relevant definition file (DTD) for an XML file and then make sense of the data.

The big downside with XML is that the files are so bloated. An equivalent file containing just the raw information would be the fraction of the size. Also as the data needs to be parsed from the XML 'padding' the loading and processing of XML files can take some time.

XSLT is a file that contains a set of rules that takes the data and performs operations on it. Using this it is possible to do things like scroll through data in tables on a web page or perform calculations using the data to provide other data. Using XSLT it would be possible to make a game of some kind.

DudetheCreator
2004.10.23, 03:25 PM
Thanks for the info!

PowerMacX
2004.10.23, 08:27 PM
Check this page (http://developer.apple.com/macosx/tiger/), right below "Figure 6: Core Data in action". That should give you an idea of XML strenghts/weaknesses.

igame3d
2004.10.23, 11:14 PM
And then there is XML-RPC (http://www.xmlrpc.com/)
What is XML-RPC?Â*

It's a spec and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet.

It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.

Vertizor
2004.10.27, 12:16 AM
The big downside with XML is that the files are so bloated.
Text is usually easier to compress and has better ratios than binary compression.

An equivalent file containing just the raw information would be the fraction of the size. Also as the data needs to be parsed from the XML 'padding' the loading and processing of XML files can take some time.
That can't be helped, but it does make cross-platform data exchange a lot easier. And it's easier to debug problematic data files. I tried making my own binary file format once. I got sick of using a hex editor to check data integrity so I switched to XML.