Your browser does not support the canvas tag.

previous        Show / Hide Source        Download        next

///////////////////////////////
//Excalibur By Dw (Adwoa) Armah
///////////////////////////////
/*make excalibur move on Y axis to move out of rock
when you click the screen it displays the text "Wield the legend"
the background color changes depending on the mouse positon */


void setup(){
//canvas 400 x400
size(400,400);

}
void draw(){
background(mouseX-20,mouseY+202,204);///

noStroke();///<-- this starts the light beams,animate streams to look cooler 
fill(250,212,106,75);
rect(100,0,200,360);
fill(250,224,151,150);///lighter shade
rect(130,0,140,360);

///sword blade,actual blade
noStroke();
fill(219);
rect(190,mouseY+35,20,90);

////pointy end of sword
noStroke();
ellipseMode(CENTER);
ellipse(200,mouseY+130,20,30);////pointy end of sword

ellipseMode(CENTER);///<_-- this is the hill at the bottom
fill(0,170,100);
ellipse(200,370,1200,130);

noStroke();///<--- the tree on the left side of canvas 
fill(50);
rect(0,300,20,100);
fill(50);
triangle(0,210,50,300,0,300);
/// pine tree leaf shapes
triangle(0,160,40,250,0,250);

noStroke();////pine tree right side
fill(50);
rect(380,240,30,160);
fill(50);
triangle(400,50,340,200,400,200);
////riht side pine leaf shapes
triangle(400,120,340,260,400,260);

///middle stone
stroke(100);
fill(100);
rect(170,270,60,70);
noStroke();
fill(100);////samecolorof rock or itll look weird 
triangle(170,270,170,340,140,340);
triangle(230,270,230,340,250,340);

///left stone make fill a speclighter then middle stone
fill(105);
rect(130,280,40,60);
triangle(130,280,130,340,120,340);

///right side stone
//make the color lighter cause it a spec closer then middlestone
fill(103);
rect(230,300,30,40);
triangle(260,300,260,340,280,340);

///start of lower sword
fill(250,189,58);
rect(180,mouseY+27,40,10,50);//the hilt hadle base ontop sword blade
rect(190,mouseY+20,20,10,75);/* sword blade rounded rect ontop of blade hiltbase 
make this quad move on y axis with mouse*/
fill(245,210,136);
rect(195,mouseY,10,20);///handle of sword 
fill(250,189,58);
rect(190,mouseY,20,10,50);//hilt blade ontop of base blade
///sword ball at top at hilt
ellipseMode(CENTER);
ellipse(200,mouseY,10,10);
}

void mousePressed(){
  // show "wield the legend !
  print("Wield the Legend");

/// add animated squares that are like light pips 



}