top of page
  • colleenguirand1

Final Exam Project

Originally, I was planning on creating a doodle jump game where the player presses the space key to make an object jump from platform to platform, but I didn't seem to figure out how to make the object jump once it landed on a platform, so I created a game of catch.


First, I created multiple variable; screen, y, x, speed and score. Screen essentially lets the p5 know that nothing should be occurring. Y and X is used for measurement purposes of the ellipse and score is to keep track of the amount of times the ellipse comes into contact with the moveable square.


Secondly, I created a draw function basically saying that if the screen is false make gameOn true, which initiates the game play. Then the gameOn function keeps track of the score, parameters of the ball and the use of RectMode for the rectangle. I set y += to speed then said if y is greater than the height of the canvas make the screen equal to 1.


Then, I made conditionals for the movement of the mouse when the rectangle hits the ball. When the ball collides with the rectangle, the score would go up by one. In order to get the balls to drop at random, I used the pickRandom to have them coming down from the canvas.


https://editor.p5js.org/cguiran1/sketches/NyNHZtaIs

7 views0 comments

Recent Posts

See All

Final Project Idea

For my final project, I have two game ideas as to what I want to create. The first one was going to be a platform game, where there are thin rectangles floating on the canvas moving side to side depen

Algorithmic Bias Reading Respone

Where do we see examples of algorithmic bias around us? ​ - AI has been seen used in job applications, police departments and with our personal devices Had you heard of any of these examples?​ - I hav

Wall Tennis

For this project, I created a virtual version of wall tennis. Essentially, there is one player, one ball and a wall. When the player serves, the ball bounces to the wall and back to them. If the playe

Post: Blog2_Post
bottom of page