Open john-science opened 5 years ago
I took a first pass at this, implementing:
localStorage
The only thing I haven't implemented yet is: optional sounds for the triggers.
Okay, as far as audio triggers go, it looks like HTML5 has an <AUDIO>
tag that is widely supported. (Al browsers have good support, except of course for IE, IE didn't start supporting until v9.)
Now I just need to find some open-source/freeware sound clips:
It turns out there are lots of places to get "free" 8-bit sound effects:
I am thinking 8-bit because (a) I want very fast sound clips and (b) I want to make this app as light-weight as possible for the users.
You can even make your own: https://www.bfxr.net/
Is there any way I can ensure the user doesn't have to download the file unless they need it?
Okay, the primary features here are built: we have visual and audio triggers. Awesome.
I find matching words using RegEx, which means there could be minor variations in what words get found across browsers and versions of JavaScript. These should be minor though.
The only thing to do now is more carefully play with the colors and sounds that are available: polish the look and feel of the new feature.
Thanks be to
Quow
, I have learned that most good MUD clients allow for visual and audio triggers. As it happens, my "word highlighting" feature is just a visual trigger. It sounds like my feature is not varied enough though. I need to be able to support:localStorage
to try and persist the user-created triggers for as long as possible.I see this changing the popup for triggers to a cascading list, something like