Talk:Plan for new RPG format

Jump to: navigation, search

S'orlok Reaves: Nice to see someone else thinking about this! But I have an observation: XML is a well-proven technology, but it is so very very heavy. Have you considered other text formats, like YAML or even JSON?

Bob the Hamster: While I don't need convincing about the messyness of the current format, I do need convincing about (A) the advantage of keeping both a text and binary format at the same time, and (B) The need to do this at all. the binsize+fixbits scheme makes it pretty easy to add and modify fields already, so isn't this conversion a huge amount of work for a relatively small payoff? Also, (C) isn't this somewhat at odds with the goals of Plan for an Editor Editor? I'm not saying I am totally against it, just saying I need more convincing on all these points.

Bob the Hamster: Also, on a more positive note, I think the fact that we can approach this transition on a one-lump-at-a-time basis will make it really easy to make any transition safely and backwards compatibly, even if we are experimenting.

Mike C.: Note A: Strictly speaking, we don't need to keep both lumps. The binary lumps could be generated from the XML lumps at load-time, if we wanted. But, it's for efficiency reasons. I have absolutely no idea how long it would take to "compile" a whole game, but I'm sure we wouldn't want to do it at game startup.

The reason for keeping the XML lumps, and not the binary lumps is... well, that's what we have now. Upgrading old lumps is a pain. Fixbits+binsize is a horrible hack, IMO. I would rather shift away from the concept of "binary lumps that can grow" to "binary lumps that are fixed in size, but the size can change at will with no consequences".

Note B: Er, see the last paragraph.

Note C: Not at all. There are numerous XML schema languages that describe the structure of an XML file. We can use one of those, or make up our own, probably the second option:

<editors root="foobars">
 <editor id="foobar">
  <title>Foobar editor</title>
  <menu open="foobar_foo">Edit Foo</menu>
  <integer name="foobar@barprice">Bar Price</integer>
  <string name="foobar/title">Bar Caption</string>
 <editor id="foobar_foo">
  <string name="foobar/foo@caption">Foo Caption</string>

I'm borrowing the XPath syntax to describe which data we're editing. Also note that defaults are, again, omitted (default for integer would be 0, and for string it would be "").