Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  XML in games?  (Read 2043 times)
0 Members and 1 Guest are viewing this topic.
Offline Chimera

Innocent Bystander





« Posted 2004-12-09 13:16:19 »

I was wondering about the use of XML in active game data management out there.  Are any of you folks using XML ORM or DBs in your games for any reason?

I want to develop my game to use XML files to load data from, for ease of end-user modification or expansion.  I just cannot decide if I want to read the files in once (or as I need entries) or if I want to read them into some sort of DB in memory (by DB I mean an XML DB or Mapping solution like Hibernate).  What I cannot answer is whether this approach involves too much overhead compared to an approach based on read-into-memory-and-leave-it approach using a SAX/DOM parser.

Any thoughts on this?  As a background context, this game is a tactical wargame, not a twitch-based or heavy 3D game.
Offline z.e.r.o

Junior Duke




Java games rock!


« Reply #1 - Posted 2005-01-03 10:26:50 »

I think that if the overhead is relegated on the loading phase of the game or levels this is file.
Real Time parsing shold be avoided like Ebola, IMHO, unless you use highly optimized parsers (so no generic w3c.dom).

The question is another: is real so simple to maintain an XML for modding instead of creating a dedicated tool?
Take my case (spoiler of the upcoming  new & first totally ours title, here Smiley ): we have a decent economical engine and we are working out a research & development engine to create the first preview version of Xplore! our 4x space game (with simplified approach, more like Anacreon than my personal favourite Space Empires, and also more diplomacy and economics oriented).

We used XML for asset data (you know, veichles, research and so on) and it worked pretty well, though, maintaining it is equally cumbersome than using the old txt files of Space Empires (I publicly modded AI and Races for that game for years).

In the end, we are seriously thinking about editors anyway, since the game will probably require a lot of tweaking by testers and modders to keep the game entertaining & to cope with all the potential pitfalls that even a good design document cannot foresee.
So: XML can be cool, but using XML alone is just dumb like any other media for content-heavy projects, for many projects tools are inevitable.

Matteo Anelli
.brain - http://www.dot-brain.com
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #2 - Posted 2005-01-03 11:09:19 »

CaptainJester has proposed an article on this at:

http://javagamesfactory.org/views/proposed-article?id=3

I'm pretty sure he'd like to start writing it ASAP now xmas and new year are over, so I suggest you read the proposal and add comments and requests now (you need to make a JGF account if you don't have one using the link at the top o fthe page).

You really want to scroll down and read his comment explaining what he is trying to cover, in response to others comments. Ah, I think the "sections" in the proposal are going to get heavily re-written based on that comment.

More feedback (*and requests for covering additional issues*) before we finalise the contents would be great.

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline z.e.r.o

Junior Duke




Java games rock!


« Reply #3 - Posted 2005-01-03 12:07:56 »

A good request is to cleraly distinguish pre-compiled parsers based on xsd (a la XMLBeans or ANTLR if you're mad enough) to simple parsers devolped to cope with more generic XML document formats.

While the first are dead slow for overall game use, the second are blazing fast (since the parser is tailored for your XML and your only) and can be also viable for real time (I speak for experience on RT Mapping and Industrial Automation tools).

Many say that there is also an API issue for the w3c parsers in the Java distro (never bother to read the code though).

Matteo Anelli
.brain - http://www.dot-brain.com
Offline z.e.r.o

Junior Duke




Java games rock!


« Reply #4 - Posted 2005-01-03 12:10:03 »

gh, sorry blah I'd have to read your post more accurately Sad

Matteo Anelli
.brain - http://www.dot-brain.com
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #5 - Posted 2005-01-04 09:11:56 »

Quote
I'm pretty sure he'd like to start writing it ASAP now xmas and new year are over, so I suggest you read the proposal and add comments and requests now (you need to make a JGF account if you don't have one using the link at the top o fthe page).

Don't forget a new baby too.  Grin

But yes I should be able to spend some time on it now.

Offline RooKee

Senior Newbie




Java games rock!


« Reply #6 - Posted 2005-01-28 12:23:50 »

I just databases for my games. But thats all online games

:-)

For a "normal" game are files the right way. WarCraft and other games do it too....
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (39 views)
2014-10-17 03:59:02

Norakomi (29 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (57 views)
2014-10-14 00:39:48

TehJavaDev (56 views)
2014-10-14 00:35:47

TehJavaDev (47 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!