a "pure" xml game?

C++, C#, Java, PHP, ect...
Post Reply
User avatar
KingScar
Posts: 54
Joined: Wed Sep 08, 2010 5:08 pm

a "pure" xml game?

Post by KingScar »

Hey guys,

Been awhile since i posted, anyways, over the last few monthes I've gotten more and more proficient in xml as a whole (xml,xslt,xpath,xlinker,xforms,xquery,xschema).

So, me being the coder/gamer i am i thought, "How can I make a "pure" xml game?". And for those of you wondering why i quoted "pure", look up xml, but for those who do know xml even a little bit lets continue. First off, if this was going to be possible it would need to be desgined from the ground up which is why i learned xml schema instead of just using a DTD and while some might argue that they're the same thing, they aren't. They are the successors of DTDS, mainly because xmlis completely independent therefore, letting it be completely user customizable and can also:
•describe allowable document content
•validate the correctness of data
•work with data from a database
•to define data facets (restrictions on data)
•define data patterns (data formats)
•convert data between different data types
--------------------------------------------------------------------------------
So with enough time (along with some trial and error) I could define the entire game engine or core principles of the game.
than after that, i'm good enough with the rest of the xml extensions to not have much of a problem after that.
  • xslt lets me visually customize my xml data for either final product or make coding simpler with color coding certain tags.
    xpath and xlinker allows me to link to broad or specific sections of another external xml document and allows me to either embed what it comes back with in the current page or open a new window
    xforms does the same thing as a regualr html/xhtml form except it's more secure and customizable.
    xquery does exactly what it sounds like it does. It allows me to query, edit, add, and remove xml data on the fly which makes codingg alot simpler and debugging.
So, based on the information ive gathered about xml, i don't see why you couldn't make a "mostly" xml game with a little help from javascript and xhtml simply for display and code manipulation with js.
And since its all user defined, when done right it would most likely be pretty fast.

Let me know what you guys think of this idea because i might just get it started.

Ryan
Advanced:Html(XHTML), CSS, Writing
Intermediate: php, MYSQL, Level Design, C++, JavaScript
Beginner:Java, C-Lite, 3D modeling

The difference between me and you:

You: :geek: Me: :ugeek:

Image
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: a "pure" xml game?

Post by Jackolantern »

It sounds very doable, and in fact, there are several MMO-type engines that use XML heavily, such as Big World Indie's default package. I have heard though it does not scale well, though, and was a big concern to a lot of people when Big World Indie first came out. It was designed to be a limiting factor for Big World Indie at that time, to force large games up to a proper license.

I guess I just don't see the benefit versus a real database. The game itself will still have to be done in a full programming language, such as Javascript, PHP, etc. Using XML would just house the data, basically.
The indelible lord of tl;dr
User avatar
KingScar
Posts: 54
Joined: Wed Sep 08, 2010 5:08 pm

Re: a "pure" xml game?

Post by KingScar »

Hey Jack,

i know what ya mean and thats why i said a mostly xml game because their is no way to make a pure xml game because as w3schools.com puts it, "xml doesn't DO anything!" lol however, it is very good to organize and store data in creative ways making it faster,easier, and more accessible.
That's also why i said i was thinking about using xhtml and possible some css mixed with a little xslt for the look and use javascript for the actual data manipulation. Unfortunately, since most of the xml "tools" aren't w3c reccommended their isn't much browser support for them so you have to use namespaces and prefixs with a lot of it since, the xhtml 2.0 working group charter expired back in 09', they were released as w3c notes though which is why im looking into a way to incorporate the xhtml 2.0 standards. Pretty much everything html was translated into its xml counterpart. For example, forms became xforms, links used xlink and xpointer, frames became xframes, DOM events were changed into xml events etc. etc.

Obviously this idea is in pre-pre-PRE-alpha! haha

Just thought it was an intresting approach since ya don't see many games or companies in general using the full capablities of XML.
Advanced:Html(XHTML), CSS, Writing
Intermediate: php, MYSQL, Level Design, C++, JavaScript
Beginner:Java, C-Lite, 3D modeling

