Interactive Design: The Importance of Decision Making

These are just two of the eight possible paths in this interactive piece. I wanted this to be played by someone who knew nothing about the story. Because of this, it wouldn’t have made much sense for me to play through this. As instead, this is my roommate playing.

The code used to make the interactive game that you see is as follows:

boolean opening = true;
boolean start = false;
boolean choice1 = false;
boolean choice2 = false;
boolean choice3 = false;
boolean choice4 = false;
boolean choice5 = false;
boolean choice6 = false;
boolean choice7 = false;
boolean choice8 = false;
boolean choice9 = false;
boolean choice10 = false;
boolean choice11 = false;
boolean choice12 = false;
boolean choice13 = false;
boolean choice14 = false;
boolean question0 = true;
boolean question1 = true;
boolean question2 = true;
boolean question3 = true;
boolean question4 = true;
boolean question5 = true;
boolean question6 = true;
boolean question7 = true;
boolean question8 = true;
PImage Opening;
PImage Start;
PImage Choice1;
PImage Choice2;
PImage Choice3;
PImage Choice4;
PImage Choice5;
PImage Choice6;
PImage Choice7;
PImage Choice8;
PImage Choice9;
PImage Choice10;
PImage Choice11;
PImage Choice12;
PImage Choice13;
PImage Choice14;

void setup(){
size(720,480);
background(0);
Opening = loadImage(“Opening.png”);
Start = loadImage(“Start.png”);
Choice1 = loadImage(“Choice1.png”);
Choice2 = loadImage(“Choice2.png”);
Choice3 = loadImage(“Choice3.png”);
Choice4 = loadImage(“Choice4.png”);
Choice5 = loadImage(“Choice5 go out.png”);
Choice6 = loadImage(“Choice6.png”);
Choice7 = loadImage(“Choice7 Resign.png”);
Choice8 = loadImage(“Choice8 Stay.png”);
Choice9 = loadImage(“Choice9.png”);
Choice10 = loadImage(“Choice10.png”);
Choice11 = loadImage(“Choice11 Accept Job Offer.png”);
Choice12 = loadImage(“Choice12 Decline Job Offer.png”);
Choice13 = loadImage(“Choice13 Go Home.png”);
Choice14 = loadImage(“Choice14 Stay at Hubris.png”);
}

void draw(){
if (opening == true){
//background(255,32,123);
//textSize(32);
//fill(0);
//stroke(0);
//text(“OPENING SCREEN”,360,240);
pushMatrix();
scale(.25);
image(Opening,0,0);
popMatrix();
}
if (start == true){
//background(255);
//textSize(32);
//fill(0);
//stroke(0);
//text(“START”,360,240);
pushMatrix();
scale(.25);
image(Start,0,0);
popMatrix();
}
if (choice1 == true){
//background(0,0,255);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE1”,360,240);
pushMatrix();
scale(.25);
image(Choice1,0,0);
popMatrix();
}
if (choice2 == true){
//background(255,0,0);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE2”,360,240);
pushMatrix();
scale(.25);
image(Choice2,0,0);
popMatrix();
}
if (choice3 == true){
//background(153,153,153);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE3”,360,240);
pushMatrix();
scale(.25);
image(Choice3,0,0);
popMatrix();
}
if (choice4 == true){
//background(234,34,210);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE4”,360,240);
pushMatrix();
scale(.25);
image(Choice4,0,0);
popMatrix();
}
if (choice5 == true){
//background(121,25,0);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE5”,360,240);
pushMatrix();
scale(.25);
image(Choice5,0,0);
popMatrix();
}
if (choice6 == true){
//background(255,255,0);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE6”,360,240);
pushMatrix();
scale(.25);
image(Choice6,0,0);
popMatrix();
}
if (choice7 == true){
//background(150);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE7”,360,240);
pushMatrix();
scale(.25);
image(Choice7,0,0);
popMatrix();
}
if (choice8 == true){
//background(234);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE8”,360,240);
pushMatrix();
scale(.25);
image(Choice8,0,0);
popMatrix();
}
if (choice9 == true){
//background(15);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE9”,360,240);
pushMatrix();
scale(.25);
image(Choice9,0,0);
popMatrix();
}
if (choice10 == true){
//background(134,0,134);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE10”,360,240);
pushMatrix();
scale(.25);
image(Choice10,0,0);
popMatrix();
}
if (choice11 == true){
//background(3,124,233);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE11”,360,240);
pushMatrix();
scale(.25);
image(Choice11,0,0);
popMatrix();
}
if (choice12 == true){
//background(201,3,52);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE12”,360,240);
pushMatrix();
scale(.25);
image(Choice12,0,0);
popMatrix();
}
if (choice13 == true){
//background(21,23,234);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE13”,360,240);
pushMatrix();
scale(.25);
image(Choice13,0,0);
popMatrix();
}
if (choice14 == true){
//background(34,35,213);
//textSize(32);
//fill(0);
//stroke(0);
//text(“CHOICE14”,360,240);
pushMatrix();
scale(.25);
image(Choice14,0,0);
popMatrix();
}
if (keyPressed){
if (opening == true){
if (key == ‘1’){
start = true;
}
}
}
if (start == true){
if (key == ‘q’){
if (question1 == true){
choice1 = true;
question1 = false;
}
}
if (key == ‘e’){
if (question1 == true){
choice2 = true;
question1 = false;
}
}
}
if (choice1 == true){
if (key == ‘w’){
if (question2 == true){
choice3 = true;
question2 = false;
}
}
if (key == ‘r’){
if (question2 == true){
choice4 = true;
question2 = false;
}
}
}
if (choice3 == true){
if (key == ‘a’){
if (question4 == true){
choice7 = true;
question4 = false;
}
}
if (key == ‘d’){
if (question4 == true){
choice8 = true;
question4 = false;
}
}
}
if (choice4 == true){
if (key == ‘a’){
if (question5 == true){
choice9 = true;
question5 = false;
}
}
if (key == ‘d’){
if (question5 == true){
choice10 = true;
question5 = false;
}
}
}
if (choice2 == true){
if (key == ‘w’){
if (question3 == true){
choice5 = true;
question3 = false;
}
}
if (key == ‘r’){
if (question3 == true){
choice6 = true;
question3 = false;
}
}
}
if (choice5 == true){
if (key == ‘a’){
if (question6 == true){
choice11 = true;
question6 = false;
}
}
if (key == ‘d’){
if (question6 == true){
choice12 = true;
question6 = false;
}
}
}
if (choice6 == true){
if (key == ‘a’){
if (question7 == true){
choice13 = true;
question7 = false;
}
}
if (key == ‘d’){
if (question7 == true){
choice14 = true;
question7 = false;
}
}
}
if (key == ‘ ‘){
opening = true;
start = false;
choice1 = false;
choice2 = false;
choice3 = false;
choice4 = false;
choice5 = false;
choice6 = false;
choice7 = false;
choice8 = false;
choice9 = false;
choice10 = false;
choice11 = false;
choice12 = false;
choice13 = false;
choice14 = false;
question1 = true;
question2 = true;
question3 = true;
question4 = true;
question5 = true;
question6 = true;
question7 = true;
question8 = true;
}
}

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