//kristel brinshot //my final project. wow. //RIDE THE KRIZTONIAN TRAVELER //wheni first approached this project it didnt seem too difficult a task to portray //to the rest of the world what my fantasy would be like...i fantasize about a lot of things //my head is hyperactive and its running everywhere. but now i realize what my fantasy //of all fantasies would be like...it would be an escape from the perception that what we //see in the world as dirgusting or taboo or spoiled, into a realm where the beauty aesthetic //is defined by abstractions that exist in in mind, like chance, as opposed to a definite //objective source that exists in the general reality of things. //this event is an excursion. your journey there is pretty rough andrugged. //type where you dream of going..it might not even be a place. //it could take you somewhere you'd never expect. //enjoy. int doneframe; int donetime; int begin; // Time the event/game begins int endTime; boolean active; // Flag for event/game status boolean done; // Flag for destination PSound soundA; PImage beginImage; // Start with this image PImage endImage; // End with this image PImage realendimage; // End with this image PImage room,roombw,art; //background changes PImage aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss,tt,uu,vv,ww,xx,yy,zz ; //alphabet PFont robot; String letters = ""; //alphabet code bitches! int a = 0; int b = 0; int c= 0; int d = 0; int e = 0; int f= 0; int g =0; int h = 0; int i =0; int j =0; int k = 0; int l = 0; int m= 0; int n= 0; int o= 0; int p= 0; int q= 0; int r= 0; int s= 0; int t= 0; int u= 0; int v= 0; int w= 0; int x= 0; int y= 0; int z= 0; //animation in background int numFrames = 13; int frame = 0; PImage[] images = new PImage[numFrames]; PImage subman; void setup() { size(600, 600,P3D); //smooth(); active = false; // Don't begin with action done = false; // The event/game has not finished soundA= loadSound ("roygbiv.wav"); soundA.loop(); beginImage = loadImage("welcomforeigner.jpg"); endImage = loadImage("end.jpg"); realendimage = loadImage("wagon41.jpg"); subman = loadImage("subwayman.png"); room = loadImage("room.png"); roombw = loadImage("roombw.png"); art = loadImage("artroom1.jpg"); aa = loadImage("d.png"); bb = loadImage("d.png"); cc = loadImage("c.png"); dd = loadImage("d.png"); ee = loadImage("e.png"); ff = loadImage("f.png"); gg = loadImage("g.png"); hh = loadImage("h.png"); ii =loadImage("i.png"); jj= loadImage("j.png"); kk = loadImage("k.png"); ll = loadImage("l.png"); mm = loadImage("m.png"); nn = loadImage("n.png"); oo = loadImage("o.png"); pp = loadImage("p.png"); qq = loadImage("q.png"); rr = loadImage("r.png"); ss = loadImage("s.png"); tt = loadImage("t.png"); uu = loadImage("u.png"); vv= loadImage("v.png"); ww = loadImage("w.png"); xx= loadImage("x.png"); yy= loadImage("y.png"); zz = loadImage("z.png"); robot = loadFont("robot.vlw"); textFont(robot,25); //animation randomSeed(0); images[0] = loadImage("1.jpg"); images[1] = loadImage("2.jpg"); images[2] = loadImage("3.jpg"); images[3] = loadImage("4.jpg"); images[4] = loadImage("5.jpg"); images[5] = loadImage("6.jpg"); images[6] = loadImage("7.jpg"); images[7] = loadImage("8.jpg"); images[8] = loadImage("9.jpg"); images[9] = loadImage("10.jpg"); images[10] = loadImage("11.jpg"); images[11] = loadImage("12.jpg"); images[12] = loadImage("13.jpg"); } void draw() { if(active == true) { eventGame(); // Run the event/game timer(); // Time the event/game } else { if(done == true) { endScreen(); // Show the "end" screen endTimer(); } else { beginScreen(); // Show the "first" screen } } } void eventGame() { frame = int(random(0, numFrames)); image(images[frame], 0, 0); delay(int(random(60, 200))); image(subman,0,0); float curPos = textWidth(letters); if(millis()%500 < 250){ // Only fill cursor half the time line(curPos, 0, curPos, 100); } fill(255); text(letters, 0, 250); //images that go crazy...oh man...intense if(a==-1){ image(aa,100,100); } if(b==-1){ image(bb,112,12); } if(c==-1){ image(cc,120,120); } if(d==-1){ fill(0); image(dd,170,170); } if(e==-1){ image(ee,100,100); } if(f==-1){ image(ff,100,100); } if(g==-1){ image(gg,160,160); } if(h==-1){ image(hh,120,130); } if(i==-1){ image(ii,450,200); } if(j==-1){ image(jj,300,30); } if(k==-1){ image(kk,250,450); } if(l==-1){ image(ll,300,30); } if(m==-1){ image(mm,300,30); } if(n==-1){ image(nn,300,300); } if(o==-1){ image(oo,300,300); } if(p==-1){ image(pp,300,300); } if(q==-1){ image(qq,300,300); } if(r==-1){ image(rr,300,300); } if(s==-1){ image(ss,300,400); } if(t==-1){ image(tt,300,200); } if(u==-1){ image(uu,100,100); } if(v==-1){ image(vv,300,30); } if(w==-1){ image(ww,300,30); } if(x==-1){ image(xx,300,200); } if(y==-1){ image(yy,300,150); } if(z==-1){ image(zz,400,10); } } void mousePressed() { // Begin the event/game when the mouse is clicked // and the event/game is not already happening if(active == false) { active = true; begin = millis(); } else { // Write your mouse events here... } } void mouseReleased() { // Write your mouse events here... } void mouseMoved() { // Write your mouse events here... } void keyPressed() { if(key== 'a') { a++; } if(key== 'b') { b++; } if(key== 'c') { c++; } if(key== 'd') { d++; } if(key== 'e'){ e++; } if(key== 'f'){ f++; } if(key== 'g'){ g++; } if(key== 'h'){ h++; } if(key== 'i'){ i++; } if(key== 'j'){ j++; } if(key== 'k'){ k++; } if(key== 'l'){ l++; } if(key== 'm'){ m++; } if(key== 'n'){ n++; } if(key== 'o'){ o++; } if(key== 'p'){ p++; } if(key== 'q'){ q++; } if(key== 'r'){ r++; } if(key== 's'){ s++; } if(key== 't'){ t++; } if(key== 'u'){ u++; } if(key== 'v'){ v++; } if(key== 'w'){ w++; } if(key== 'x'){ x++; } if(key== 'y'){ y++; } if(key== 'z'){ z++; } if(key == BACKSPACE) { // Backspace if(letters.length() > 0) { letters = letters.substring(0, letters.length()-1); } } else if(textWidth(letters+key) < width ){ letters = letters+key; } } void keyReleased() { } void timer() { int curTime = millis(); if(curTime > begin + 10000) { active = false; done = true; donetime= millis(); doneframe= frameCount; } noStroke(); fill(123,45,67); rect(0, height-5, width, 5); fill(0); rect(0, height-5, (curTime-begin)/16.667, 5); } void endTimer() { // println (millis()-donetime); } // Displays when the game/event begins void beginScreen() { image(beginImage, 0, 0); } // Displays when the 10 seconds are over // THIS IS WHERE THINGS GET CRAZY void endScreen() { if(frameCount-220)) { background(255); } if((letters.length() >50) && (letters.length()<60)) { background(200); image(roombw,0,0); } if((letters.length() >=30) &&(letters.length()<40)){ background(114,23,230); } if(letters.length() >=70) { image(art,0,0); } if(letters.length() ==60) { background(2,12,23); } if((letters.length() >=60)&&(letters.length()<70)) { image(roombw,0,0); } if(letters.length()>=3) { pushMatrix(); image(bb,450,12); popMatrix(); } if(letters.length()>=9) { pushMatrix(); image(ll,450,12); image(aa,random(80,300),random(100,450)); popMatrix(); } if(letters.length()<=20) { image(ee,random(90,300),random(0,300)); rotate(PI/3); image(ff,random(200,400),random(100,450)); image(aa,random(80,300),random(100,450)); } if(letters.length()<=10) { image(hh,random(200,300),random(0,300)); image(yy,-80,-160); } if(letters.length()<=10) { pushMatrix(); tint(random(0,255),random(0,255),random(0,255),random(70,255)); image(ss,random(200,300),random(0,300)); popMatrix(); } if(letters.length()>=25) { image(kk,random(200,300),random(0,300)); image(ss,random(200,300),random(0,300)); } if(letters.length()>=26) { image(qq,random(200,300),random(0,300)); } if(letters.length()>=14) { image(rr,random(300,400),random(300,600)); } if(letters.length()>=20) { image(uu,random(300,400),random(300,500)); } if(letters.length()>=40) { image(vv,random(30,400),random(300,500)); image(ww,random(0,300), random(0,500)); } if(letters.length()<=30) { pushMatrix(); scale(1.5); image(jj,random(0,100), random(0,100)); popMatrix(); } if(letters.length()>=31) { pushMatrix(); scale(.5); image(ww,random(0,300), random(0,500)); image(jj,random(0,100), random(0,100)); popMatrix(); } if(letters.length()<=50) { pushMatrix(); scale(1.5); image(ii,0,0); popMatrix(); } if(letters.length()>=45) { pushMatrix(); scale(.5); image(xx,-110,-150); image(tt,-20,-20); popMatrix(); } if(letters.length()>=50) { pushMatrix(); scale(1.0); image(tt,-20,-20); image(uu,random(0,400),random(0,500)); image(cc,random(0,300), random(0,400)); popMatrix(); } if(letters.length()<30) { pushMatrix(); scale(.25); image(cc,random(0,300), random(0,400)); popMatrix(); } for(int i=1; i<= a; i++){ if(i%3==0){ pushMatrix(); scale(.5); translate(random(30,400), random(30,100)); image(dd,-302,-63); image(ff,-302,-63); popMatrix(); } else{ //some big and some small pushMatrix(); translate(random(30,600), random(100,600)); image(dd,-302,-63); image(ff,-302,-63); image(ii,0,0); popMatrix(); } if(letters.length()>3) { pushMatrix(); image(bb,450,12); tint(55,45); popMatrix(); } } for(int g=1; g<= m; g++){ if(g%2==0){ pushMatrix(); scale(.25); translate(random(10,200), random(0,100)); image(mm,-33,-40); image(nn,-50,-50); image(tt,-20,-20); popMatrix(); } else{ //some big and some small pushMatrix(); translate(random(0,40), random(0,40)); image(mm,-33,-40); image(nn,-50,-50); popMatrix(); } } for(int e=1; e<= o; e++){ if(e%2==0){ pushMatrix(); scale(.5); translate(random(5,100), random(5,100)); image(oo,-51,-51); image(pp,-50,-50); popMatrix(); } else{ //some big and some small pushMatrix(); translate(random(10,60), random(10,60)); image(oo,-51,-51); image(pp,-50,-50); popMatrix(); } for(int s=1; s<= y; s++){ if(s%2==0){ pushMatrix(); scale(.5); translate(random(0,10), random(0,10)); image(yy,-80,-160); image(zz,-70,-50); popMatrix(); } else{ //some big and some small pushMatrix(); translate(random(0,16), random(0,16)); image(yy,-80,-160); popMatrix(); } } if(letters.length()>=5) { rotate(PI/2); image(zz,random(200,300),random(0,300)); image(yy,-80,-160); } } } if(millis() > donetime+ 3000) { image(realendimage,0,0); } }