INTERNET ART: networks, performative programming, and web as context

A-Y, Plan Z !

Leave a comment

 

PImage photo;
PImage photo2;
PImage photo3;
PImage photo4;
PImage photo5;
PImage photo6;
PImage photo7;
PImage photo8;
PFont title;
int firstsizex, firstsizey, stage, stage2;
PFont myFont;
PFont myFont2;
float speedArrows = 30;
float x= 800;
float l;
float h;
float y= 100;
float x2= 800;
float y2= 100;
float speed = 2;
float speed2 = 4;
float leftright;
float updown;
int Switch= 0;
boolean stage1 = false;
int a = keyCode;
int w = keyCode;
int s = keyCode;
int d = keyCode;

void setup(){
stage = 1;
size(800,800);
//openingbackground
photo = loadImage(“Sandy.jpg”);
image(photo, 0 , 0 , 800, 800);
//character
photo2 = loadImage(“Plankton.png”);
updown=700;
leftright=680;
//startingpoint
photo3 = loadImage(“Krusty_Krab.jpg”);
//defender
photo4 = loadImage(“Krabs.png”);
//endingpoint
photo5 = loadImage(“The_Chum_Bucket.jpg”);
//defender2
photo6 = loadImage(“Spongebob.png”);
//defender3
photo7 = loadImage(“Squidward.png”);
myFont = createFont(“krazynights.ttf”, 60);
myFont2 = createFont(“AdobeFanHeitiStd-48”, 60);
}

void draw(){
move();
display();
if(stage==1){
fill(0);
noStroke();
ellipse(50,300,30,30);
ellipse(100,150,25,25);
ellipse(200,100,20,20);
ellipse(300,100,15,15);
ellipse(400,100,10,10);
ellipse(500,80,5,5);
ellipse(800,800,400,400);
stroke(#BF0404);
line(600,30,680,100);
stroke(#BF0404);
line(700,30,600,110);
textFont(myFont);
textAlign(CENTER);
textSize(60);
text(“Plan Z”, width/2, 300);
fill(#BF0404);
text(” Z”, width/2, 300);
textSize(22);
fill(#FFFFFF);
text(“Press the spacebar to begin”, 405, 440);
textFont(myFont2);
textSize(16);
fill(0);
textAlign(CENTER, CENTER);
text(“Plankton has stolen the Krabby Pattie secret formula.”,410,500);
text(“Will he make it back to the chum bucket, so he can”,410,515);
text(“continue on with his plan? Thats up to you!”,410,530);
text(“Help Plankton get to the Chum Bucket using a(left), s(down), d(right), w(up)”,410,570);
text(“without falling off the cliff and getting caught by the other characters.”,410,585);
text(“You have 3 lives, use them wisely!”,410,600);
fill(#FFFFFF);
textSize(24);
text(“Start Here”,700,750);
fill(#BF0404);
textSize(18);
text(“How to play:”,400,475);
if(keyPressed == true){
stage = 2;
}
}
if(stage==2){
background(0);
fill(#FFFFFF);
noStroke();
rect(500, 680, 300, 150);
rect(700, 590, 50, 100);
rect(600, 590, 150, 50);
rect(550, 540, 50, 100);
rect(550, 500, 150, 50);
rect(700, 450, 50, 100);
rect(250, 400, 500, 50);
rect(200, 300, 50, 150);
rect(200, 250, 250, 50);
rect(400, 100, 50, 150);
rect(250, 0, 300, 100);
fill(#BF0404);
//TL
ellipse(0, 0, 140, 140);
//BL
ellipse(0, 800, 140, 140);
//TR
ellipse(800, 0, 140, 140);
//spongebob
image(photo6, x, 250, 45, 45);
//krabs
image(photo4, x, 450, 45, 45);
//squidward
image(photo7, x, 595, 45, 45);
//krustykrab
image(photo3, 525, 680, 250, 150);
//chumbucket
image(photo5, 275, 0, 250, 100);
//plankton
image(photo2, leftright, updown, 45, 45);
}
if(keyPressed==true){
if(key==’a’){
leftright=leftright-5;
}
if(key==’d’){
leftright=leftright+5;
}
if(key==’w’){
updown=updown-5;
}
if(key==’s’){
updown=updown+5;
}
}
}
void move(){
if( x > width || x < 0) {
Switch= 1;
}
if( x == x/2) {
Switch= 0;
}
if( Switch==00){
x++;
}
else{
x–;
}
if( x > width || x < 0) {
Switch= 3;
}
if( x == x/2) {
Switch= 0;
}
if( Switch==00){
x++;
}
else{
x–;
}
}

void display(){
//defender1
photo4 = loadImage(“Krabs.png”);
//defender2
photo6 = loadImage(“Spongebob.png”);
//defender3
photo7 = loadImage(“Squidward.png”);
}

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s