#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Processing 3.3.6 - Need help displaying the message 'GAME OVER" at the end of my obstacles

Member Posts: 2

void setup () {
size(700,500);
frameRate (40);
//background(200,100,200);
}
boolean key1=true;
boolean going=true;
int k = 0;
int l = 0;
int x = 0;
int y = 0;
void draw () {
background(200,100,200);
podRacer ();
obstacleOne ();
obstacleTwo ();
obstacleThree ();
Podcontrol ();
if(x==y || y==x)
l=l+0;
}
void Podcontrol () {
if(key1){
if(keyPressed)
if(key=='w' && y > 0){
y=y-5;
}
}
if(key1==true)
if(keyPressed)
if(key=='s' && y < 450){
y=y+5;
}
}
** void obstacleOne () { //top of window...makes rectangluar obstacles
l=l-1;
for(int b=300;b<2000;b+=600)
for(int a=0;a<2000;a+=600)
if( a <200 )
rect(b+l,a,20,200);
}
void obstacleTwo () { //Bottom of window...makes rectangular prisms
l=l-1;
for(int b=400;b<2000;b+=600)
for(int a=0;a<2000;a+=600)
if( a <600)
rect(b+l,a+400,20,200);
}
void obstacleThree () { //middle of window...makes rectangular prisms
l=l-1;
for(int b=0;b<2000;b+=600)
for(int a=0;a<2000;a+=600)
if( a <400)
rect(50+b+l,a+180,20,200);
}
void podRacer () {
fill(200,100,100);
strokeWeight(3);
line(x+50,y+10,x+100,y+10);
line(x+50,y+40,x+100,y+40);
rect(x+50,y+0,20,50);
rect(x+100,y+10,20,50);

}**