Dougal - Project 1

By Dougal Henken
/*When I started this project, I wanted to recreate the story of "Othello" into a shorter, more easily understandable format. This of course posed a number of challenges. Firstly, William Shakespeare's original "Othello" is a very complex tale of lust and betrayal. The story would need to be condensed down for the sake of size while also being able to convey the same sense of tragedy and urgency. Even after the story had been rewritten, it still proved to be a lengthy piece of text. I felt the program needed a visual aid to help the reader understand the mental collapse of Othello. I tried to make illustrations that were disturbing without being traditional or overtly frightening. Also, a vibrate function with escalating intensity was added to each frame in the story to illustrate the break-up of the main character's psyche as the story progresses. The text then works together with the background movement and illustrations to subetly demonstrate the madness of the original story of "Othello." */ int page = 0; PFont font; PImage a; PImage b; PImage c; PImage d; PImage d1; PImage e; PImage f; PImage g; PImage h; PImage I1; PImage I2; PImage I3; PImage I4; PImage I5; PImage I6; PImage I7; PImage I8; PImage I9; PImage I10; PImage I11; PImage I12; PImage I13; PImage x; String sa1; String sb1; String sc1; String sc2; String sd1; String sd2; String sd3; String se1; String se2; String se3; String se4; String sf1; String sf12; String sf2; String sf22; String sf3; String sf32; String sf4; String sf5; String sg1; String sh1; String si1; String si2; String si3; String si32; String si4; String si5; String si6; String si7; String si8; String si9; String si10; String si11; String si12; String si13; float rand1; float rand2; float rand3; float rand4; float rand5; float m; float n; void setup() { size(600, 400); font = loadFont("ArnoPro-BoldSmText-11.vlw"); textFont (font); float pen = constrain(mouseX, 600, 400); XMLElement xml = new XMLElement(this, "Project 1_Dialogue.xml"); sa1 = xml.getChild(0).getContent(); sb1 = xml.getChild(1).getContent(); sc1 = xml.getChild(2).getContent(); sc2 = xml.getChild(3).getContent(); sd1 = xml.getChild(4).getContent(); sd2 = xml.getChild(5).getContent(); sd3 = xml.getChild(6).getContent(); se1 = xml.getChild(7).getContent(); se2 = xml.getChild(8).getContent(); se3 = xml.getChild(9).getContent(); se4 = xml.getChild(10).getContent(); sf1 = xml.getChild(11).getContent(); sf2 = xml.getChild(12).getContent(); sf3 = xml.getChild(13).getContent(); sf4 = xml.getChild(14).getContent(); sf5 = xml.getChild(15).getContent(); sg1 = xml.getChild(16).getContent(); sh1 = xml.getChild(17).getContent(); si1 = xml.getChild(18).getContent(); si2 = xml.getChild(19).getContent(); si3 = xml.getChild(20).getContent(); si4 = xml.getChild(21).getContent(); si5 = xml.getChild(22).getContent(); si6 = xml.getChild(23).getContent(); si7 = xml.getChild(24).getContent(); si8 = xml.getChild(25).getContent(); si9 = xml.getChild(26).getContent(); si10 = xml.getChild(27).getContent(); si11 = xml.getChild(28).getContent(); si12 = xml.getChild(29).getContent(); si13 = xml.getChild(30).getContent(); sf32 = xml.getChild(31).getContent(); sf22 = xml.getChild(32).getContent(); sf12 = xml.getChild(33).getContent(); si32 = xml.getChild(34).getContent(); a = loadImage ("1_4x6.png"); b = loadImage ("2_4x6.png"); c = loadImage ("3_4x6.png"); d = loadImage ("4_4x6.png"); d1 = loadImage ("11_4x6_final.png"); e = loadImage ("5_4x6.png"); f = loadImage ("6_4x6.png"); g = loadImage ("7_4x6.png"); h = loadImage ("8_4x6.png"); I1 = loadImage ("1_4.png"); I2 = loadImage ("2_3_9_12.png"); I3 = loadImage ("2_3_9_12.png"); I4 = loadImage ("1_4.png"); I5 = loadImage ("6_7.png"); I6 = loadImage ("5_8.png"); I7 = loadImage ("5_8.png"); I8 = loadImage ("6_7.png"); I9 = loadImage ("2_3_9_12.png"); I10 = loadImage ("10_4x6.png"); I11 = loadImage ("11_4x6.png"); I12 = loadImage ("2_3_9_12.png"); I13 = loadImage ("13_4x6.png"); x = loadImage ("x.png"); } void draw() { background(204); if (page == 0) { fill (0); image(x, 0,0); } else if (page == 1) { noStroke(); image(a, -7, -7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(sa1, 0, 0); } else if (page == 2) { noStroke(); image(b, n-7, m-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(sb1, 0, 0); } else if (page == 31) { noStroke(); image(c, (n*2)-7, (m*2)-7); fill (255, 128); rect(0, 5, 600, 390); fill(0); text(sc1, 0, 0); } else if (page == 32) { image(c, (n*2)-7, (m*2)-7); fill (255, 128); rect(0, 5, 600, 390); fill(0); text(sc2, 0, 0); } else if (page == 41) { image(d, (n*3)-7, (m*3)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(sd1, 0, 0); } else if (page == 42) { image(d1, (n*3)-7, (m*3)-7); } else if (page == 412) { image(d, (n*3)-7, (m*3)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(sd2, 0, 0); } else if (page == 51) { image(e, (n*4)-7, (m*4)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(se1, 0, 0); } else if (page == 52) { image(e, (n*4)-7, (m*4)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(se2, 0, 0); } else if (page == 54) { image(e, (n*4)-7, (m*4)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(se4, 0, 0); } else if (page == 61) { image(f, (n*5)-7, (m*5)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(sf1, 0, 0); } else if (page == 612) { image(f, (n*5)-7, (m*5)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(sf12, 0, 0); } else if (page == 62) { image(f, (n*5)-7, (m*5)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(sf2, 0, 0); } else if (page == 622) { image(f, (n*5)-7, (m*5)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(sf22, 0, 0); } else if (page == 63) { image(f, (n*5)-7, (m*5)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(sf3, 0, 0); } else if (page == 632) { image(f, (n*5)-7, (m*5)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(sf32, 0, 0); } else if (page == 111) { image(I1, (n*8)-7, (m*8)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(si1, 0, 0); } else if (page == 222) { image(I2, (n*8)-7, (m*8)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(si2, 0, 0); } else if (page == 333) { image(I8, (n*8)-7, (m*8)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(si3, 0, 0); } else if (page == 3332) { image(I8, (n*8)-7, (m*8)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(si32, 0, 0); } else if (page == 444) { image(I4, (n*8)-7, (m*8)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(si4, 0, 0); } else if (page == 555) { image(I5, (n*8)-7, (m*8)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(si5, 0, 0); } else if (page == 666) { image(I6, (n*8)-7, (m*8)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(si6, 0, 0); } else if (page == 777) { image(I7, (n*8)-7, (m*8)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(si7, 0, 0); } else if (page == 888) { image(I8, (n*8)-7, (m*8)-7); fill(255, 128); rect(0, 5, 600, 390); fill (0); text(si8, 0, 0); } else if (page == 999) { image(I13, (n*8)-7, (m*8)-7); text(si13, 0, 0); } } void mousePressed() { //Frame 0 if ((page == 0) ) { page = 1; } //Frame 1 else if ((page == 1) && (mouseX > 0) && (mouseX < 300) && (mouseY > 202) && (mouseY < 221)) { page = 2; } else if ((page == 1) && (mouseX > 0) && (mouseX < 300) && (mouseY > 221) && (mouseY < 253)) { page = 42; //Frame 2 } else if ((page == 2) && (mouseX > 0) && (mouseX < 223) && (mouseY > 199) && (mouseY < 212)) { page = 31; } else if ((page == 2) && (mouseX > 0) && (mouseX < 447) && (mouseY > 232) && (mouseY < 244)) { page = 32; } //Frame 3-1 else if ((page == 31) && (mouseX > 0) && (mouseX < 279) && (mouseY > 285) && (mouseY < 299)) { page = 999; } else if ((page == 31) && (mouseX > 0) && (mouseX < 342) && (mouseY > 317) && (mouseY < 331)) { page = 41; } //Frame 3-2 else if ((page == 32) && (mouseX > 0) && (mouseX < 342) && (mouseY > 285) && (mouseY < 298)) { page = 51; } else if ((page == 32) && (mouseX > 0) && (mouseX < 342) && (mouseY > 317) && (mouseY < 330)) { page = 61; } //Frame 4-1 else if ((page == 41) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 412; } else if ((page == 412) && (mouseX > 0) && (mouseX < 545 ) && (mouseY > 244) && (mouseY < 266)) { page = 52; } else if ((page == 412) && (mouseX > 0) && (mouseX < 545) && (mouseY > 286) && (mouseY < 311)) { page = 62; } //Frame 5-1 else if ((page == 51) && (mouseX > 0) && (mouseX < 572) && (mouseY > 255) && (mouseY < 271)) { page = 333; } else if ((page == 51) && (mouseX > 0) && (mouseX < 572) && (mouseY > 285) && (mouseY < 311)) { page = 61; } //Frame 5-2 else if ((page == 52) && (mouseX > 0) && (mouseX < 515) && (mouseY > 103) && (mouseY < 119)) { page = 63; } else if ((page == 52) && (mouseX > 0) && (mouseX < 515) && (mouseY > 134) && (mouseY < 164)) { page = 666; } //Frame 6-1 else if ((page == 61) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 612; } else if ((page == 612) && (mouseX > 0) && (mouseX < 563) && (mouseY > 63) && (mouseY < 85)) { page = 222; } else if ((page == 612) && (mouseX > 0) && (mouseX < 563) && (mouseY > 105) && (mouseY < 116)) { page = 111; } //Frame 6-2 else if ((page == 62) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 622; } else if ((page == 622) && (mouseX > 0) && (mouseX < 563) && (mouseY > 143) && (mouseY < 170)) { page = 555; } else if ((page == 622) && (mouseX > 0) && (mouseX < 563) && (mouseY > 184) && (mouseY < 200)) { page = 444; } //Frame 6-3 else if ((page == 63) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 632; } else if ((page == 632) && (mouseX > 0) && (mouseX < 563) && (mouseY > 143) && (mouseY < 170)) { page = 888; } else if ((page == 632) && (mouseX > 0) && (mouseX < 563) && (mouseY > 184) && (mouseY < 200)) { page = 777; } else if ((page == 111) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 0; } else if ((page == 222) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 0; } else if ((page == 333) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 3332; } else if ((page == 3332) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 0; } else if ((page == 444) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 0; } else if ((page == 555) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 0; } else if ((page == 666) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 0; } else if ((page == 777) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 0; } else if ((page == 888) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 0; } else if ((page == 999) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 0; } else if ((page == 42) && (mouseX > 0) && (mouseX < 600) && (mouseY > 0) && (mouseY < 400)) { page = 0; } } void mouseMoved(){ n = random (-1,1); m = random (-1,1); } void keyPressed() { if ((key == ENTER) || (key == RETURN)) { page = 0; } }

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*