Interactive Authoring: Interactive Story (FINAL)

 

“Slumber: Dream vs Nightmare” is an interactive story that I made using processing code as well as a series of animations that I made using Photoshop. Slumber uses characters that I have depicted through my own eyes; it tells the tale of a man who has entered this dreamscape and must find a way to wake up. As he falls down he lands in front of three different paths. Two of these paths will kill him causing him to be forever in slumber, however one path will allow him to meet the dream guru and awaken from his slumber!! Those who interact with the story will be given instructions on key presses that can be used in order to choose their path and progress through the story.

(Song in code: : “Gone” by Russ Produced by Ivann)

Code: 

import ddf.minim.*;
Minim minim;
AudioPlayer player, song;
int startFrames = 6;
int pathFrames = 5;
int deathFrames = 6;
int forestFrames = 8;
int scapeFrames = 13;
int guruFrames = 10;
int wakeFrames = 5;
int walkerFrames = 11;
int frame = 0;
long timer;
float framespeed = 215;
float theta;
PImage[] startscreen = new PImage[startFrames];
PFont title;
int screensizex, screensizey, stage;
PImage[] path = new PImage[pathFrames];
PImage[] die = new PImage[deathFrames];
PImage[] forest = new PImage[forestFrames];
PImage[] scape = new PImage[scapeFrames];
PImage[] guru = new PImage[guruFrames];
PImage[] wake = new PImage[wakeFrames];
PImage[] walker = new PImage[walkerFrames];
void setup() {
screensizex = round(width*0.90);
screensizey = round(height*0.90);
minim = new Minim(this);
song = minim.loadFile(“RUSS.mp3”);
song.loop();
size(1220, 900);
stage = 1;
startscreen[0] = loadImage(“1.jpg”);
startscreen[1] = loadImage(“2.jpg”);
startscreen[2] = loadImage(“3.jpg”);
startscreen[3] = loadImage(“4.jpg”);
startscreen[4] = loadImage(“5.jpg”);
startscreen[5] = loadImage(“6.jpg”);
timer = millis();
imageMode(CENTER);
path[0] = loadImage(“path1.jpg”);
path[1] = loadImage(“path2.jpg”);
path[2] = loadImage(“path3.jpg”);
path[3] = loadImage(“path4.jpg”);
path[4] = loadImage(“path5.jpg”);
timer = millis();
imageMode(CENTER);
die[0] = loadImage(“death1.jpg”);
die[1] = loadImage(“death2.jpg”);
die[2] = loadImage(“death3.jpg”);
die[3] = loadImage(“death4.jpg”);
die[4] = loadImage(“death5.jpg”);
die[5] = loadImage(“death6.jpg”);
timer=millis();
imageMode(CENTER);

forest[0] = loadImage(“walk1.jpg”);
forest[1] = loadImage(“walk2.jpg”);
forest[2] = loadImage(“walk3.jpg”);
forest[3] = loadImage(“walk4.jpg”);
forest[4] = loadImage(“walk5.jpg”);
forest[5] = loadImage(“walk6.jpg”);
forest[6] = loadImage(“walk7.jpg”);
forest[7] = loadImage(“walk8.jpg”);
timer=millis();
imageMode(CENTER);

scape[0] = loadImage(“scape1.jpg”);
scape[1] = loadImage(“scape2.jpg”);
scape[2] = loadImage(“scape3.jpg”);
scape[3] = loadImage(“scape4.jpg”);
scape[4] = loadImage(“scape5.jpg”);
scape[5] = loadImage(“scape6.jpg”);
scape[6] = loadImage(“scape7.jpg”);
scape[7] = loadImage(“scape8.jpg”);
scape[8] = loadImage(“scape9.jpg”);
scape[9] = loadImage(“scape10.jpg”);
scape[10] = loadImage(“scape11.jpg”);
scape[11] = loadImage(“scape12.jpg”);
scape[12] = loadImage(“scape13.jpg”);
timer = millis();
imageMode(CENTER);

guru[0] = loadImage(“guru1.jpg”);
guru[1] = loadImage(“guru2.jpg”);
guru[2] = loadImage(“guru3.jpg”);
guru[3] = loadImage(“guru4.jpg”);
guru[4] = loadImage(“guru5.jpg”);
guru[5] = loadImage(“guru6.jpg”);
guru[6] = loadImage(“guru7.jpg”);
guru[7] = loadImage(“guru8.jpg”);
guru[8] = loadImage(“guru9.jpg”);
guru[9] = loadImage(“guru10.jpg”);
timer = millis();
imageMode(CENTER);

wake[0] = loadImage(“wake1.jpg”);
wake[1] = loadImage(“wake2.jpg”);
wake[2] = loadImage(“wake3.jpg”);
wake[3] = loadImage(“wake4.jpg”);
wake[4] = loadImage(“wake5.jpg”);
timer = millis();
imageMode(CENTER);

walker[0] = loadImage(“walker1.jpg”);
walker[1] = loadImage(“walker2.jpg”);
walker[2] = loadImage(“walker3.jpg”);
walker[3] = loadImage(“walker4.jpg”);
walker[4] = loadImage(“walker5.jpg”);
walker[5] = loadImage(“walker6.jpg”);
walker[6] = loadImage(“walker7.jpg”);
walker[7] = loadImage(“walker8.jpg”);
walker[8] =loadImage(“walker9.jpg”);
walker[9] = loadImage(“walker10.jpg”);
walker[10] = loadImage(“walker11.jpg”);
timer = millis();
imageMode(CENTER);

}
void draw() {
if (millis() – timer > framespeed) {
timer = millis();
frame ++;
}

if (stage==1) {
image(startscreen[frame], width/2, height/2);
if (frame == startFrames-2) {
frame = 0;
}
textAlign(CENTER);
text(“SLUMBER: DREAM VS NIGHTMARE”, 236, 443);
text(“Press ENTER”, 229, 466);
text(“D=PATH(1),S=PATH(2),A=PATH(3)”, 233, 554);
text(“REMEMBER THIS!!!!”, 235, 576);
fill(0);
}
if (stage==2) {
image(path[frame], width/2, height/2);
if (frame == pathFrames-2) {
frame = 0;
}
}
if (stage==3){
image(die[frame], width/2, height/2);
if (frame == deathFrames-2) {
frame = 0;
}
}
if (stage==4){
image(forest[frame], width/2, height/2);
if (frame == forestFrames-2) {
frame = 0;
}
textAlign(CENTER);
text(“ENTER YOUR DREAMS”, 500, 400 );
text(“INTO DREAMSCAPE YOU WILL GO”, 330, 400);

}
if (stage==5){
image(scape[frame], width/2, height/2);
if (frame == scapeFrames-2) {
frame = 0;
}
}
if (stage==6){
image(guru[frame], width/2, height/2);
if (frame == guruFrames-1) {
frame = 0;
}
textAlign(CENTER);
text(“WELCOME TO THE DREAMSCAPE”, 468, 130);
text(“YOU ARE THE ONE FATE HAS BROUGHT TO ME”, 474,197);
text(“FREE YOURSELF AND AWAKEN TO YOUR TRUE MIND”, 479, 265);
text(“ONLY THEN WILL YOU AWAKEN FROM THIS SLUMBER”, 483, 327);
}
if (stage==7){
image(wake[frame], width/2, height/2);
if (frame == wakeFrames-1) {
frame = 0;
}
textAlign(CENTER);
text(“AWAKEN FROM THIS SLUMBER!!!!!”, 379,322);
text(“THE END… CONGRATULATIONS~”, 862,319);
}
if (stage==8){
image(walker[frame], width/2, height/2);
if (frame == walkerFrames-2) {
frame = 0;
}
}
if (keyPressed == true ) {
stage = 2;
}

if (key == ‘d’) {
stage = 3;
}
if (key == ‘s’) {
stage = 4;
}
if (key == ‘c’) {
stage = 5;
}
if (key == ‘x’) {
stage = 6;
}
if (key == ‘z’) {
stage = 7;
}
if (key == ‘a’) {
stage = 8;
}
}

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