Interactive Authoring Final – Bouquet

Bouquet is a simple game that explores the touchy topic of child abuse. The game is visually narrated through a child’s drawing of their account of abuse.

Code:

boolean titleImage = true;
boolean FOFImage = true;
boolean FYFImage = true;
boolean FPFImage = true;
boolean AfterDraw = true;
int mx = 0;
int bgc = 0;
int bgvar= 0;
int bwrds= -275;
int hc = 0;
//——–PImages
PImage BGBase;
PImage Sun;
PImage Clouds;
PImage FBG;
PImage BG;
PImage MC;//mc
PImage House;
PImage FG;
PImage CFG;
PImage FOF;
PImage FYF;
PImage FPF;
PImage Title;
PImage Epi1;
PImage Epi2;
PImage Epi3;
void setup() {
size (1000, 500);
Title = loadImage (“Title.jpg”);
BGBase = loadImage (“BGBase.jpg”);
Sun = loadImage (“Sun.png”);
Clouds = loadImage (“Clouds.png”);
FBG = loadImage (“FBG.png”);
BG = loadImage (“BG.png”);
MC = loadImage (“MC.png”);
House = loadImage (“House.png”);
FG = loadImage (“FG.png”);
CFG = loadImage (“CFG.png”);
FOF = loadImage (“FOF.png”);
FYF = loadImage (“FYF.png”);
FPF = loadImage (“FPF.png”);
Epi1 = loadImage (“Epi1.jpg”);
Epi2 = loadImage (“Epi2.jpg”);
Epi3 = loadImage (“Epi3.jpg”);
fill(0);
}
void draw() {
image(BGBase,-461-mx,0);//BGBase
image(Sun,300+(bgc/12)-(bgvar/15),0);//Sun
image(Clouds,500-(bgc/10)-(bgvar),0);//Clouds
image(FBG,-461-(mx/2),139);//FBG
image(BG,395-(mx/1.5),-52);//BG
image(MC,532,115);//MC
image(House,-470-mx,-85);//House
bgc=bgc+1;
//————————-Key Pressed————————–
if (key==’d’) {if (keyPressed == true) {mx=mx+4; bgvar=bgvar+1;} else {bgvar=bgvar+0;}}
if (key==’a’) {if (keyPressed == true) {mx=mx-4;}}
if (key==’ ‘) {if (keyPressed == true) {titleImage = false;}}
if (key==’1′) {if (keyPressed == true) {if (mx>400 && mx<700 ){FOFImage = false; hc=hc+1;}}}
if (key==’2′) {if (keyPressed == true) {if (mx>1500 && mx<1800 ){FYFImage = false; hc=hc+1;}}}
if (key==’3′) {if (keyPressed == true) {if (mx>2600 && mx<2900 ){FPFImage = false; hc=hc+1;}}}
//————other vars
if (hc==3){bwrds=-461;}
if (mx<=bwrds){mx=bwrds;}
if (mx>=3250){mx=3250;}
if (FOFImage){FOF();}
if (FYFImage){FYF();}
if (FPFImage){FPF();}
if (AfterDraw){afterDraw();}
if (titleImage){Title();}
//——————–epilogue
if (mx<=-450){image(Epi1,0,0); if (key==’4′){image(Epi2,0,0);} if (key==’5’){image(Epi3,0,0);}}

}
void Title(){
image(Title,0,0);}//Title
void FOF(){
image(FOF,1049-mx,195);}
void FYF(){
image(FYF,2100-mx,195);}
void FPF(){
image(FPF,3200-mx,195);}
void afterDraw(){//Used to draw final two layers above flowers
image(FG,-140-(mx*1.25),-91);//FG
image(CFG,-461-(mx*1.5),-169);//CFG
}

Advertisements
This entry was posted in Time-Based and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s