Alexis - Project 1

By Alexis Nelson
int page = 1; PFont font01; PFont font02; PImage frogPrince; PImage mirror; PImage huntsman; PImage snowWhite; PImage tree; PImage snowWhiteBed; PImage queenYoung; PImage DwarfsHouse; PImage broom; PImage apple; PImage oldWoman; PImage prince; PImage castle; PImage snowWhiteOld; int dragX, dragY; boolean page1Erased = false; boolean bover = false; boolean locked = false; void setup() { if (page == 2) { background(0); } size(600, 400); smooth(); font01 = loadFont("BookAntiqua-Italic-48.vlw"); font02 = loadFont("SansSerif.plain-48.vlw"); huntsman = loadImage("huntsman.png"); snowWhite = loadImage("snowWhite.png"); tree = loadImage("tree.png"); frogPrince = loadImage("FrogPrince.png"); mirror = loadImage("Mirror.png"); tree = loadImage("tree.png"); snowWhiteBed = loadImage("snowWhiteBed.png"); queenYoung = loadImage("queenYoung.png"); broom = loadImage("broom.png"); DwarfsHouse = loadImage("DwarfsHouse.png"); apple= loadImage("Apple.png"); oldWoman= loadImage("oldWoman.png"); prince= loadImage("prince.png"); castle = loadImage("Castle.png"); snowWhiteOld= loadImage("snowWhiteOld.png"); } void draw() { cursor(apple, 16, 16); if ((page != 2) || !page1Erased) { background(0); page1Erased = true; } if (page ==1) { textFont(font01, 60); fill(27, 108, 34); text("Snow White", 150, 100); text("and", 250, 160); text("the Frog Prince", 100, 220); fill(255); textFont(font02, 20); text("By Alexis Nelson", 10, 380); image(frogPrince, 350, 220, 200, 200); //load Frog Prince into corner text("Click on frog to begin", 340, 380); page1Erased = false; } /////////////////////////////// if (page == 2) { //draw in mirror strokeWeight(4); stroke(150); image(mirror, 8, -3, 400, 410); textFont(font01, 24); text("Mirror, Mirror, on the wall, Who's the fairest one of all?", 30, 30); textFont(font02, 20); text( "Draw the fairest in the land", 350, 300); text("on the mirror, then hit enter", 350, 330); if(mousePressed) { line(mouseX, mouseY, pmouseX, pmouseY); } if ((keyPressed == true) && (key ==10)) { page = 3; } } //////////////////////////////////////// if(page == 3) { image(huntsman, -80, 55, 300, 300); image(snowWhite, 170, 100, 220, 220); image(tree, 400, 100, 150, 200); textFont(font01, 24); text("Snow White (you) is in the woods alone and the huntsman", 10, 30); text("has been sent by the Queen to kill you..he finds you", 35, 59); textFont(font02, 20); text( "Sweet talk the ", 45, 340); text( " huntsman to escape", 13, 360); text("Hide behind a tree", 400, 350); } ////////////////////////////////////////// if(page == 4) { image(snowWhite, dragX-100, dragY-100, 220, 220); image(tree, 100, 100, 250, 300); textFont(font01, 24); text("Hiding behind a tree seems silly", 250, 30); textFont(font02, 20); text( "Move Snow White", 30, 350); text( "behind the tree", 35, 370); } ////////////////////////////////////////// if(page == 5) { image(snowWhiteBed, 350, 300, 150, 100); image(tree, 300, 100, 250, 300); image(queenYoung, 50, 0,400, 400); textFont(font01, 24); text("The huntsman kills you and the Queen is happy.", 10, 30); text( "The End.",200, 70); textFont(font02, 20); text( "Click here to start over", 35, 370); } ///////////////////////////////////////// if(page == 6) { image(snowWhite, 350, 100, 200, 200); image(DwarfsHouse, 0, 0, 350,400); image(broom, 370, 100, 50, 200); textFont(font01, 24); text("You find a nice little house with 7 friendly dwarfs", 10, 30); textFont(font02, 20); text( "Live with the dwarfs", 35, 390); text( "Leave, the dwarfs seem boring and", 250, 350); text( "you don't want to be a maid like Cinderella", 235, 370); } /////////////////////////////////////////// if(page ==7) { image(DwarfsHouse, 0, 0, 350,400); image(snowWhite, 200, 150, 200, 200); image(apple, 430, 200, 50, 50); image (oldWoman, 400, 150, 200, 170); textFont(font01, 24); text("An old woman comes up to you", 200, 30); text("and offers you an apple", 200, 60); textFont(font02, 15); text( "Click on the house to ask her to leave." , 10, 370); text( "You don't like fruit all that much anyway, or old ladies", 5, 390); text( "Or click on the apple to take a bite!", 370, 370); } /////////////////////////////////////////////// if (page == 8) { image(snowWhiteBed, 350, 200, 200, 100); image(DwarfsHouse, 0, 0, 350,400); image(apple, 200, 270, 50, 50); textFont(font01, 24); text("Bad choice, you are poisoned.", 200, 30); text("The dwarfs think you are dead", 200, 60); text("so they're getting rid of your body.", 180, 90); textFont(font02, 20); text( "How sad. If you have any hope at all click on the apple", 35, 390); } ////////////////////////////////////////////////////// if (page == 9) { image(snowWhiteBed, 50, 150, 250, 100); image(prince, 330, 0, 250, 350); textFont(font01, 24); text("The Prince finds you, you're so lucky!", 10, 30); textFont(font02, 15); text( "Get (virtually) kissed on the lips, click on Snow White's mouth", 150, 390); } //////////////////////////// if (page == 10){ textFont(font01, 17); text("Well, in the forest the Prince that runs into you kisses you, and turns into a frog!", 10, 30); textFont(font02, 15); text("Wow, its true love, ", 10, 370); text("so click on his crown", 10, 390); text("Move your mouse over the ", 10, 200); text("Prince to see the bad news", 10, 220); if(mouseX >400 && mouseX < 500 && mouseY >100 && mouseY <370) { bover = true; if (!locked) { image(frogPrince, 400, 50, 170, 170); } } else { image(prince, 330, 0, 250, 350); bover = false; } } ///////////////////////////////////////////// if(page == 11) { textFont(font01, 24); text("You live happily ever after...", 30, 70); text("The End", 110, 110); image(castle, 300, 0, 300, 400); } } ///////////////////////////////////// //Button void mousePressed() { if(page == 1 && mouseX>350 && mouseX<550 && mouseY>220 && mouseY<420) { page = 2; } if(page == 3 && mouseX > 5 && mouseX <145 && mouseY >320 && mouseY < 350){ page = 6; } if(page == 3 && mouseX > 300 && mouseX <500 && mouseY >340 && mouseY < 375){ page = 4; } if(page == 5 && mouseX > 0 && mouseX <200 && mouseY> 350 && mouseY<390) { page = 1; } if(page == 6 && mouseX >5 && mouseX <150 && mouseY>350 && mouseY <400) { page = 7; } if(page == 6 && mouseX >250 && mouseX <600 && mouseY>340 && mouseY <400) { page = 5; } if(page ==7 && mouseX > 100 && mouseX <300 && mouseY > 170 && mouseY <300) { page = 10; //house } if(page ==7 && mouseX >430 && mouseX <460 && mouseY >200 && mouseY <250) { page = 8; //apple } if(page == 8 && mouseX >200 && mouseX < 260 && mouseY>270 && mouseY < 340) { page = 9; } if(page ==9 && mouseX >230 && mouseX <290 && mouseY >150 && mouseY <230) { page = 10; } if(page == 10 && mouseX > 400 && mouseX < 470 && mouseY >70 && mouseY <150) { page = 11; } if(page == 10 && mouseX >300 && mouseX < 375 && mouseY>370 && mouseY<400) { page = 12; } } void mouseReleased() { if (page ==4 && mouseX > 200 && mouseX < 300 && mouseY > 200 && mouseY < 400) { page = 5; } } void mouseDragged() { if (page == 4) { dragX = mouseX; dragY = mouseY; } }

One Comment

  1. Posted November 4, 2008 at 2:05 pm | Permalink

    There are some great ideas here, but some of the interface choices lack elegance and consistency. The illustration collages are wonderful. Have you seen the related collages by Max Ernst?

Post a Comment

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

*
*