/* Title: Chicken Dinner
Creator: Zach Strauss
Assignment One: Interactive Drawing
Instructions:
Welcome to Battle Royale! Use your mouse to control the scope around the screen. Clicking will shoot and win the game,
printing out the winning phrase! Pressing any key on the keyboard reveals the hidden bush camper.
*/
void setup(){
size(400,400);
}
void draw(){
//Draws Blue Sky.
background(0,142,255);
//Toggles off the stroke for clean look.
noStroke();
frameRate(60);
//Sun and Clouds
fill(255,255,8);
ellipse(350,50,50,50);
triangle(320,50,310,60,310,50);
triangle(330,80,320,80,320,90);
triangle(360,90,350,90,350,100);
fill(208,237,235,90);
ellipse(mouseX,50,100,50);
fill(204,222,220,90);
ellipse(mouseX*.9,80,100,40);
fill(237,250,249,90);
ellipse(mouseX*0.7,70,100,50);
fill(161,185,184,99);
ellipse(mouseX*0.6,60,90,40);
//Draws the ground and hills in the backdrop.
//Side Hill
fill(39,144,4);
ellipse(400,350,400,200);
//Draws the bush
fill(87,183,33);
ellipse(330,250,40,40);
fill(101,173,61);
ellipse(370,250,40,40);
fill(98,162,52);
ellipse(350,240,40,40);
//Front Hill
fill(55,196,10);
ellipse(140,400,600,200);
//Draws the Crate
fill(198,60,62);
quad(60,200,120,220,120,320,60,280);
quad(120,220,180,200,180,280,120,320);
fill(37,98,193);
quad(120,180,60,200,120,220,180,200);
quad(60,200,60,220,120,240,120,220);
quad(120,220,120,240,180,220,180,200);
fill(254,26,26);
quad(70,280,70,225,80,230,80,290);
quad(100,235,100,305,110,310,110,240);
quad(130,240,130,310,140,305,140,235);
quad(160,230,160,290,170,285,170,225);
//Draws Crate Smoke
fill(255,0,0,80*sin(frameCount*0.01));
ellipse(100,150,50,50);
ellipse(20,120,20,20);
ellipse(50,110,30,30);
fill(255,0,0,80*sin(frameCount*0.02));
ellipse(110,150,50,48);
ellipse(40,110,40,40);
ellipse(80,180,60,60);
fill(255,0,0,80*sin(frameCount*0.03));
ellipse(70,150,60,60);
ellipse(70,130,70,70);
ellipse(50,120,30,30);
//Drawing the other player
fill(33,136,173);
ellipse(200,300,30,40);
ellipse(180,290,20,20);
ellipse(220,290,20,20);
fill(242,202,159);
ellipse(200,280,20,25);
fill(0);
ellipse(195,275,5,5);
ellipse(205,275,5,5);
fill(80);
rect(185,257,30,15,7);
//Drawing the Scope
noFill();
stroke(1);
strokeWeight(3);
ellipse(mouseX,mouseY,100,100);
fill(255,0,0);
ellipse(mouseX,mouseY,10,10);
}
void mouseClicked(){
print("BOOM! Winner Winner Chicken Dinner!");
}
void keyPressed(){
noStroke();
//Draws BushCamper//
frameRate(3);
fill(250,222,151);
ellipse(350,220,25,30);
fill(0);
ellipse(345,215,5,5);
ellipse(352,215,5,5);
fill(79,155,39);
rect(335,195,30,15,7);
}