Showing posts with label SimpleTalk. Show all posts
Showing posts with label SimpleTalk. Show all posts

Thursday, March 14, 2013

simpletalk

I did upload Roodylib the other day. While I was at it, I uploaded my latest versions versions of beta.h, newmenu.h, and simpletalk.h. Of course, once you upload something, you think of how something could be further improved, and I decided I'd finally add looping-conversation-menu functionality to simpletalk and newsimpletalk.

For whatever reason, in my mind's eye, I thought it'd be something as simple as:
    while true
    {
        if not Phototalk
            break
    }
But the reality was that my code wasn't setup for such a thing. So I added some stuff and long story short, setting the new loop_talk global variable to true causes conversation menu to loop for as long as options are available or until the player quits.

 After that, I added a can_quit global variable that defaults to true, but if set to false, the player doesn't have an option for leaving the conversation menu.

The new versions are up at Hugo by Example but I forgot to mention the new features in the comment documentation. Oh well, next release.

Sunday, January 27, 2013

SimpleTalk

I recently took another look at simpletalk.h, my include-able version of Robb Sherwin's ptalk, which was his port of Adam Cadre's "phototalk" extension for Inform 6 (based on code he used for his game, Photopia). I took a look at simpletalk for two reasons- 1) simpletalk was one of my earliest stabs at library-extension-writing and I thought it was likely I could make it look better, and 2) there was some code in the original "phototalk" whose purpose I couldn't understand and I wanted to take another swing at it.

This time around, I decided that the confusing code was Inform 6's version of Hugo's masking function. Having figured that out, I then had to think for a long time about why masking was even useful. Eventually, I decided such an implementation would allow simpletalk to easily distinguish between unavailable-and-already-spoken and unavailable-and-not-spoken chat options, or available-and-spoken and available-and-not-spoken chat options.

I also decided that the SetUpQuips routine and the arrays were an awkward way to keep track of everything, so I switched it over to a property-element-based system and renamed the extension as "newsimpletalk".

Still, I am keeping an updated-but-using-the-old-array-system version (still called "simpletalk") that will hopefully work with all existing ptalk code out there.

Anyhow, I really need to write a HbE page about the usefulness of masking. It's only taken 15 years or so, but I finally would know how to do the duct-tape-weapons system from "Death To My Enemies" in Hugo.