Sunday, January 27, 2013

We, the Roodylib

I made some great Roodylib progress lately. It was especially satisfying work because some of the features were requested; I definitely intend to check with everybody to see if there's anything they want to see in the next one, as Roodylib is at its best when it's a collaborative effort.

One of the suggested features was to make it easier to credit the Roodylib version in-game. For a long time, I've had a versioning system on the compiler side of things, but I admit that, in the future, I'll be curious which Roodylib version this or that game was compiled with. So, now there's a ROODYBANNER constant that says something like "RoodyLib Version 2.7" and a ROODYVERSION constant that will just say "2.7".

I also added a default "XYZZY" response to Hugo, as suggested by Rob O'Hara. He doesn't even use Hugo regularly, but he is one of the many Hugo authors caught unawares by players trying the outdated command. The new response is, "You mention an ancient reference to an archaic game. Nothing happens." This XYZZY-support can be turned off with the NO_XYZZY flag.

Along the lines of the crediting mentioned above, I added a system to Roodylib making it easier to pull up a list of included libraries for hypothetical CREDITS responses. In setting this system up, I made a ListChildren routine so object hierarchy can be used to create lists, the way that PropertyList uses property elements to do so (or PrintArrayList uses arrays).

I think it's kind of cool to set up this object-based way to do this. I haven't thought very long and hard about it, but I imagine there are cases where doing it this way might have some benefit over the other ways, just because object-hierarchy is auto-collapsing and you don't have to worry about empty elements.

At some point, I'm going to have to try my hand at writing several object-based sorting routines just to see what they look like.

Also, I added a "conjunction" argument to PropertyList, ListObjects, and PrintArrayList so you can conceivably replace the AND_WORD with something like "or", for when your listed options are choices.

Lastly, it didn't go into Roodylib, but Robb requested some weather code when I asked everybody if they had any other requests. I knew that Future Boy! had both nice weather and environment support for such things like sky, ground, and stuff, but while related, they were in different files. I spent some time yesterday combining the code (and commenting out Future Boy!-media-specific lines). The result can be found at roody.gerynarsabode.org/hbe/enviroweather.zip .

2 comments:

  1. The object-based credits system is good news to me. I've still been fumbling for a more objective way to organize my credits.

    Sorry that I haven't been following this very well.

    ReplyDelete
    Replies
    1. Well, it's been a while since I even wrote anything here. Being my only official follower, you are the only person I can count on seeing my posts without my advertising updates on twitter or the ifMUD or such (well, it's possible some people are following the RSS feed, too, but I can't say for certain) so I appreciate that!

      Delete