[libxsd-frontend-users] Embedded XSD for games...

sam scott billythefisherman at googlemail.com
Mon May 14 09:25:08 EDT 2007


Hi Boris (no one else seems to post here!) - I hope I've got this post in
the right place but that's really what I'm trying to find out.  I'm writing
an article which I hope to post on a game development website which proposes
an 'ideal' pipeline for getting all our data requirements through one
conversion utility from the many different source applications we use.

All of these source apps (Maya, Proprietary Editor, MS Office) output XML in
varying formats and need converting to binary versions PC side - we're
incredibly data heavy and so any processing of XML data on the console side
is really out of bounds.  So at home I've started to experiment with your
xsd lib which is fantastic it must be said but have found one large problem
to do with my problem domain.

The problem goes like this: to get binary data off of the PC to console i
must deal with two problems: pointers and virtual table pointers.  The
former is easy and the latter a little less so but none the less possible
I actually use a lib from an article in Games Programming Games 5: "1.13 A
Transparent Class Saving and Loading Trick".  This basically replaces all
the pointers with a special 'smart pointer' which then gets turned into an
offset and put into a table at save time (PC side) and remapped out to the
correct memory address at load time (console side).

This means that due to the autogenerated nature of XSD and XSDe,
I have to add in an extra conversion step PC side to:

a) turn all the pointers into freeze pointers
b) strip down the data structures to there bare
bones (most just need to be simple arrays and structures) - actually XSDe
seems to provide a solution this point
c) remove as much inheritance as possible (usually i don't want any as
dealing with moving vtbl pointers over to target platform is a royal pain)

This step is error prone and time consuming and goes against the reason of
using an XML data binding step - the data binding helps but I feel I should
be able to get to this format direct ie use the auto generated data
structures console side)

So (and we fianlly get to the meat and potatoes here) to solve all my
problems I get the feeling I need to use your xsd frontend to write my own
version of XSD which fills my requirements: do you think this is so or is
there a method you've already devised of to deal with this type of
situation?

Thanks



More information about the libxsd-frontend-users mailing list