top of page

Final Exam Project

  • colleenguirand1
  • Dec 9, 2021
  • 1 min read

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

 
 
 

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...

 
 
 
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...

 
 
 
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...

 
 
 

Comments


Post: Blog2_Post
  • Facebook
  • Twitter
  • LinkedIn

©2021 by Colleen's Blog. Proudly created with Wix.com

bottom of page