//// Project 0: Making a static sketch including a scene and creatures //// By Aldair Pacora float bodyx1, bodyy1; float bodyx2, bodyy2; float sunX, sunY; float headx1,heady1; float headx2, heady2; float hiltx, hilty; float bladex, bladey; void setup() { size(800,600); // size of the sketch will be 800x600 sunX = 50; // setting sun x, and y axis sunY= 50; bodyx1 = 50; bodyy1 = 500; bodyx2= 300; bodyy2= 500; headx1 = 75; heady1 = 375; headx2 = 325; heady2 = 375; hiltx= 100; hilty= 450; bladex= 102.5; bladey= 450; } //DRAWING THE SCENE void draw() // scene will include a place with green grass and a blue sky with a singular tree. A Hero chases a Villain with his sword across the screem { background(135,206,250); // background color is sky blue fill(0,255,0); rect(0,500,800,750); // makes grass at the bottom, grass is green fill(255,255,0); ellipse(sunX,sunY,60,60); //makes sun (yellow) fill(255,0,0); rect(bodyx1,bodyy1,50,-100); //makes body of Hero red ellipse(headx1,heady1,50,50); //makes head of hero fill(0,0,255); rect(bodyx2, bodyy2,50,-100); //makes body of Villain ( blue) ellipse(headx2,heady2,50,50); //makes head of Villain fill(153,76,0); rect(hiltx, hilty,20,20); //makes hilt of sword fill(192,192,192); rect(bladex, bladey, 15, -50); // makes the blade of sword fill(139,69,19); rect(600,500,50,-150); // makes trunk of tree fill(34,139,34); ellipse(600+25,500-175,110,110); //makes leaves on tree //ACTION: Sun, Hero, Villain, and sword all go across the screen sunX = sunX+1; // moves sun across the sky bodyx1= bodyx1+1; // moves Hero's body across headx1 = headx1+1; // moves Hero's head across bodyx2= bodyx2+1; // moves Villain's body across headx2 = headx2+1; // moves Villain's head across hiltx = hiltx+1; //moves hilt across bladex= bladex+1; //moves blade across // MESSAGES fill(0); text(" A one sided confrontation during the day",500,200); text("By Aldair Pacora", 500, 220); }