Which pretty much means I'm done with normal content creation altogether. I'm going to have to go ahead with my earlier mass-distribution system, which means lots of coding. I'm not entirely sure how I feel about that. On the one hand, it was always less tedious to code than make new content for the game. On the other hand, making new content was a very casual thing, I could just sit down and work for a bit. We'll see how it turns out.
Other things include me re-thinking the XML I'm doing. Here's what it looks like now:
<sector x=5 y=7 ...>
<child name="planets">
<planet .../>
</child>
</sector>
There's a lot of stuff being replaced by those ellipses. And I mean a /lot/. Multi-line text fields are the most common. I'd like to merge them as their own elements. So it'd be something like this:
<sector tag="foo">
<fields>
<x>5</x>
<y>7</y>
</fields>
<children>
<planets>
<planet/>
</planets>
</children>
</sector>
It's more verbose, but I also think it's an easier read. At least, when I'm debugging, it's a pain in the ass to try to locate the one field I need in a sea of text. This way they're at least on their own line.
Converting between the two will be... interesting. I think I'll start a data-format versioning system so new versions of the game will be able to understand old/differently formatted data, or at least reject it out of hand. Then I'll use the magic of XSLT to change everything I've written so far from the old format to the new.
I just learned XSLT recently, and I'm liking it. It may end up being my patch tool of choice!
No comments:
Post a Comment