Mike's 4th Assignment Continued...(The Fish Eating Game)
- michaelfischernpt
- Sep 23, 2020
- 1 min read
Learning the collision code really helped bring the game to life. I was able to make the fish get bigger when it eats the green dot as well as made the fish get smaller and change color when it eats the red dot.
The Fish Eating Game as follows:
Fish gets bigger when you eat Good food (Green dot)
Fish gets smaller and changes color when you eat Bad food (Red dot)
Objective of the Game:
Eat Green Food 10 times to win
If you get hit by the Red food 5 times you Lose (Dark Blue)
Controls:
Use arrow keys to move the fish
Press R on the keyboard to reset the game
It was a fun project and it was cool to see it come to life. Some of the problems I had were the annoying paying attention to detail mistakes, where I didn't have a capital letter or was missing a bracket. I'm definitely understanding more and more that it's a necessity to take your time and pay attention to each code. Also when I do the code to make the fish bigger, the body of the fish gets big, but the fins don't and become disproportionate. I wasn't sure how to make it aesthetically pleasing when it gets bigger. The triangle only uses X and Y positions, so I couldn't add a size variable to it. Overall, I'm happy with how the game came out.
The link to the game is below:
On P5 you have to click the Play button and click on the canvas with your mouse to start the game.

Comentarios