The difference between me and you:

You: :geek: Me: :ugeek:

Image
Xaleph
Posts: 897
Joined: Mon Feb 07, 2011 2:55 am

Re: a "pure" xml game?

Post by Xaleph »

Not to be the bubble burster, but how are going to let users actually create an account? Or store user contributed data? XML doesn`t do anything. You still need a server language to tie the knots. And speaking of, why XML? I actually hate XML in it`s most pure form. Not to mention all the config sheets needed for simple applications to run. Meh, creating a simple site in C# already requires the XML datasheet, or Java, same case. Blegh. Anyway, point is this: you still need something to create the XML, a server language.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: a "pure" xml game?

Post by Jackolantern »

That is what I was wondering, too, but thought he may have meant using JS server-side, such as with node.js.
The indelible lord of tl;dr
User avatar
KingScar
Posts: 54
Joined: Wed Sep 08, 2010 5:08 pm

Re: a "pure" xml game?

Post by KingScar »

Thats what I meant jack,im just trying to find a language i want to use with it besides js. Im decent with php but I'm not sure how well xml,js,php 5 with mysql work together because I'm using the current wamp server and notepad++ as the editor.
Advanced:Html(XHTML), CSS, Writing
Intermediate: php, MYSQL, Level Design, C++, JavaScript
Beginner:Java, C-Lite, 3D modeling

The difference between me and you:

You: :geek: Me: :ugeek:

Image
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: a "pure" xml game?

Post by Jackolantern »

PHP would work with it just fine :) It has first-class XML support. I am still wrapping my head around node.js. It just seems a little exotic for a lot of the things we do here, it has a very small community compared to PHP, there are few free scripts for it so far, etc. In time it may be a better choice, but I can't see much reason to choose it over PHP for most things we do, outside of perhaps two-way communication server programs.
The indelible lord of tl;dr
User avatar
KingScar
Posts: 54
Joined: Wed Sep 08, 2010 5:08 pm

Re: a "pure" xml game?

Post by KingScar »

Yeah thats why I said this was a pre pre pre alpha idea but it does seem to have alot of potential
Advanced:Html(XHTML), CSS, Writing
Intermediate: php, MYSQL, Level Design, C++, JavaScript
Beginner:Java, C-Lite, 3D modeling

The difference between me and you:

You: :geek: Me: :ugeek:

Image
Xaleph
Posts: 897
Joined: Mon Feb 07, 2011 2:55 am

Re: a "pure" xml game?

Post by Xaleph »

Hm first of, PHP has no first class support for XML. There are no standards yet. Yes, it might seem so, but there isn`t. In fact, there never will be. That`s the whole purpose of XML to begin with.

Second, if you do use PHP, use it wisely. Know that all XML files and all nodes inside XML files will be full objects. So routing a complete decision tree for something will most likely be a set of over 200 objects ( RUNTIME!!!! )

Third, I saw you mentioned MySQL. Why use MySQL when you want to work with XML? Why use XML ? Is it not "the successor" of databases? Allthough that argument has been toppled (fortunatly)..

Fourth, it would would appear you lack the experience actually using xml. XSLT/XSL, xLink and the likes are all "coding" languages to begin with. Much like html ( once again, goes in against all xml stands for ) anyway, my point is, XSLT is also a sublanguage. To use it in for example PHP, you need to extend the PEAR packages, becuase there`s no default package available in PHP ( correct me if i`m wrong though ) . Same goes for xpath and xlink. If you want to use those, you need to install them ( extra load, more memory etc)
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: a "pure" xml game?

Post by Jackolantern »

Ahh, I actually did not see that most PHP distributions simply come with the XML libraries turned on by default, making it seem first-class. I don't personally use XML much, as I personally see it as a just another data-storage format that didn't live up to 10% of its hype near the turn of the millennium, and a mostly clunky one at that. When it comes to transferring data, I prefer JSON, and for storage I prefer either a relational database such as MySQL, or a document-oriented database such as MongoDB.
The indelible lord of tl;dr
Post Reply

Return to “Coding”