Version 10 (I've hit double-figures) contains a handful of new features.
- I've changed the way the intro screen moves out of the way to reveal the chat interface. I'm still not happy with the button on the page but that's a job for another day. Likewise, I'm tempted to add a page of simple instructions. This may be unnecessary, hopefully I'll get some comments to guide me in this decision (Actually I've gone ahead and done this 23/08/2012).
- There are some lines of dialogue that are delivered from the Actionscript file rather than the AIML on the Pandorabots server. These lines include the end-of-conversation sign offs and the responses to hecklers. I've added timer functions to these to stop them appearing, in an instant, as a block of text. I found this disturbing and I'm sure users did as well. Now these lines appear at about the same rate as the text that comes from the server.
- The text from the server uses a timer function that is based on the character count in the most recent line of text on the screen. Let's say Atomic said, "What now?". That is, including spaces, 9 characters. This I multiply by 52 milliseconds which is the reading speed per character I worked out in an earlier post. So that's 9 x 52 = 468 milliseconds. My guess on the reading speed was pretty close, however, after a lot of rehearsal time I found that I had to add another 200 millisecond to each line (468 + 200 = 668 milliseconds). That seems to be better but again I'll wait for some feedback.
98% of comedy is character... The other 98% is timing. I must look up that quote.
These timer have created some grief. I spent all of yesterday getting it wrong - functions not firing, or firing and giving meaningless results, the full disaster of programing problems. Thankfully I keep versions and sub-versions so that when it went wrong I could back track to a working iteration. Last night I watched about three hours of pointless television, went to bed, closed my eyes and - instantly saw the error of my ways. I actually could picture an Adobe website that explained that some number type variables in Actionscript 3 are base 0 and other base 1. I had been, for no good reason, using a base 0 type for the variable that calculates the characters in a string of text. What this means is that I was multiplying a number by zero and wondering why my timer wasn't working! Everything was zero. Today I fixed this in half an hour by declaring an initial value for each of the variables. Maybe this is some evidence of Wallas' Incubation phase of his four step theory of creativity.