my goal is to make a simple follow-the-line type of game in Javascript. I know nothing of javascript, but I know programming (Java mainly).
In this game, user has to follow a drawn line with his/her mouse pointer. There is start and end point of line, naturally.
So far I found this code: Make an image follow mouse pointer, but now I'm struggling with checking when mouse coordinates are not inside of line.
I can use any library, so if there are some easy js libraries for games, please recommend them to me.
So, to repeat the question: how do I check if mouse cursor is inside of line (pipe)? If you have any additional advice, please post it.