Like last week, this was a busy week for progress. I worked on my attractions, movement, as well as some issues with animations and getting the fish to be attracted to the moving hook.
Here's an infographic I made, which details the attraction system as well as the movement.
Firstly, I adjusted the attract code to make it a chance to attract the fish. I enjoy randomness a bit in games, and thought it would be cool if they acted semi-realistically.
I made adjustments to how the fish moved. I used a sine wave function to create a gradual ease in and ease out in their movements. Through this, I also added a pause timer (to give the fish a moment to sit still for realism), which kept killing the fish because I seem to keep forgetting how to code timers (same issue as last time).
I also implemented the repel system, which will send the fish offscreen where it will despawn. So if you mess up the catch, you won't get another shot.
And finally, I implemented movement being something the fish are attracted to. So while the hook is moving, the fish will be attracted to it.