void setup() { size(400, 400); } void draw() { background(255); frameRate(60); //shield //sword //background noStroke(); fill(185, 186, 193); quad(mouseX-150, mouseY-150, mouseX+150, mouseY-150, mouseX+150, mouseY+150, mouseX-150, mouseY+150);//main fill(150, 150, 168); quad(0, 0, 400, 0, mouseX+150, mouseY-150, mouseX-150, mouseY-150);//top fill(177, 177, 188); quad(0, 0, mouseX-150, mouseY-150, mouseX-150, mouseY+150, 0, 400);//left fill(177, 177, 188); quad(mouseX+150, mouseY-150, 400, 0, 400, 400, mouseX+150, mouseY+150);//right fill(139, 139, 147); quad(mouseX-150, mouseY+150, mouseX+150, mouseY+150, 400, 400, 0, 400);//down rectMode(CENTER);//DOOR ellipseMode(CENTER); fill(175, 125, 50); noStroke(); ellipse(mouseX, mouseY, 100, 120); rect(mouseX-25, mouseY+75, 50, 150); rect(mouseX+25, mouseY+75, 50, 150); fill(0, 0, 0); stroke(147, 106, 44); line(mouseX, mouseY-60, mouseX, mouseY+150); fill(255, 218, 67); ellipse(mouseX-8, mouseY+60, 6, 6); ellipse(mouseX+8, mouseY+60, 6, 6); //LightEffects_left noStroke(); ellipseMode(CENTER); fill(255, 250, 95, 80); ellipse(0.5*(mouseX-220), 0.60*(mouseY+51.6666)-20, 120, 120); //1-2 ellipse(0.75*(mouseX-177.5), 0.80*(mouseY-8.75)-20, 105, 105);//2-2 ellipse(1*(mouseX-163), 1*(mouseY-45)-20, 90, 90);//2-3 //LightEffect_Right noStroke(); ellipseMode(CENTER); fill(255, 250, 95, 100); ellipse(0.5*(mouseX+600), 0.60*(mouseY+51.6666)-20, 120, 120); //1-2 ellipse(0.75*(mouseX+305.333), 0.80*(mouseY-8.75)-20, 105, 105); //2-2 ellipse(1*(mouseX+163), 1*(mouseY-45)-20, 90, 90); //2-3 //candles on right side ellipseMode(CENTER); rectMode(CENTER); fill(234, 173, 38); rect(1*(mouseX+163), 1*(mouseY-45), 4, 30.333); //3 fill(0, 0, 0, 200); rect(1*(mouseX+163), 1*(mouseY-52), 4, 15); //3-1 fill(255, 201, 6); rect(0.75*(mouseX+305.333), 0.80*(mouseY-8.75), 4.5, 37); //2 fill(0, 0, 0, 200); rect(0.75*(mouseX+305.333), 0.80*(mouseY-20.75), 4, 15); //2-1 fill(255, 229, 173); rect(0.5*(mouseX+600), 0.60*(mouseY+51.6666), 6, 43); //1 fill(0, 0, 0, 200); rect(0.5*(mouseX+600), 0.60*(mouseY+29.6666), 6, 15); //1-1 //candles on LEFT side ellipseMode(CENTER); rectMode(CENTER); fill(206, 165, 75); rect(1*(mouseX-163), 1*(mouseY-45), 4, 30.333); //3 fill(0, 0, 0, 200); rect(1*(mouseX-163), 1*(mouseY-52), 4, 15); //3-1 fill(255, 201, 6); rect(0.75*(mouseX-177.5), 0.80*(mouseY-8.75), 4.5, 37); //2 fill(0, 0, 0, 200); rect(0.75*(mouseX-177.5), 0.80*(mouseY-20.75), 4, 15); //2-1 fill(255, 229, 173); rect(0.5*(mouseX-220), 0.60*(mouseY+51.6666), 6, 43); //1 fill(0, 0, 0, 200); rect(0.5*(mouseX-220), 0.60*(mouseY+29.6666), 6, 15); //1-1 //LightEffects_BACKGROUND noStroke(); fill(0, 0, 0, 80); rectMode(CENTER); rect(mouseX, mouseY, 900, 900); //fire on candles (right1) noStroke(); fill(255, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX+583), (0.60*(mouseY+40.6666)-(3*frameCount)%45), 10, 10); fill(255, 255, 0, 225); rect(0.5*(mouseX+611), (0.60*(mouseY+40.6666)-(3*frameCount)%13), 10, 10); fill(255, 255, 0, 225); rect(0.5*(mouseX+607), (0.60*(mouseY+40.6666)-(3*frameCount)%25), 10, 10); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX+593), (0.60*(mouseY+40.6666)-(3*frameCount)%50), 10, 10); fill(0, 0, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX+611), (0.60*(mouseY+40.6666)-(3*frameCount)%80), 10, 10); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX+600), (0.60*(mouseY+40.6666)-(3*frameCount)%80), 8, 8); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX+600), (0.60*(mouseY+40.6666)-(3*frameCount)%60), 8, 8); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX+600), (0.60*(mouseY+40.6666)-(3*frameCount)%60), 8, 8); //fire on candles (right2) noStroke(); fill(255, 0, abs(100-(3*frameCount)%100)); rect(0.75*(mouseX+319.333), (0.80*(mouseY-20)-(3*frameCount)%45), 10, 10); fill(255, 255, 0, 225); rect(0.75*(mouseX+299.333), (0.80*(mouseY-20)-(3*frameCount)%13), 10, 10); fill(255, 255, 0, 225); rect(0.75*(mouseX+308.333), (0.80*(mouseY-20)-(3*frameCount)%25), 10, 10); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.75*(mouseX+310.333), (0.80*(mouseY-20)-(3*frameCount)%50), 10, 10); fill(0, 0, 0, abs(100-(3*frameCount)%100)); rect(0.75*(mouseX+299.333), (0.80*(mouseY-20)-(3*frameCount)%80), 10, 10); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.75*(mouseX+297.333), (0.80*(mouseY-20)-(3*frameCount)%80), 8, 8); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.75*(mouseX+305.333), (0.80*(mouseY-20)-(3*frameCount)%60), 8, 8); //fire on candles (right3) noStroke(); fill(255, 255, 0, 225); rect(1*(mouseX+160), (1*(mouseY-55)-(3*frameCount)%34), 8, 8); fill(255, 255, 0, 225); rect(1*(mouseX+147), (1*(mouseY-55)-(3*frameCount)%23), 8, 8); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(1*(mouseX+173), (1*(mouseY-55)-(3*frameCount)%60), 8, 8); fill(0, 0, 0, abs(100-(3*frameCount)%100)); rect(1*(mouseX+154), (1*(mouseY-55)-(3*frameCount)%73), 8, 8); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(1*(mouseX+158), (1*(mouseY-55)-(3*frameCount)%80), 8, 8); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(1*(mouseX+163), (1*(mouseY-55)-(3*frameCount)%60), 8, 8); //fire on candles (left1) noStroke(); fill(255, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX-222), (0.60*(mouseY+40.6666)-(3*frameCount)%45), 10, 10); fill(255, 255, 0, 225); rect(0.5*(mouseX-213), (0.60*(mouseY+40.6666)-(3*frameCount)%13), 10, 10); fill(255, 255, 0, 225); rect(0.5*(mouseX-219), (0.60*(mouseY+40.6666)-(3*frameCount)%25), 10, 10); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX-220), (0.60*(mouseY+40.6666)-(3*frameCount)%50), 10, 10); fill(0, 0, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX-222), (0.60*(mouseY+40.6666)-(3*frameCount)%80), 10, 10); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX-210), (0.60*(mouseY+40.6666)-(3*frameCount)%80), 8, 8); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.5*(mouseX-235), (0.60*(mouseY+40.6666)-(3*frameCount)%60), 8, 8); //fire on candles (left2) noStroke(); fill(255, 255, 0, 225); rect(0.75*(mouseX-170.5), (0.80*(mouseY-18.75)-(3*frameCount)%13), 10, 10); fill(255, 255, 0, 225); rect(0.75*(mouseX-167.5), (0.80*(mouseY-18.75)-(3*frameCount)%25), 10, 10); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.75*(mouseX-173.5), (0.80*(mouseY-18.75)-(3*frameCount)%50), 10, 10); fill(0, 0, 0, abs(100-(3*frameCount)%100)); rect(0.75*(mouseX-180.5), (0.80*(mouseY-18.75)-(3*frameCount)%80), 10, 10); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(0.75*(mouseX-177.5), (0.80*(mouseY-18.75)-(3*frameCount)%75), 10, 10); //fire on candles (left3) noStroke(); fill(255, 255, 0, 225); rect(1*(mouseX-161), (1*(mouseY-55)-(3*frameCount)%34), 8, 8); fill(255, 255, 0, 225); rect(1*(mouseX-161), (1*(mouseY-55)-(3*frameCount)%23), 8, 8); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(1*(mouseX-167), (1*(mouseY-55)-(3*frameCount)%60), 8, 8); fill(0, 0, 0, abs(100-(3*frameCount)%100)); rect(1*(mouseX-163), (1*(mouseY-55)-(3*frameCount)%73), 8, 8); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(1*(mouseX-167), (1*(mouseY-55)-(3*frameCount)%80), 8, 8); fill(255, 0, 0, abs(100-(3*frameCount)%100)); rect(1*(mouseX-170), (1*(mouseY-55)-(3*frameCount)%60), 8, 8); //gatekeeper noStroke(); rectMode(CENTER); //target fill(255,0,0,200); triangle((mouseX-2)-(35*sin(frameCount*0.05f)),mouseY-100,(mouseX+2)+(35*sin(frameCount*0.05f)),mouseY-100,mouseX,mouseY-40); //gatekeeper_helmet ellipseMode(CENTER); fill(204, 204, 204); quad(0.95f*(mouseX)-5+(2*sin(frameCount*0.2f)), mouseY-15+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+25.25f+(2*sin(frameCount*0.2f)), mouseY-15+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+27.1f+(2*sin(frameCount*0.2f)), mouseY+15+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)-7.1f+(2*sin(frameCount*0.2f)), mouseY+15+(2*cos(frameCount*0.2f))); fill(237, 237, 237); ellipse(0.95f*(mouseX)+10+(2*sin(frameCount*0.2f)), mouseY-15+(2*cos(frameCount*0.2f)), 30, 5); fill(0, 0, 0); rect(0.95f*(mouseX+(2*sin(frameCount*0.2f)))+10, mouseY-6+(2*cos(frameCount*0.2f)), 18, 4); rect(0.95f*(mouseX+(2*sin(frameCount*0.2f)))+10, mouseY+4+(2*cos(frameCount*0.2f)), 4, 18); fill(204, 204, 204); ellipse(0.95f*(mouseX+(2*sin(frameCount*0.2f)))+10, mouseY+15+(2*cos(frameCount*0.2f)), 30, 5); //gatekeeper arms&legs stroke(190, 190, 190); fill(190, 190, 190); quad((0.95f*(mouseX)-23.25f)+(2*sin(frameCount*0.2f)), mouseY+20+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)-23.25f+(2*sin(frameCount*0.2f)), mouseY+110+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)-29.9f+(2*sin(frameCount*0.2f)), mouseY+100+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)-29.9f+(2*sin(frameCount*0.2f)), mouseY+30+(2*cos(frameCount*0.2f)));//left arm quad((0.95f*(mouseX)+43.25f)+(2*sin(frameCount*0.2f)), mouseY+20+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+49.9f+(2*sin(frameCount*0.2f)), mouseY+30+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+49.9f+(2*sin(frameCount*0.2f)), mouseY+100+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+43.25f+(2*sin(frameCount*0.2f)), mouseY+110+(2*cos(frameCount*0.2f)));//right arm quad(0.95f*(mouseX)+43.25f+(2*sin(frameCount*0.2f)), mouseY+20+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+43.25f+(2*sin(frameCount*0.2f)), mouseY+110+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)-23.25f+(2*sin(frameCount*0.2f)), mouseY+20+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)-23.25f+(2*sin(frameCount*0.2f)), mouseY+110+(2*cos(frameCount*0.2f))); rect(0.95f*(mouseX)-7.1f+(2*sin(frameCount*0.2f)), mouseY+170+(2*cos(frameCount*0.2f)), 18, 100);//legs rect(0.95f*(mouseX)+27.1f+(2*sin(frameCount*0.2f)), mouseY+170+(2*cos(frameCount*0.2f)), 18, 100); //gatekeeper body noStroke(); fill(230, 230, 230); quad(0.95f*(mouseX)-23.25f+(2*sin(frameCount*0.2f)), mouseY+20+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+43.25f+(2*sin(frameCount*0.2f)), mouseY+20+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+39.5f+(2*sin(frameCount*0.2f)), mouseY+80+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)-18.5f+(2*sin(frameCount*0.2f)), mouseY+80+(2*cos(frameCount*0.2f))); quad(0.95f*(mouseX)-23.25f+(2*sin(frameCount*0.2f)), mouseY+20+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)-7.1f+(2*sin(frameCount*0.2f)), mouseY+15+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+27.1f+(2*sin(frameCount*0.2f)), mouseY+15+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+43.25f+(2*sin(frameCount*0.2f)), mouseY+20+(2*cos(frameCount*0.2f))); fill(230, 230, 230); quad(0.95f*(mouseX)-18.5f+(2*sin(frameCount*0.2f)), mouseY+84+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+39.5f+(2*sin(frameCount*0.2f)), mouseY+84+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)+43.25f+(2*sin(frameCount*0.2f)), mouseY+170+(2*cos(frameCount*0.2f)), 0.95f*(mouseX)-23.25f+(2*sin(frameCount*0.2f)), mouseY+170+(2*cos(frameCount*0.2f))); fill(200, 0, 0); rect(0.95f*(mouseX+11.5f)+(2*sin(frameCount*0.2f)), mouseY+82+(2*cos(frameCount*0.2f)), 54, 4); rect(0.95f*(mouseX)+32.82f+(2*sin(frameCount*0.2f)), mouseY+96+(2*cos(frameCount*0.2f)), 4, 28); //SWORD noStroke(); fill(255); triangle(280+(10*sin(frameCount*0.02)), 280+(25*cos(frameCount*0.09)), 355+(10*sin(frameCount*0.02)), 305+(25*cos(frameCount*0.09)), 305+(10*sin(frameCount*0.02)), 355+(25*cos(frameCount*0.09))); stroke(200, 200, 200); fill(200, 200, 200); triangle(280+(10*sin(frameCount*0.02)), 280+(25*cos(frameCount*0.09)), 305+(10*sin(frameCount*0.02)), 355+(25*cos(frameCount*0.09)), 310+(10*sin(frameCount*0.02)), 320+(25*cos(frameCount*0.09))); noStroke(); fill(255); quad(305+(10*sin(frameCount*0.02)), 355+(25*cos(frameCount*0.09)), 355+(10*sin(frameCount*0.02)), 305+(25*cos(frameCount*0.09)), 450+(10*sin(frameCount*0.02)), 400+(25*cos(frameCount*0.09)), 350+(10*sin(frameCount*0.02)), 400+(25*cos(frameCount*0.09))); stroke(200, 200, 200); fill(200, 200, 200); quad(305+(10*sin(frameCount*0.02)), 355+(25*cos(frameCount*0.09)), 310+(10*sin(frameCount*0.02)), 320+(25*cos(frameCount*0.09)), 380+(10*sin(frameCount*0.02)), 400+(25*cos(frameCount*0.09)), 350+(10*sin(frameCount*0.02)), 400+(25*cos(frameCount*0.09))); //helmet_top noStroke(); fill(214, 214, 214); triangle(-30, 0, 430, 0, 200, 100); fill(0); triangle(-10, 0, 410, 0, 200, 80); fill(242, 242, 242); triangle(200, 0, 430, 0, 200, 100); fill(67, 67, 67); triangle(200, 0, 410, 0, 200, 80); fill(54, 54, 54); triangle(-10, 0, 200, 0, 200, 80); //helmet_left noStroke(); fill(212, 212, 212); triangle(-60, 220, 65, 270, 65, 600); fill(89, 89, 89); triangle(-100, 220, 65, 280, 65, 600); fill(67, 67, 67); triangle(-180, 220, 45, 300, 45, 600); //helmet_right fill(242, 242, 242); triangle(460, 220, 335, 270, 335, 600); fill(79, 79, 79); triangle(500, 220, 335, 280, 335, 600); fill(53, 53, 53); triangle(580, 220, 355, 300, 355, 600); } void mousePressed() { frameRate(5); //gatekeeper weapon ellipseMode(CENTER); fill(160, 128, 68); ellipse(0.95f*(mouseX)-13.1f, mouseY+60, 100, 100); fill(232, 232, 232); ellipse(0.95f*(mouseX)-13.1f, mouseY+60, 90, 90); fill(160, 27, 30); rect(0.95f*(mouseX)-13.1f, mouseY+60, 7, 50); rect(0.95f*(mouseX)-13.1f, mouseY+60, 50, 7); //aimpoint fill(230, 230, 230, 150); quad(200, 200-25, 200+4, 200-8, 200, 200-5, 200-4, 200-8); quad(200, 200+25, 200+4, 200+8, 200, 200+5, 200-4, 200+8); quad(200-25, 200, 200-8, 200+4, 200-5, 200, 200-8, 200-4); quad(200+25, 200, 200+8, 200+4, 200+5, 200, 200+8, 200-4); //attack fill(255, 255, 255); triangle(202, 208, 203, 222, 222, 209); quad(222, 209, 203, 222, 350, 400, 500, 400); fill(230, 230, 230); quad(200, 350, 350, 200, 370, 220, 220, 370); fill(100, 100, 100); quad(210, 360, 360, 210, 370, 220, 220, 370); fill(217, 217, 217); quad(285, 285, 355, 245, 400, 400, 265, 375); quad(265,375,355,245,700,285,285,700); //helmet_right fill(242, 242, 242); triangle(460, 220, 335, 270, 335, 600); fill(79, 79, 79); triangle(500, 220, 335, 280, 335, 600); fill(53, 53, 53); triangle(580, 220, 355, 300, 355, 600); fill(160, 27, 30, 255); rect(mouseX+8, (0.60f*(mouseY+250.6666f)-(1*frameCount)%100), 15, 3); rect(mouseX+18, (0.60f*(mouseY+250.6666f)-(1*frameCount)%100), 3, 15); println("I CAN DO THIS ALL DAY"); } void keyPressed() { println("YOU SHALL NOT PASS"); frameRate(5); noStroke(); rectMode(CENTER); fill(255,255,255); rect(200, 200,300,200); fill(0,0,0); rect(200, 200,296,196); fill(255,255,255); rect(200+30,200,300,200); fill(0,0,0); rect(200+30, 200,296,196); rectMode(CORNER); fill(255,255,255); rect(200-150,200-100,30,30); fill(0,0,0); rect(200-148,200-98,50,26); fill(255,255,255); rect(200-140,200-88,15,7); rect(200-140,200-58,15,7); rect(200-140,200-28,15,7); rect(200-140,200+2,15,7); rect(200-140,200+32,15,7); rect(200-140,200+62,15,7); stroke(255); line(200-30,200-40,200-20,200-40); line(200-30,200-30,200-20,200-30); line(200-30,200-20,200-20,200-20); line(200-30,200-40,200-30,200-20); line(200-15,200-40,200-5,200-20); line(200-5,200-40,200-15,200-20); line(200,200-40,200,200-20); line(200+5,200-40,200+15,200-40); line(200+10,200-40,200+10,200-20); line(200-40, 200+20, 200-40,200+40); line(200-25, 200+20, 200-25,200+40); line(200-25, 200+40, 200-40,200+20); line(200-15, 200+20,200-15, 200+40); line(200-5, 200+20,200-5, 200+40); line(200-15, 200+20,200-5, 200+20); line(200-15, 200+40,200-5, 200+40); line(200-40, 200+44,200-5, 200+44); line(200+10+40, 200+20, 200+10+40,200+40); line(200+25+40, 200+20, 200+25+40,200+40); line(200+25+40, 200+40, 200+10+40,200+20); line(200+35+40, 200+20,200+35+40, 200+40); line(200+45+40, 200+20,200+45+40, 200+40); line(200+35+40, 200+20,200+45+40, 200+20); line(200+35+40, 200+40,200+45+40, 200+40); line(200+10+40, 200+44,200+45+40, 200+44); }