Creating My PoolSlider
I had an idea to make a slider that was sort of game adjacent, and I wanted it to move more that just side to side. I've been playing 8Ball on imessage games recently, so it was on my mind and I used it as inspiration. Originally, I was going to have a ball move in a triangular shape, like on a pool rack, but constraining the ball movement within a triangualr geometry was a little confusing for me. Then, I thought it would be just as cool to actually make a pool table for the ball to move around on. I struggled to get the ball to drag for a while. At first, it was only changing location with the click of the mouse, but I took a look at some other examples of dragging in the projects provided on the assignment sheet. With those, I realized how to call dragging properly. I used the constrain function to limit the movement of the ball, and also made it so that once the mouse was realeased, the ball would return to its original position. If I were to continue working on this, I might add some sort of function that makes a message pop up with you go to a certain hole or perform a specific pattern of movement.