Last time I said, "I can confidently say I'll finish the alchemical ritual code in August." Which I did! Barely. (I just finished the last unit test, at 8:30 pm on the 31st.)
I now have 34 alchemical rituals working. And 265 unit tests, which demonstrate that they're working. I'm feeling a little dizzy, honestly.
You'll recall I said something about "burning bits of wood and an alchemical retort" being the last bits of infrastructure. Well, inevitably, those were a nightmare. Burning things is one of the archetypical Hard Things To Do In IF. The other two are mixing liquids, and rope. Well, I implemented all the liquid-mixing back in July... and this game is not going to contain any rope.
(There's a silk cord, but you can't tie it to things.)
Long story short: I now have a setting-things-on-fire engine, to go along with the liquid-mixing engine and the ritual state machine. This is where I get very grateful for Inform 7 and its rulebook architecture.
Quick example (you want a quick example, don't you?): the general command is "BURN X WITH Y". (There are many synonyms, of course.) So I set up a rulebook, and start filling it in with both general and specific rules.
- burn (hardwood) with (burning softwood): The fire isn't hot enough for the hardwood to catch.
- burn (softwood) with (burning magnesium): The wood burns away instantly.
- burn (burning magnesium) with (burning softwood): The wood burns away instantly.
- burn (wood) with (anything burning): The wood catches fire.
- burn (anything burning) with (anything burning): "That's already on fire."
- burn (anything) with (anything burning): "Randomly settings things on fire won't help."
These are not straight out of the game -- I don't really have magnesium -- but they give you the idea. It doesn't matter that some of these rules overlap; I7 arranges them from most specific to most general, and finds the first one that covers the situation. This means that I can start with some broad cases, and then add details until I'm satisfied. I don't need to plan the whole matrix from the beginning.
Which is good, because there's no way to think of all this stuff from the beginning. That case of "BURN FLAMING MAGNESIUM WITH BURNING SOFTWOOD"? I didn't realize until I tried it that it needed its own case. Sure, I could have let the "already on fire" case cover it -- but that wouldn't be satisfying.
(Then I built the retort, which has a sort of bunsen-burner arrangement, and realized that requires a whole new set of mechanisms. That took four days right there.)
Anyway, that's the war stories for August. What's up for September: a lot of little mechanisms and transformations which are needed for puzzle-solving, even though they're not rituals in their own right. For example, drawing a gold bead out into gold wire. Or jumping into a pool, and finding that all your possessions get soaked. (I'd say this is the easy stuff, but, well, liquids and fire. They're always extra work. Stay tuned for more war stories.)
In non-IF news: keep an eye out for another secret iPhone project! It should hit the App Store next week. This is an audio project, and if you're a long-time follower of my work, you might be able to guess which audio project.
Post a Comment