Midterm

For the midterm project I want to make a fruit tree that dropped fruit and as the fruit dropped you would have to catch it with a basket. The tree was suppose to have red, green, and yellow apples and each color gave a certain amount points. You had a minute to catch as much fruit as you can. The score would show at the top of the screen as well as how much you missed and caught. I also thought about making levels for it so the apples fall at a faster rate and also “rotten” apples would fall from the tree and lower your score. For the project I was only able to make the tree,apples,basket. I made one “fruit” fall and the basket move side to side as plan. During the project I struggled with getting all the fruit to fall and testing to see if the fruit landed inside the basket. I had trouble with the timer and score and loading more than one image. Other than that I was pleased with my project and I hope to continue with it for the final.

-P.S I know this is late but as I said in one of the emails I sent you I do not have a computer at home at the moment but will soon hopefully.

PImage myImage; //PImage myImage2; int spacing= 60; int ballX= 30; int ballY= 100; int SpeedX= 0; int SpeedY= 5; int freeze =100 ; void setup(){ //  background(18,119,224);   size(600,600); myImage= loadImage(“redapple.gif”); } //myImage2= loadImage(“basket.gif”);

void draw(){    background(18,119,224);   //image(myImage,mouseX,mouseY,300,200);   if(ballX < 0 || ballX >width) SpeedX = SpeedX;   if(ballY > height) ballY = freeze;   //image(myImage,200,300,20,20);   //background(18,119,224);   //ellipse(ballX,ballY,20,20);   //ballX += SpeedX;   //ballY += SpeedY;   //rect(mouseX,height-10,100,10);   noStroke();// no black outline fill(103,65,19);// brown trunk rect(200,200,200,600); noStroke();// no black outline fill(19,103,38);// green leaves ellipse(width/2,height/4.2,600,272);// green circle fill(255,255,255);   for(int x=30; x<width; x=x + spacing)   {    for(int y=100; y<height/3.5; y = y + spacing)     {          //fill(int(map(y,0,height,255,225)));       ellipse(x,y,20,20);       fill(255,0,0);          }   } //if(ballX < 0 || ballX >width) SpeedX = SpeedX; ellipse(ballX,ballY,20,20); //image(myImage,18,87,30,30);   ballX += SpeedX;   ballY+= SpeedY; fill(206,134,67);   rect(mouseX,height-10,70,10);
image(myImage,17,84,30,30); image(myImage,70,84,30,30); image(myImage,130,84,30,30); image(myImage,190,84,30,30); image(myImage,250,84,30,30); image(myImage,310,84,30,30); image(myImage,370,84,30,30); image(myImage,440,84,30,30); image(myImage,500,84,30,30); image(myImage,550,84,30,30); image(myImage,17,145,30,30); image(myImage,75,145,30,30); image(myImage,140,145,30,30); image(myImage,200,145,30,30); image(myImage,260,145,30,30); image(myImage,320,145,30,30); image(myImage,380,145,30,30); image(myImage,440,145,30,30); image(myImage,500,145,30,30); image(myImage,560,145,30,30); }

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *