This story began as an idea to create a city environment using ambient noise. Then I thought about making some kind of event occur to break that ambience, which ended up being an alien abduction. From there I developed the idea to create some kind of resolution, which became the superhero who flies off after the UFO. My sound effects were the city noise, ufo slowing down, ufo beam, ufo flying, singe scream, crowd scream, single shout, crowd cheer, and an outro theme.
Alien Abductionvar city;
var scream;
var ufoSlow;
var ufoBeam;
var ufoFly;
var crowdscream;
var yell;
var cheer;
function preload (){
city = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/busycity.wav"); scream = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/screams.mp3") crowdscream = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/crowdscream.wav"); ufoSlow = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/ufoslow.wav"); ufoFly = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/ufowave.wav"); ufoBeam = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/ufowave.wav"); yell = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/hey.wav"); cheer = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/cheer.wav"); outro = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/outro.wav"); }
function soundSetup(){
city.setVolume(0.3); scream.setVolume(1);
ufoslow.setVolume(0.5);
ufoBeam.setVolume(0.7);
ufoFly.setVolume(2);
crowdscream.setVolume(.3);
yell.setVolume(1.5);
cheer.setVolume(1);
outro.setVolume(1);
}
var x = []; var y = []; var dx = []; var cx = []; var cy = []; var cdx = []; var skin = []; var shirt= []; var pants = []; var carW = []; var carH = []; var h = []; var w = []; var ufoY = 0; var ufoX = 0; var aY = 300; var sX = 0; var sY = 170;
function setup() {
createCanvas(400, 300);
for (var i = 0; i < 20; i++) {
x[i] = random(25, width-25);
y[i] = height-25
dx[i] = random(-3, 3);
shirt[i] = color(random(0,255), random(0,255),random(0,255))
skin[i] = color(random(200,250),random(100,150),random(20,100))
pants[i] = color(random(0,255), random(0,255),random(0,255))
h[i] = random(15,20);
w[i] = random(5,8);
frameRate(10);
}
for (var c = 0; c < 5; c++) {
cx[c] = random(25, width-25);
cy[c] = height-15
carW[c] = random(20,40);
carH[c] = random(15,20);
cdx[c] = random(-5, 5);
}
}
function draw() {
if(frameCount<100){
city.play(); }
background(43,226,232);
push();
rectMode(CORNER);
fill(169,169,169,150); rect(width/2,height-height/4,100,height/4); rect(width/6,height-height/4.5,75,height/4.5);
rect(width/6-25,height-height/7,25,height/5);
pop();
for (var c = 0; c < 5; c++) {
car(cx[c], cy[c],carW[c],carH[c],cdx[c],shirt[c]); cx[c] += cdx[c]; if (cx[c] > width-25 || cx[c] < 25){ cdx[c] = -cdx[c];
}
}
for (var i = 0; i < 20; i++) {
person(x[i], y[i], dx[i], skin[i],shirt[i],pants[i],h[i],w[i]); x[i] += dx[i];
if(frameCount>100){
x[i] += 2*dx[i]; }
if (x[i] > width-25 || x[i] < 25) { dx[i] = -dx[i];
}
}
push();
rectMode(CORNER);
fill(169,169,169); rect(0,height/2,50,height/2); rect(width-75,height-height/3,75,height/3);
pop();
if(frameCount>50){
push();
translate(ufoX,ufoY); UFO(width/2,-300);
pop();
ufoSlow.play(); }
if(frameCount>100){
city.stop(); scream.play(); ufoBeam.play();
}
if(frameCount>100 & frameCount<115){
fill(21,249,36,150) triangle(width/2,height/2,width/2-50,height,width/2+50,height) abductee(width/2,aY); aY-=11;
}
ufoY+=4;
if(frameCount>85){
ufoY-=4; ufoSlow.stop();
}
if(frameCount>115){
ufoY-=3; ufoX+=10;
ufoBeam.stop(); scream.stop(); ufoFly.play(); crowdscream.play(); }
if(frameCount>135){
ufoFly.stop(); }
if(frameCount>150){
push();
rotate(radians(50)); superhero(sX,sY); pop();
sX += 15 sY -=20
}
if(frameCount>152){
crowdscream.stop()
}
if(frameCount>152 & frameCount<154){ yell.play();
}
if(frameCount>160){ cheer.play(); }
if(frameCount>200){
outro.play(); cheer.stop();
push();
rectMode(CORNER);
fill(255,0,0); rect(0,0,400,300); textSize(50);
fill(0); text("THE END",100,150);
}
if(frameCount>500){
outro.stop(); }
}
function person(x,y,dx,skin,shirt,pants,h,w) {
fill(skin);
ellipse(x,y-5,5, 5); rectMode(CENTER);
fill(shirt);
rect(x,y+10,w,h); fill(pants);
rect(x,y+25,w,h);
}
function abductee(x,y){
fill(219,150,30); ellipse(x,y-5,5,5); rectMode(CENTER);
fill(0,255,0); rect(x,y+10,5,15); fill(0,0,255); rect(x,y+25,5,15); }
function car(cx,cy,carW,carH,cdx,shirt){
fill(shirt); rect(cx,cy,carW,carH); noStroke();
if (cdx < 0) { rect(cx-17,cy+4,10,10); } else {
rect(cx+17,cy+4,10,10); }
fill(0); ellipse(cx-10,cy+10,10,10); ellipse(cx+10,cy+10,10,10);
}
function UFO(x,y){
push();
translate(x,y);
scale(2);
fill(152,152,152); ellipse(0,50,40,15); quad (-5,52,-15,60,-14,61,-4,53) rect (-2,52,1.5,10) quad (1,52,11,61,12,60,4,53) fill(175,238,170,200); ellipse(0,45,25,15); fill(255,0,0); circle(-12,52,3); circle(12,52,3); fill(255,255,0); circle(0,54.5,3);
pop();
}
function superhero(x,y){
fill(255,0,0); quad(x+5,y+2,x-5,y+2,x-15,y+30,x+15,y+30); fill(219,150,30); ellipse(x,y-5,10,10); rectMode(CENTER);
fill(0,0,255); rect(x,y+10,10,20); fill(0,0,255)
rect(x,y+25,10,20); quad(x+2,y+5,x+8,y-10,x+10,y-8,x+5,y+6); quad(x-2,y+2,x-8,y+17,x-10,y+15,x-5,y+4); fill(255,0,0); rect(x,y+35,10,5); }