top of page

Let's play CRAB Game!

  • yz7720
  • Sep 23, 2021
  • 1 min read

This little p5.js interactive game project I did with my classmate Tuan was inspired by a computer game that we played when we were child, which is about a crab catching dropping apples. (The Crab will be fixed at the bottom of the screen, and the balls will drop from the top of the screen, the more apple you catch, the more score you will add).


I started the projected with drawing out the crab, our main character as per below code. We initially wanted the crab to be fixed at the bottom, and only travel in X direction. Once the apple drops and hit the 2 front feet, you add a score. But we figured that the could be exactly like the game we played... so we switched out direction.


Instead of having the crab catch the ball, we decided to have the crab as a distraction, which can make the game a bit harder to play ,with the crab growing a bit bigger each time you catch a ball when you hit 50 scores


.








Tuan coded the ball game part as per below code, and we were managed to blend 2 parts together afterwards by having the scale of the crab to change with the score: scale(score/70).


We hope you like it!!!

🦀🦀🦀🦀🦀🦀🦀🦀










Comments


Post: Blog2_Post
bottom of page