diary of an indie game developer

 

XML Object Creation/Data-Driven Application Library?

I’m implementing yet another XML-based object creation architecture, and wondering if I’m reinventing (reimplementing, really) the wheel one time too many.  I’m looking for the basics: tweak object attributes in XML; reload on the fly; easily add new object types.  Basically, I want a pretty standard data-driven engine that pulls pretty much everything from level data to player info and quest/mission/plot progression from a bunch of XML files.

It may seem like it’s not that much– there are a million free XML parsers out there– but there’s always more to it than you’d think.  What information goes in attributes vs. children?  How do you handle reloads of changed data?  How much control do the objects being created have over parsing?  What about saving data out?

Do you know of anything that fits the bill?  C++ source code is best, but even a well-written, modern article describing a game-relevant architecture would be great.  I’m definitely noticing the paucity of game development writing compared to other sectors: I dug up a couple tiny game-related bits from 2002 that basically told me I should try using XML, while I also dug up many highly detailed case studies of XML-based GUI app creation.

Leave a Reply