Up to Main Index                               Up to Journal for May, 2019

                      JOURNAL FOR MONDAY 27TH MAY, 2019

SUBJECT: What did you say?
   DATE: Mon 27 May 20:10:45 BST 2019

After my somewhat ranty entry last time I’ve found a little spare time which I
have spent on ‘The Cottage’ (hereafter TC). Mostly I’ve been implementing
suggestions and tidying up the code. The current version on this site, and in
other posts has been updated. The public Git repository has also been updated:

  git clone https://code.wolfmud.org/theCottage.git

The biggest change has been to use a ‘TC’ namespace instead of spraying
everything into the global namespace. Originally I didn’t think this would be
a big deal for my little toy, but there were complaints and I agreed it wasn’t
good form for others looking at the code to learn.

Other changes include using strict mode and also preferring ‘const’ over ‘let’
where applicable — as this allows the browser to do more optimisations. The
rest of the changes are mostly cosmetic, like white-space around operators. I
was pointed at a useful Google style guide for JavaScript[1] which has been
quite insightful. Some missing meta tags have been added for completeness,
including a theme-color for mobile.

Nearly forgot, I added support for text-to-speech to TC. You can now turn a
narrator on or off using the NARRATOR command. When testing anything Chrome
based it used a female voice, while iOS and Edge used a male voice. Support
for text to speech across browsers seems quite good[2]. So far I’ve tested
speech — and had it working — on a Linux desktop, Windows laptop, Chromebook,
mobile phone, tablet and an iPod touch. The reverse, speech to text, is quite
poor. Internet Explorer 11 does not support the web speech API at all :(

Wouldn’t it be nice if you could play a text adventure using just your voice
and have what happens read out to you? Seems like an ideal task for something
like my Google home mini.

Hrm, “audible adventures”™ instead of text adventures anyone?

I was grinning from ear to ear the first time I tried this and it worked with
TC, so damn cool… :D

One thing I am not sure about, and would like feedback on: Is TC playable by
users using assistive technologies, such as screen readers?

Everything, except speech, is still working in Internet Explorer 11 ;)



  [1] Google JavaScript style guide:

  [2] Speech support on caniuse.com: https://caniuse.com/#search=speech

  Up to Main Index                               Up to Journal for May, 2019