The Noisy Thief

 The Noisy Thief


 
Loose change thief render.jpg
 

“The Noisy Thief” is an experimental game project which attempts to use intervention in design. It changes the use of audio and visual qualities of the video game medium. In “ The Noisy Thief” sound is used as a controller rather than just a causality of gameplay.The game is projected onto a model apartment to enhance the gaming experience. 

The narrative of the game follows a thief which only steals loose change from homes and the goal is to take the money and get out before the time runs out.

IMG_2246.jpeg
 

The following code was written in association with Fabio Fidanza. You can experience the game using the source code on “Processing

import processing.sound.*; import processing.opengl.*; FFT fft; AudioIn in; int bands = 512; int qPoint1 = 120; int qPoint2 = 200; int qPoint3 = 250; boolean moneyVisible = true; //Adgust this to calibrate the centerpoint in relation to pitch. //This is the band that marks the midpoint between High and Low pitch. //Most energy is generaly in the low bands. float[] spectrum = new float[bands]; float lowCount = 0; //veriable to count the low frequencies float midlCount = 0; //veriable to count the mid frequencies float midhCount = 0; //veriable to count the mid frequencies float highCount = 0; //veriable to count the high frequencies int x; int y; int qx; int qy; //ellipse int radius = 25; //obstacles int OBX, OBY, OBW, OBH; float WX,WY,WW,WH; float MX,MY,MW,MH; //background color change float xRed = 62, xGreen = 20, xBlue = 173; float yRed = 207, yGreen = 1, yBlue = 106; float eRed = 127, eGreen = 0, eBlue = 0; boolean backwards=false; int timeLapse=200000; int timeTrack; //MONEY PImage img; void setup() { size(1400, 1000); background(255); loop(); y=height/2; x= width/2; qy=height/2; qx=width/2; ellipseMode(RADIUS); timeTrack=millis()+timeLapse; //time change for background //Obstacle Parameters OBX = qx+qx/3; // OBSTICLE x position OBY = qy-qy/2; // OBSTICLE y position OBW = qx/4; // OBSTICLE width OBH = qy/1; // OBSTICLE Height //Wall parameters WX = qx-qx/2.5; WY = qy-qy; WW = qx/8; WH = qy/1.2; MX = qx+qx/1.5; MY = qy; MW = 40; MH = 80; // Create an Input stream which is routed into the Amplitude analyzer fft = new FFT(this, bands); in = new AudioIn(this, 0); // start the Audio Input in.start(); // patch the AudioIn fft.input(in); img = loadImage("dollar.png"); img.resize(80,40); } void draw() { //background float per = (timeTrack-millis())/float(timeLapse); if (backwards==true){ per = 1-per;} background(lerpColor(color(xRed, xGreen, xBlue), color(yRed, yGreen, yBlue), per)); lowCount = 0; midlCount = 0; midhCount = 0; highCount = 0; // FFT ANALYZER fft.analyze(spectrum); for (int i = 0; i < bands; i++) { if (i < qPoint1) { lowCount=lowCount+ spectrum[i]; } if ((i > qPoint1) && (i < qPoint2)) { midlCount=midlCount + spectrum[i]; } if ((i > qPoint2) && (i < qPoint3)) { midhCount=midhCount + spectrum[i]; } if (i > qPoint3) { highCount=highCount+ spectrum[i]; } line( i, height, i, height - spectrum[i]*height*6 ); { strokeWeight(2) ; } } /* println(lowCount); println(midlCount); println(midlCount); println(highCount); println("----"); */ // MAIN ELLIPSE if (backwards==true){ per = 1-per;} fill(lerpColor(color(xRed, xGreen, xBlue), color(eRed, eGreen, eBlue), per)); ellipse(x, y, radius , radius); noStroke(); //MOVEMENT int cx, cy; cx = x; cy = y; if (lowCount > midlCount ) { x = x - 1; } if ((midlCount > midhCount) && (midlCount > lowCount)) { y = y + 1; } if ((midhCount > midlCount) && (midhCount > highCount)) { y = y - 1; } if (highCount > midhCount) { x = x + 1; } if(collided()) { x = cx; y = cy; } // parameters if (x > 25 ) { x --; } if (x < width-25 ) { x ++; } if (y > 25 ) { y --; } if (y < height-25 ) { y ++; } //OBSTICLE PARAMETERs fill(255, 255, 0); rect(OBX, OBY, OBW, OBH); fill(180, 180, 30); rect(WX, WY, WW, WH); //money /* boolean a ==true; for (a ==true){ } if((x > qx+qx/1.5-25) && (x < qx+qx/1.5+25) && (y > qy -25) && ( y < qy +25)) a == false */ //FINISH SEQ. boolean on=true; if (frameCount% 11== 0) { if (on) fill(0); else fill(255); on = !on; fill(70, 80, 120); ellipse(qx-qx/1.5, qy-qy*0.9, 50, 50); } if ((x>qx-qx/1.5-25) && (x<qx-qx/1.5+25) && (y>qy-qy*0.9-25)&& (y<qy-qy*0.9+25)) { textSize(32); fill(0, 102, 153, 204); text("you win!", width/2, height/2, width/2); } //TEST KEYS cx = x; cy = y; if (keyPressed == true) { if (key == CODED) { if (keyCode == UP) { y = y - 1; } if (keyCode == DOWN) { y = y + 1; } if (keyCode == RIGHT) { x = x + 1; } if (keyCode == LEFT) { x = x - 1; } } } if(collided()) { x = cx; y = cy; } } boolean collided() { int cx,cy; boolean result = false; boolean moneyTouched = false; for(int angle=0;angle<360;angle+=1) { cx = x+((int)(cos(radians(angle))*radius)); cy = y-((int)(sin(radians(angle))*radius)); if(moneyVisible) { moneyTouched = (cx > MX) && (cx < MX+MW) && (cy > MY) && (cy < MY+MH); if(moneyTouched) { moneyVisible = false; } image(img, MX, MY); } result = (cx > OBX) && (cx < OBX+OBW) && (cy > OBY) && (cy < OBY+OBH); if(result) { break; } cx = x+((int)(cos(radians(angle))*radius)); cy = y-((int)(sin(radians(angle))*radius)); result = (cx > WX) && (cx < WX+WW) && (cy > WY) && (cy < WY+WH); if(result) { break; } } return result; } //void mousePressed() { // setup(); //} void keyPressed() { if (keyPressed == true) { if (key == CODED) { if (keyCode == TAB) { setup(); } } } // key = CODED ; //keyCode = TAB; } //arman ataman
loose change thief poster.jpg