I am looking for some java-script snippet to create some kind of "mini game" like in Tlaero's "Coffee for Keisha".
What I have so far is an array of 15 pictures that are animated on mouse over plus mouse position (coords).
What I am missing is how to control the mouse move direction and speed.
With the current code moving the mouse left right will trigger the animation and the faster the mouse is moved the faster the animation gets (got the inspiration from Josefus' "the nurse" game here from the forum.
But what I would like to achieve is: To define HOW the player must move the mouse to progress, means in which direction and how fast.
I am thinking of starting slow with some pause and then if the "tension meter" is raised it's required to move faster to progress.
I checked the code Tlaero used in Coffee for Keisha but it seems she is using only 2 pictures not an array of 15 and the functions are spread in different files, so I can't really figure out which code snipped does the magic.
Also I wonder how to integrate the sound, triggering the sound on mousemove is not the best way as it stutters...
Any ideas?