///Below is a global declaration float xDog,yDog, xspeedDog=5,yspeedDog=-2; float xPhil,yPhil, xspeedPhil=7,yspeedPhil=+3; float sunX,sunY; float yDeck; void setup() { size(800,400); yDeck=height/2; xDog=random(30,70); yDog=100; xPhil=random(30,70); yPhil=random(100,300); sunX=width/2; sunY=50; } ///The background that is a deck of someones house. You are looking down, into the grass. void theDeck() { fill(139, 69, 19); rect(0,yDeck, 100, yDeck+100); rect(100,yDeck, 100,yDeck+100); rect(200,yDeck, 100,yDeck+100); rect(300,yDeck, 100,yDeck+100); rect(yDeck,yDeck, 100,yDeck+100); rect(yDeck+100,yDeck, 100,yDeck+100); rect(600,yDeck, 100,yDeck+100); rect(700,yDeck, 100,yDeck+100); rect(800,yDeck, 100,yDeck+100); rect(900,yDeck, 100,yDeck+100); rect(1000,yDeck, 100,yDeck+100); rect(1100,yDeck, 100,yDeck+100); } void draw() { background(0,200,0); action(); theSun(); theDeck(); waterMark(); philliptheHero(); theStalker(); fill(255,255,255); ellipse(xDog,yDog, 150,150); ///The ball (Dog) bounces off of all four sides of the screen. if (xDog > width) { xspeedDog = -xspeedDog; } if (xDog < 0) { xspeedDog = - xspeedDog; } if (yDog < 50 ) { yspeedDog = - yspeedDog; } if (yDog > height-50 ) { yspeedDog = - yspeedDog; } } void action() { xDog=xDog + xspeedDog; yDog=yDog - yspeedDog; xPhil=xPhil + xspeedPhil; yPhil=yPhil - yspeedPhil; } /// I added a sun that moves around the program. void theSun() { fill(0, 0, 0); ellipse(sunX, sunY, 30, 30); if (sunX > width) { sunX= 0; sunY= random(10, 150); } sunX= sunX + 1; } ///My name is here. void waterMark() { fill(255,0,0); text("Made by Phillip", 50, 50); text("https://youtu.be/Vhh_GeBPOhs", 50, 100); } ///Made something that will follow the mouse. void philliptheHero() { fill(0,0,255); /* rect(mouseX, mouseY, 50,80); ellipse(mouseX+25, mouseY-20, 40,40); */ rect(xPhil, yPhil, 50,80); ellipse(xPhil+25, yPhil-20, 40,40); } void theStalker() { smooth(); fill(64,0,128); ellipse(700,300, 150,150); fill(255,255,255); ellipse(660,279, 50,50); ellipse(740,279, 50,50); fill(0,0,0); ellipse(660,279, 20,20); ellipse(740,279, 20,20); } void mousePressed() { xPhil= mouseX; yPhil= mouseY; xspeedPhil= random(2,9); yspeedPhil= random(-3,3); }