• fullscreen
  • AllText.pde
  • Project_1_malfunction.pde
  • String p0= "Type (S) to (S)tart.";
    String p1 = "As had been foretold, you are the savior.";
    String p2="Procedeth to the Epicenter of DESTRUCTION.";
    String p3= "Go (W)est     (L)aser";
    String p4= "Corginian is dead. The world burned down.";
    String p5="There is a large stone in your path";
    String p6="(T)eleport, (L)asers, (O)ther";
    String p7="You deftly destroy the stone, but are";
    String p8="crushed by debris in the process.";
    String p9="You attempt to teleport past the stone,";
    String p10="but instead undergo quantum flux";
    String p11="with the stone. You are now StoneBot.";
    String p12="You cannot move. (R)estart?";
    String p13="You deftly walk past the stone.";
    String p14="A mysterious force compels you to enter.";
    String p15="You enter the cave.";
    String p16="(C)ont.";
    String p17="As you spelunk further, your advanced AI ";
    String p18="emulates WORRY. Who is this enigmatic corgi? ";
    String p19="What happened to all the humans? Is there";
    String p20="destiny? You feel deeply ILL AT EASE.";
    String p21="(P)onder     (I)gnore";
    String p22="No time to ponder your place in the world!";
    String p23="Here comes THREE FEROCIOUS BEASTS!!";
    String p24="(L)asers      (B)efriend";
    String p25="Good thing you ignored your feelings!!";
    String p26="Else THREE FEROCIOUS BESASTS would MAIM";
    String p27="and KILL your DECREPIT body in an instant.";
    String p28="(L)asers      (B)efriend";
    String p29="Your lasers MAIM and KILL FEROCIOUS BEASTS";
    String p30="dealing a critical blow.";
    String p31="It seems they guarded a mysterious door.";
    String p32="(O)pen door   (M)ake toast";
    String p33="Your WEAK and DECREPIT body also houses";
    String p34="a thermonuclear core. Everything within";
    String p35="200 miles is evaporated. Oops!";
    String p36="It appears the door is locked.";
    String p37="There is a bread-shaped depression";
    String p38="in the face of the door.";
    String p39="(L)asers    (M)ake toast";
    String p40="As your replicator comes back online for";
    String p41="the first time in over a thousand years,";
    String p42="you feel what your AI can only describe";
    String p43="as an EPIPHANY. You are making toast.";
    String p44="This was your purpose as your CREATOR";
    String p45="intended. This is why you are.";
    String p46="The door opens";
    String p47="You have done well to make it this far";
    String p48="ancient one. I see that you have mastered";
    String p49="yourself. PROPHECY gathers.";
    String p50="But I fear that something evil still";
    String p51="lurks in your being... Something";
    String p52="that caused the great CATACLYSM.";
    String p53="Rest now while I tell ye the of the";
    String p54="great RECKONING which befell humanity";
    String p55="So many centuries ago...";
    String p56="As the smoke clears from your deftly";
    String p57="shot laser beam, a form emerges from";
    String p58="the smoke. You feel a certain GESTALT.";
    String p59= "(B)efriend   (L)aser  (M)ake toast";
    String p60="He's not very friendly.";
    String p61= "(L)aser  (M)ake toast";
    String p62= "Your lasers have no effect!";
    String p63= "I don't think he actually feels them.";
    String p64= "Regardless you press on the assault,";
    String p65="leaving your batteries drained.";
    String p66= "GAME OVER          (R)eplay?";
    String p67="Taken by the kind gesture, the";
    String p68="demon has a change of heart.";
    String p69="Sensing this, Satan summons him";
    String p70="back to HELL and you are the winner!";
    String p71="***PLEASE INSERT TTOTPA DISKETTE 2***";
    String p72="DISK READ FATAL ERROR 402, EXIT PROGRAM (`)";
    String p998= "(`) to ESCAPE at anytime";
    String p999 = "Being a shark is FUCKING AWESOME.";
    String p1000 = "This is the best ending and you are a winner.";
    
    
    float a = 0.0;
    float a2 = 0.0;
    float angleInc = PI/1.5;
    float angleInc2 = PI/30.0;
    float scalar = 1.05;
    float scalar2 = 25.0;
    float lpos, rpos, dPosX, dPosY, x, y ,x1, y1;
    PImage title, bg1, bg2, bg3, cave, dog, dog1, hipA, hipB, door, fsl, lLeg, rLeg;
    PImage hell, lStone, shrk, t, tb, brn, beast, int1, int2, int3, int4, int5;
    PImage nuke;
    float s, s2;
    //t=toast, tb =toastbot, brn = world on fire
    PShape dvl, dvl2, dvl3;
    int page=0;
    PFont font;
    int txtX;
    float las1, las2;
    
    
    
    void setup() {
      size(640, 480);
      font = loadFont("Commodore64-18.vlw");
      x = (100);
      y = (100);
      x1 = 0;
      y1 = 0;
      txtX = 50;
      //svg var
      dvl = loadShape("dvl.svg");
      dvl2 = loadShape("dvl2.svg");
      dvl3 = loadShape("dvl3.svg");
      //img var
      hell = loadImage ("hell.jpg");
      title = loadImage ("title.gif");
      bg1 = loadImage("bg1.gif");
      bg2 = loadImage("bg2.gif");
      bg3 = loadImage("bg3.gif");
      cave = loadImage("cave.gif");
      dog = loadImage("dog.gif");
      dog1=loadImage("dog1.gif");
      door = loadImage("door.gif");
      beast = loadImage("beast.gif");
      lLeg = loadImage("lleg.gif");
      rLeg = loadImage("rleg.gif");
      brn = loadImage("brn.gif");
      fsl = loadImage("fsl.gif");
      hipA=loadImage("hipA.gif");
      hipB=loadImage("hipB.gif");
      lStone = loadImage("lStone.gif");
      shrk = loadImage("shark.gif");
      t = loadImage ("t.gif");
      tb = loadImage("tb.gif");
      int1 = loadImage("int1.gif");
      int2 =loadImage("int2.gif");
      int3 =loadImage("int3.gif");
      int4 =loadImage("int4.gif");
      int5 =loadImage("int5.gif");
      nuke = loadImage("nuke.gif");
      frameRate (35);
      textFont (font);
    }
    
    void draw() {
      println(page);
      background(0);
      float m = millis();
      //vibration
      a = a+angleInc;
      a2= a2+angleInc2;
      s=sin(a)*scalar;
      s2=sin(a2)*scalar2;
      //leg movement
      lpos = y+80;
      rpos = y+90;
      if (m % 4< 2){
        lpos = y+100;
      }
      else{
        rpos = y+110;
      }
    
    
      //p0
      if (page==0){
        image (title, 0, 0, 640, 480);
        text (p0, 340, 400);
        text (p998, 305, 470);
    
      }
      else if (page == 1){
        image(bg1, 0, 0, 640, 480);
        //dog
        image (dog, 480, s2+115, 400, 400);
        drawToast();
        border();
        text(p1, txtX, 400);
        text(p2, txtX, 415);
        text (p3, txtX, 470);
        //p3
      }
      else if (page==3){
        image (brn, s*4, 0, width, height);
        border();
        text(p4, txtX, 400);
        restart();
        //p2
      }
      else if (page ==2){
        image (bg2, 0, 0, 640, 480);
        drawToast();
        image (lStone, 250, 0, 500, 500);
        border();
        text (p5, txtX, 400);
        text (p6, txtX, 470);
        //p4
      }
      else if (page == 4){
        image (brn, s*4, 0, 640, 480);
        border();
        text(p7, txtX, 400);
        text (p8, txtX, 415);
        restart();
      }
      else if (page==5){
        image(fsl, 0, 0, 640, 480);
        border();
        text(p9, txtX, 400);
        text (p10, txtX, 415);
        text (p11, txtX, 430);
        text ( p12, txtX, 470);
      }
      else if (page==6){
        image (cave, 0, 0, width, height);
        drawToast();
        border();
        text (p13, txtX, 400);
        text(p14, txtX, 415);
        text (p15, txtX, 430);
        text(p16, txtX, 470);
      }
      else if (page==7){
        background(255);
        fill (0);
        text (p17, 0, 20);
        text (p18, 0, 45);
        text (p19, 0, 70);
        text (p20, 0, 95);
        text (p21, 0, 470);
      }
      else if (page==8){
        fill(255);
        image(int2, 0, 0, width, height);
        image (beast, width/4, 100, 400, 400);
        border();
        text (p22, txtX, 400);
        text (p23, txtX, 415);
        text (p24, txtX, 470);
      }
      else if (page==9){
        fill (255);
        image(int2, 0, 0, width, height);
        image (beast, width/4, 100, 400, 400);
        border();
        text (p25, txtX, 400);
        text (p26, txtX, 415);
        text (p27,txtX,430);
        text (p28, txtX, 470);
      }
      else if (page==10){
        image (door, 0, -500, width, 1000);
        drawToast();
        border();
        text (p29,txtX,400);
        text (p30,txtX, 415);
        text (p31, txtX, 430);
        text (p32, txtX, 470);
      }
      else if (page==11){
        image (nuke, s*1.7, s, width, height);
        border();
        text (p33,txtX,400);
        text (p34,txtX,415);
        text(p35,txtX,430);
        restart();
      }
      else if (page == 12){
        image (door, 0, -500, width, 10000);
        drawToast();
        border();
        text (p36, txtX, 400);
        text (p37, txtX, 415);
        text (p38, txtX, 430);
        text (p39, txtX, 470);
    
      }
      else if (page==13){
        background (255);
        fill(0);
        text(p40, 0, 20);
        text (p41, 0, 45);
        text (p42, 0, 70);
        text (p43, 0, 95);
        text (p44, 0, 120);
        text (p45, 0, 145);
        text (p46, 0, 185);
        text (p16, 0, 470);
      }
      else if (page==14){
        image (int3, 0,0, width, height);
        image (dog, 480, s2+115, 400, 400);
        drawToast2();
        border();
        fill(255);
        text (p47, txtX, 400);
        text (p48, txtX, 415);
        text (p49, txtX, 430);
        text (p16, txtX, 470);
      }
      else if (page==15){
        image (int3, 0,0, width, height);
        image (dog, 480, s2+115, 400, 400);
        drawToast2();
        border();
        fill(255);
        text (p50, txtX, 400);
        text (p51, txtX, 415);
        text (p52, txtX, 430);
        text (p16, txtX, 470);
      }
      else if (page==16){
        image (int3, 0,0, width, height);
        image (dog, 480, s2+115, 400, 400);
        drawToast2();
        border();
        fill(255);
        text (p53, txtX, 400);
        text (p54, txtX, 415);
        text (p55, txtX, 430);
        text (p16, txtX, 470);
      }
      else if (page==18){
        image(int5, 0, 0, 640, 480);
        shape (dvl2, s2*20, s2+50, 200, 200);
        border();
        text (p56, txtX, 400);
        text (p57, txtX, 415);
        text (p58, txtX, 430);
        text (p59, txtX, 470);
      }
      else if (page == 999){
        image (shrk, s*1.5, 0, 640, 480);
        fill (255);
        text (p999, 100, 400);
        text (p1000, 0, 420);
        restart();
      }
      else if (page==19){
        image(int5, 0, 0, 640, 480);
        shape (dvl, width/2, s2+150, 300, 300);
        border();
        text (p60, txtX, 400);
        text (p61, txtX, 470);
      }
      else if (page==20){
        int alph;
        if (m%4 <2){
          alph = 0;
        }
        else {
          alph=155;
        }
        image (int4, 0, 0, width, height);
        drawToast();
        strokeWeight (5);
        stroke (255, 0, 0, alph);
        line (x+100, y+100, 560, s2+50);
        shape (dvl2, 480, s2, 200, 200);
        border();
        text (p62, txtX, 400);
        text (p63, txtX, 415);
        text (p64, txtX, 430);
        text (p65, txtX, 445);
        text (p66, txtX, 470);
      }
      else if (page==21){
        image (hell, 0, 0, 640, 480);
        shape (dvl3, s+175, s+175, 300, 300);
        border();
        text (p67, txtX, 400);
        text (p68, txtX, 415);
        text (p69, txtX, 430);
        text (p70, txtX, 445);
        restart();
      }
      else if (page==17){
        image (int3, 0,0, width, height);
        image (dog, 480, s2+115, 400, 400);
        drawToast2();
        border();
        text (p16, txtX, 470);
        if (m%4 <2){
          fill (0, 0, 255);
        }
        else {
          fill (255);
        }
        text (p71, txtX, 400);
      }
      else if (page==22){
        fill (0, 0, 255);
        rect (0, 0, width, height);
        fill (255);
    
        if (m%4 <2){
          fill (0, 0, 255);
        }
        else {
          fill (255);
        }
        text (p72, 15, 260);
      }
    }
    
    
    
    
    
    void keyPressed() {
      if (key=='`' || key=='~'){
        page=999;
      }
      else if ((key =='S'||key=='s') && (page==0)){
        page = 1;
      }
      else if ((key =='L' || key =='l') && (page == 1)){
        page = 3;
      }
      else if ((key=='r'||key=='R') && (page == 3 || page==4 ||page==21|| page==5 || page==11 || page==999 || page==20)){
        page = 1;
      }
      else if ((key=='w'||key=='W') && (page == 1)){
        page =2;
      }
      else if ((key=='l'||key == 'L') && (page==2)){
        page = 4;
      }
      else if ((key=='t'||key=='T') && (page==2)){
        page=5;
      }
      else if ((key=='o'||key=='O') && (page == 2)){
        page=6;
      }
      else if ((key=='c'||key=='C') && (page == 6)){
        page=7;
      }
      else if ((key=='p'||key=='P') && (page==7)){
        page = 8;
      }
      else if ((key=='i'||key=='I') && (page==7)){
        page=9;
      }
      else if ((key=='l'||key == 'L') && (page==8||page==9)){
        page=10;
      }
      else if ((key=='b'||key=='B') && (page==8||page==9)){
        page=11;
      }
      else if ((key=='o'||key=='O') && (page==10)){
        page = 12;
      }
      else if ((key=='m'||key=='M') && (page==10 || page==12)){
        page=13;
      }
      else if((key=='c'||key=='C') && (page == 13)){
        page=14;
      }
      else if((key=='c'||key=='C') && (page == 14)){
        page=15;
      }
      else if((key=='c'||key=='C') && (page == 15)){
        page=16;
      }
      else if((key=='c'||key=='C') && (page == 16)){
        page=17;
      }
      else if ((key=='l'||key=='L') && (page==12)){
        page = 18;
      }
      else if ((key =='b' || key =='B') && (page==18)){
        page = 19;
      }
      else if ((key=='l'||key=='L') && (page==19||page==18)){
        page = 20;
      }
      else if ((key =='m'||key=='M') && (page==18||page==19)){
        page=21;
      }
      else if ((key=='c'||key=='C') && (page==17)){
        page=22;
      }
    }
    
    
    void drawToast(){
      pushMatrix();
      scale(1.5);
      image (lLeg, x-35, lpos-60);
      image (rLeg, x+5, rpos-60);
      popMatrix();
      image (tb, x+s, y, 100, 150);
    }
    void drawToast2(){
      image (t, x+s+20, y+25, 75, 75);
      pushMatrix();
      scale(1.5);
      image (lLeg, x-35, lpos-60);
      image (rLeg, x+5, rpos-60);
      popMatrix();
      image (tb, x+s, y, 100, 150);
    }
    
    void restart(){
      text("(R)estart?", txtX, 470);
    }
    
    void border(){
      stroke (0, 0, 255);
      strokeWeight(100);
      line (0,0,width,0);
      line (width, 0, width, height);
      line (0,0, 0, height);
      strokeWeight(200);
      line (0, height, width, height);
    }
    
    
    
    

    code

    tweaks (0)

    license

    advertisement

    Trenton Szewczyk

    True Tales of the Post-Apocalypse

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.

    Take part in a grand adventure with all of your favorite characters, like Toast Bot, Link, Mario and MORE!

    Follow the textual cues to (A)dvance the story.

    You need to login/register to comment.