Guna melengkapi persyaratan tugas softskill kelas 3IA05 :
- Yesaya Purwocaroko
- Alfina Febri Damayanti
- Nur Apriyanti
Game yang dibuat adalah game dengan menggunakan editor Processing 2.0. Jika teman-teman belum memiliki software ini, bisa mendownload terlebih dahulu pada web resminya http://processing.org/
Step memainkan game :
- Buka Software Processing :
- Membuat Source code game :
int yAv, y; int lv; PFont f; PImage cenario; void setup() { size (800, 400); f = createFont ("ComicSansMS", 13); textFont (f); colorMode (HSB, 360, 100, 100); yAv = height/2; cenario = loadImage("cenario.png"); background(359,0,0); for(int i=0;i<1000;i++){ stroke (359,99,99); line(i, random(350, 400), i, height); stroke (180,80,95); line(i, random(380, 400), i, height); smooth(); } save ("cenario.png"); } void draw(){ noStroke(); background (244, 77, 94); image (cenario, -(frameCount*8 % width), 0); image (cenario, width - (frameCount*8 % width), 0); if(frameCount>0 && frameCount<500){ lv = 3; fill((int)random(color(190,90,90),color(350,90,90))); ellipse(width - (frameCount*14 % width), 0+frameCount%height,60,random(15,25)); ellipse(width - (frameCount*14 % width), height-frameCount%height, 60,random(15,25)); } if(frameCount>500 && frameCount<1000){ lv = 4; fill((int)random(color(190,90,90),color(350,90,90))); ellipse(width - (frameCount*15 % width), 0+frameCount%height,60,random(15,25)); ellipse(width - (frameCount*17 % width), height-frameCount%height, 60,random(15,25)); } if(frameCount>1000 && frameCount<1500){ lv = 5; fill((int)random(color(190,90,90),color(350,90,90))); ellipse(width - (frameCount*18 % width), 0+frameCount%height,60,random(15,25)); ellipse(width - (frameCount*21 % width), height-frameCount%height, 60,random(15,25)); } if(frameCount>1500 && frameCount<2000){ lv = 6; fill((int)random(color(190,90,90),color(350,90,90))); ellipse(width - (frameCount*20 % width), 0+frameCount%height,60,random(15,25)); ellipse(width - (frameCount*23 % width), height-frameCount%height, 60,random(15,25)); } if(frameCount>2000 && frameCount<2500){ lv = 7; fill((int)random(color(190,90,90),color(350,90,90))); ellipse(width - (frameCount*24 % width), 0+frameCount%height,60,random(15,25)); ellipse(width - (frameCount*26 % width), height-frameCount%height, 60,random(15,25)); } if(frameCount>2500 && frameCount<3000){ lv = 8; fill((int)random(color(190,90,90),color(350,90,90))); ellipse(width - (frameCount*25 % width), 0+frameCount%height,60,random(15,25)); ellipse(width - (frameCount*29 % width), height-frameCount%height, 60,random(15,25)); } if(frameCount>3000 && frameCount<3500){ lv = 8; fill((int)random(color(190,90,90),color(350,90,90))); ellipse(width - (frameCount*28 % width), 0+frameCount%height,60,random(15,35)); ellipse(width - (frameCount*31 % width), height-frameCount%height, 60,random(15,35)); } if(frameCount>3500 && frameCount<4000){ lv = 8; fill((int)random(color(190,90,90),color(350,90,90))); ellipse(width - (frameCount*30 % width), 0+frameCount%height,60,random(15,35)); ellipse(width - (frameCount*27 % width), height-frameCount%height, 60,random(15,35)); } if(frameCount>4000){ fill(255); stroke(255); textFont(createFont("ComicSansMS", 70)); text("Parabéns você venceu!", width/3,260); noLoop (); } fill(255); triangle(100, yAv-2, 100, yAv-15, 130, yAv-2); triangle(100, yAv+5, 100, yAv+20, 130, yAv+5); rect (100, yAv, 60,3); yAv = yAv + lv; fill(255); stroke(255); text ("Point:",0, 15); text (frameCount, 50,15); if(mousePressed) { yAv = yAv - lv*2; } for(int y=yAv-15;y<yAv+20;y++){ line(random(70,95),random(y/1.1, y/0.9),100,y); } if(get (160 ,yAv)!=color(359,0,0)){ fill(255); stroke(255); textFont(createFont("ComicSansMS", 70)); text(frameCount, width/3, 180); text("Daebakk!!!", width/3,260); noLoop (); } }
- Memasukan Source Code game dan menjalankannya :
- Output :
0 komentar:
Post a Comment