Classes/Objects/Vectoring (week 3)


Part 1:

I wanted to use Sprites from Itch.io for this project and found a cute and free pack of them here.

The features I want to add within this part are:

*Sprites (each instance of the object should be a random sprite from the set) *Random size within a certain range *Random Tint

Part 1 Code

After reading the excerpt from The Nature of Code, I wanted to make the movement in my code reliant on switching directions based upon mouse position and use mirroring to display the gif’s directional movement more naturally.

I implemented a simple if function to change a speed multiplier (-1 or 1) for both the x and y directions. Here’s the current code.

Further work on this project could be using some kind of tethering function to have the fish circle around certain points or something similar.

Leave a comment

Log in with itch.io to leave a comment.