Ellan Suder – Final Project

I wanted to make something visually appealing and interesting to play around with. I first started with the white dot and kept building to it every few days, like the glowing colors, the grid background, and eventually some floating particles.

The spacebar control was actually a mistake I made when I was trying to put in the attraction behavior, but I ended up liking it so I added it to the final program.

Controls: Control the dot with your mouse. Press A to attract, hold dot to repel. Hold spacebar to stop and control particles with mouse. Press X to delete the text.

(Holding the dot while pressing A looks pretty cool!)

sketch

/*
Ellan Suder
15104 1 D
esuder@andrew.cmu.edu
Final Project
*/

// variables for main body
var t = 0;
var r = 0;
var xLoc = 250;
var yLoc = 250;
var diffx = 0;
var diffy = 0;
var targetX = 250;
var targetY = 250;
var diameter = 20;
var opacity = 0;
var dragging = false;

// variables for grid + dots
var freq = 0.001;
var dotColor = 35;

// variables for particles
var particles = [];
var numP = 30;
var particleColor = 255;
var capturedP = 0;
var particleCaptured = false;
var stop = false;
var attract = false;
var diffxP = 0;
var diffyP = 0;

// variable for showing text
var showText = true;
  
function setup() {
    createCanvas(500, 500);
    noCursor();
  
    // make particles
    for (var i = 0; i < numP; i++) {
        var p = makeParticle(random(width), random(height),
                             random(-0.1, 0.1), random(-0.1, 0.1));
        particles.push(p);
    }
}

// drawing the grid, 
// the main white dot, 
// the particles,
// and the instructions text.
function draw() {
    background(0,20);
    noStroke();
    
    // make grid pattern using for loop
    for(var q = 0; q < height/20; q++)
    {
      for(var w = 0; w < width/20; w++)
      {
           // I measured distance from each rect to the center
           // to create subtle gradient. smaller dist = lighter
           dGrid = dist(w*20,q*20,width/2,height/2);
           fill(30 - dGrid/10);
           rectMode(CENTER);
           rect(w*20+10,
                q*20+10,
                15,15);
        
           // creates dot if random number < freq
           // when mouse is pressed, freq increases and
           // chance of making dot increases
           e = random(0,1);
           if(e < freq) {
             fill(dotColor);
             ellipse(w*20+20,
                     q*20+20,
                     5,5);
           }
      }
    }
  
    diffx = mouseX - xLoc;
    diffy = mouseY - yLoc;
    r += 0.1;
    xLoc += 0.05*diffx + sin(r/20)/10;
    yLoc += 0.05*diffy + cos(r/20)/10;
  
    t += 0.01;
    randomColor = color(noise(t)*255,noise(t)*255,noise(t+60)*255, opacity);
    
    // main body (white dot controlled by mouseX and mouseY
    // with some easing for aesthetic purposes)
    fill(255);
    ellipse(xLoc, yLoc, diameter/2, diameter/2);
    // layers of colored circles
    opacity = 10;
    fill(randomColor);
    ellipse(xLoc + sin(r)/2, yLoc + cos(r)/2, diameter*2, diameter*2);
    ellipse(xLoc + sin(r)/2, yLoc + cos(r)/2, diameter*3, diameter*3);
    ellipse(xLoc + sin(r)/2, yLoc + cos(r)/2, diameter*5, diameter*5);
    ellipse(xLoc + sin(r)/2, yLoc + cos(r)/2, diameter*8, diameter*8);

    // when dragging == true, the main dot goes to the mouse
    // and spins faster
    if (dragging) {
        xLoc = mouseX + sin(r*50)*5;
        yLoc = mouseY + cos(r*50)*5;
    }
   
    // draw particles
    for (var i = 0; i < particles.length; i++) {
      var p = particles[i];
      p.step();
      p.draw();
    }
   
    if (showText) {
      let words = 'control the dot with your mouse.       press A to attract, hold dot to repel.  hold spacebar to stop and control particles with mouse.';
      textSize(28);
      strokeWeight(1);
      fill(255,100);
      text(words, width/2, height/2, 
                  width/2+30, height/2+80);
      textSize(15);
      text('press x to remove message.', 2*width/5, 3*height/4);
    }
}

// controlling the behavior of the particles
function particleStep() {
    if (stop) {
        // when space is pressed, particle motion halts
        // and you can control them with the mouse
        this.x += 0.05*diffx;
        this.y += 0.05*diffy;
        this.dx = 0;
        this.dy = 0;
    } else if (attract) {
        // when 'a' or 'A' is pressed, particles are drawn
        // to the mouse
        diffxP = mouseX - this.x;
        diffyP = mouseY - this.y;
        this.x += 0.05*diffxP;
        this.y += 0.05*diffyP;
    } else {
        // if no keys are pressed
        this.x += this.dx;
        this.y += this.dy + cos(r)/5;
    }
    
    // bounce off right
    if (this.x > width) {
        this.x = width - (this.x - width);
        this.dx = -this.dx;
    // bounce off left
    } else if (this.x < 0) {
        this.x = -this.x;
        this.dx = -this.dx;
    }
    // bounce off bottom
      if (this.y > height) {
        this.y = height - (this.y - height);
        this.dy = -this.dy;
    // bounce off top
    } else if (this.y < 0) {
        this.y = -this.y;
        this.dy = -this.dy;
    }
  
    // If mouse gets close to a particle, particle becomes captured
    // and the number of captured particles increases.
    // Size of orbit is fixed, but the modifier of the angle is
    // randomized so that each particle's orbit speed is different.
    if (dist(this.x, this.y, xLoc, yLoc) < 20) {
      this.particleCaptured = true;
      capturedP += 1;
      this.orbit += capturedP;
      this.modifier = random(-1,1);
    }
  
    // This controls what a captured particle does
    // captured particles orbit the mouse.
    // I keep track of number of captured particles
    // because each newly captured particle's orbit
    // increases slightly so they don't overlap.
    if (this.particleCaptured) {
      this.x = xLoc + this.orbit*sin(r*this.modifier);
      this.y = yLoc + this.orbit*cos(r*this.modifier);
    }
   
    // Captured particles get launched outwards when dragging == true
    // Reset orbit of all captured particles
    if (dragging & this.particleCaptured) {
      this.particleCaptured = false;
      this.orbit = 5;
      this.dx = random(-5,5);
      this.dy = random(-5,5);
      this.x += this.dx;
      this.y += this.dy;
    }
}

function particleDraw() {
    stroke(255,150);
    strokeWeight(3);
    point(this.x, this.y);
}

// when mouse is pressed close to the main white dot, 
// freq of grid dots increases, 
// dragging == true,
// and # of captured particles resets
function mousePressed() {
    if (dist(xLoc, yLoc, mouseX, mouseY) < 3*diameter) {
        dragging = true;
        capturedP = 0;
        freq = 0.006;
        dotColor = 60;
    }
}

function mouseReleased() {
    dragging = false;
    freq = 0.001;
    dotColor = 35;
} 

// when keys are pressed, 
// variables become true and the program changes the behavior
// in the particleStep function.
// spacebar -> stop particles and control them
// a or A -> particles attracted to mouse
function keyPressed() {
  if (key == ' ') {
      stop = true;
  }
  if (key == 'a' || key == 'A') {
      attract = true;
  }
  if (key == 'x' || key == 'X') {
      showText = false;
  }
}  

function keyReleased() {
  if (key == ' ') {
      stop = false;
  }
  
  if (key == 'a' || key == 'A') {
      attract = false;
  }
}

function makeParticle(px, py, pdx, pdy) {
    p = {x: px, y: py,
         dx: pdx, dy: pdy,
         particleCaptured: false,
         orbit: 5,
         modifier: 1,
         step: particleStep,
         draw: particleDraw
        }
    return p;
}

Ankitha Vasudev & Mari Kubota – Final Project


Instructions:

Up- w key

Down- s key

Left- a key

Right- d key

WARNING: DO NOT TOUCH THE FIRE

The objective of the game is to avoid the wild fires and reach the plant at the lower right hand corner of the screen. If you reach the plant, the words “You Win” appear along with the button that leads you to the next level. If you touch the fire, the words “You Lose” appear along with a restart button. The game has multiple levels which get harder as you go due to the increase in the number of fires and the heightened speed of the character. The level resets without an increase in difficulty if you touch the fire. The game is meant to bring awareness to forest fires caused by climate change.

Note: click on the screen to start the game 

sketch

// Ankitha Vasudev and Mari Kubota
// 15-104 Final Project

// ghost position
var dx = 0; 
var dy = 0;
var posX;
var posY;

//ghost speed
var speed = 1;

//sapling postion
var xsap = 375;
var ysap = 370;

//fire 
var shapes = [];

//level number
var lvl = 1;

var gameOn = true;
var lose = false;

function setup() {
	createCanvas(400, 400);
    //Makes fires and puts into array
	for (var i = 0; i < 15; i++) { 
        shapes.push(makeShapes());
    } 
}

function draw() { //written together 
	background(178, 204, 163);

	//calls functions
	sapling();
	ghost();
	pressingKey();
	levelNumber();
	
	for (i = 0; i < shapes.length; i++) { 
        shapes[i].display();

        //Game Over route
		if (posX >= shapes[i].x & posX <= shapes[i].x+30 
		    && posY >= shapes[i].y-25 && posY <= shapes[i].y+20) {
		 	lose = true;
		    speed = 0;
		    resetButton();
		    gameOn = false;
	    }
	}
 		
        //You Win route
    if (posX >= xsap-10 & posY >= ysap) { 
    	noStroke();
    	fill(0);
		textSize(50);
		// winsound.play();
		text('You Win!', 100, 200);
		speed = 0;
		nextLvl();
		gameOn = false;
    }

    if (lose==true){
    	noStroke();
		fill(0);
		textSize(50);
    	text('You Lose', 100, 200);
    }
}

function pressingKey() { //by Ankitha
    //Ghost movements controlled by keys

	if(keyIsDown(87)) { //W key
		dy -= speed;
	}	
    
	if(keyIsDown(83)) { //S key
		dy += speed;
	}	

	if(keyIsDown(65)){ //A key
		dx -= speed;
	}	

	if(keyIsDown(68)){ //D key
		dx+=speed;
	}
}

function ghost() { //by Mari
    //Ghost character shape and constraints
	noStroke();
	fill(255);
	posX = 25+dx;
	posY = 17+dy;

	if (posX <= 7){
		dx += speed;
	}

	if (posX >= width - 7){

		dx -= speed;
	}

	if (posY <= 9){
		dy += speed;
	}

	if (posY >= height-14){
		dy -= speed;
	}

	ellipse(25+dx,17+dy,17,20);//head
	ellipse(25+dx,27+dy,5,10);//feet
	ellipse(20+dx,27+dy,5,10);//feet
	ellipse(30+dx,27+dy,5,10);//feet
	fill(0);
	ellipse(20+dx,19+dy,3,3);//left eye
	ellipse(30+dx,19+dy,3,3);//right eye
	strokeWeight(1);
	stroke(0);
	line(22+dx,23+dy,28+dx,23+dy);
}

function shapesDisplay() { //by Ankitha
    //Make fire shape using vertex
    strokeWeight(3);
	stroke("red");
    fill("orange");
    beginShape();
    vertex(this.x-5, this.y);
    vertex(this.x, this.y+20);
    vertex(this.x+20, this.y+20);
    vertex(this.x+30, this.y+20);
    vertex(this.x+40, this.y+10);
    vertex(this.x+30, this.y-20);
    vertex(this.x+25, this.y+5);
    vertex(this.x+22, this.y-20);
    vertex(this.x+13, this.y);
    vertex(this.x+12, this.y-20);
    vertex(this.x-5, this.y);
    endShape();
}

function makeShapes() { //by Ankitha
    //randomizes fire position 
    var sh = {x: random(-30,430), 
    	      y: random(50,340),
              display: shapesDisplay}
    return sh;
}

function resetButton() { //by Mari
    //Reset button when game over appears
	stroke(0);
	strokeWeight(2);
	fill("red");
	rectMode(CORNER);
	rect(115,360,75,30);
	fill(0);
	textSize(12);
	noStroke();
	text("RESTART",128,379);
}

function nextLvl() { //by Mari
    //next level button when you win
	rectMode(CORNER);
	strokeWeight(2);
	stroke(0);
	fill("green");
	rect(30,360,75,30);
	fill(0);
	textSize(10);
	noStroke();
	text("Next Level",45,378);
}

function sapling() { //by Mari
    //sapling (the goal)
	fill("green");
	strokeWeight(5);
	stroke("green")
	line(xsap,ysap,xsap,ysap+20); //stem
	noStroke();
	ellipse(xsap-10,ysap,20,10); //left leaf
	ellipse(xsap+10,ysap,20,10); //right leaf
	fill("yellow");
	ellipse(xsap,ysap+20,10,10);
}

function levelNumber() { //by Mari
	noStroke();
	fill(0);
    textSize(15);
    text("Level: " + lvl, 340, 20);
}

function mouseClicked() { //by Ankitha
    //mouse clicking on button resets the games
    //game over button LOSE
	if (mouseX<245 & mouseX>130 && mouseY>360 && mouseY<400 && gameOn==false) { 
		shapes=[];
		gameOn=true;
		lvl = 1;
		speed=lvl;
		makeShapes();
		for (var i = 0; i < 15; i++) {
        	shapes.push(makeShapes());
    	} 
    	dx=0;
    	dy=0;
    	lose = false;
	}
    //next level button WIN
	if (mouseX<80 & mouseX>30 && mouseY>360 && mouseY<400 && gameOn==false) { 
		gameOn=true;
		lvl++;
		speed=lvl;
		makeShapes();
		for (var i = 0; i < 15; i++) {
        	shapes.push(makeShapes());
    	} 
    	dx=0;
    	dy=0;
	}
}

Sammie Kim – Final Project – 12

For this project, I wanted to create a recycling game that educates all age levels upon proper recycling, which is one of the basic ways that we can all contribute to protect our environment. Through the process, I learned a lot, especially how there are a lot of trash items that are not recyclable—this emphasized the importance of reusing items and reducing waste in general. The user can simply explore the environment, drag any waste item and drop it in any of the waste bins below. If the waste is thrown in the wrong bin, information will automatically show up on the top to guide the user, while also giving extra tips for reducing such trash. 

sketch

//Sammie Kim
//Section D
//sammiek@andrew.cmu.edu
//Final Project

//Global Variables
var FOOD = 0; //Index number within the waste bin type array
var PLASTIC = 1;
var PAPER = 2;
var TRASH = 3;
var score = 0;
var styrofoamBox = createStyrofoamBox();
var tissue = createTissue();
var hanger = createHanger();
var newspaper = createNewspaper();
var pizzaBox = createPizzaBox();
var plasticBag = createPlasticBag();
var plasticBottle = createPlasticBottle();
var paperBag = createPaperBag();
var appleCore = createApple();
var coffeeCup = createCoffee();
var fishbones = createFishbones();
var toothpaste = createToothpaste();
var mirror = createMirror();
var bubblewrap = createBubbleWrap();
var foodBin = createFoodBin();
var plasticBin = createPlasticBin();
var paperBin = createPaperBin();
var trashBin = createTrashBin();
var wastes = [styrofoamBox, tissue, hanger, newspaper, pizzaBox, plasticBag,
              plasticBottle, paperBag, appleCore, coffeeCup, fishbones,
              toothpaste, mirror, bubblewrap];
var wasteBins = [foodBin, plasticBin, paperBin, trashBin];
//Boolean Variables
var correct = false;
var selected = false;

//Use objects to create different wastes and wastebins with specific traits
function createStyrofoamBox() {
    var styrofoamBox = {
        url: "https://i.imgur.com/Lb1P88W.png",
        initX: 78,
        initY: 102,
        x: 78,
        y: 102,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: TRASH,
        note: "Styrofoam is a non-recyclable material because it contains "
              + "polysteryene, which is non-biodegradable."
        }
    return styrofoamBox;
}

function createTissue() {
    var tissue = {
        url: "https://i.imgur.com/s6rZAJu.png",
        initX: 145,
        initY: 95,
        x: 145,
        y: 95,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: TRASH,
        note: "Dirty tissues should be thrown in trash."
        }
    return tissue;
}

function createHanger() {
    var hanger = {
        url: "https://i.imgur.com/dE1sDsn.png",
        initX: 253,
        initY: 163,
        x: 253,
        y: 163,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: TRASH,
        note: "Plastic hangers are not purely plastic, and their curved ends "
              + "can be problematic in recycling equipment. "
        }
    return hanger;
}

function createNewspaper() {
    var newspaper = {
        url: "https://i.imgur.com/FkD5sJK.png",
        initX: 0,
        initY: 253,
        x: 0,
        y: 253,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: PAPER,
        note: "Newspapers should be recycled in paperbin."
        }
    return newspaper;
}

function createPizzaBox() {
    var pizzaBox = {
        url: "https://i.imgur.com/ZRjCbEW.png",
        initX: 172,
        initY: 102,
        x: 172,
        y: 102,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: TRASH,
        note: "Pizzabox cannot be recycled due to its wet and greasy cardboard "
              + "that cannot be processed in recycling equipment. "
              + "It can also attract insects and rodents."
        }
    return pizzaBox;
}

function createPlasticBag() {
    var platicBag = {
        url: "https://i.imgur.com/PDtsB6D.png",
        initX: 94,
        initY: 172,
        x: 94,
        y: 172,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: PLASTIC,
        note: "Most recycling facilities can only handle rigid materials that can "
              + "be separated, so plastic bags and wraps are generally not accepted. "
              + "But we can always reuse them for collecting trash."
        }
    return platicBag;
}

function createPlasticBottle() {
    var plasticBottle = {
        url: "https://i.imgur.com/6OEa9bA.png",
        initX: 393,
        initY: 95,
        x: 393,
        y: 95,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: PLASTIC,
        note: "Empty plastic bottles belong in the plastic bin. "
        + "The better option is to carry reusable waterbottles."
        }
    return plasticBottle;
}

function createPaperBag() {
    var paperBag = {
        url: "https://i.imgur.com/QsPO9ph.png",
        initX: 364,
        initY: 153,
        x: 364,
        y: 153,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: PAPER,
        note: "Clean paper bags belong in the paper bin. Still, the best "
        + "option would be to reuse them."
        }
    return paperBag;
}

function createApple() {
    var appleCore = {
        url: "https://i.imgur.com/QX98sKU.png",
        initX: 274,
        initY: 258,
        x: 274,
        y: 258,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: FOOD,
        note: "Any type of leftover food belong in the organic waste bin."
        }
    return appleCore;
}

function createCoffee() {
    var coffeeCup = {
        url: "https://i.imgur.com/sys0QnS.png",
        initX: 351,
        initY: 87,
        x: 351,
        y: 87,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: TRASH,
        note: "Unlike most paper items, paper cups are usually coated in platic "
              + "to hold liquid to prevent leaking. "
              + "Although many cafes are beginning to use compostable cups, "
              + "the best option is carrying coffee mugs or reusable bottles."
        }
    return coffeeCup;
}

function createFishbones() {
    var fishbones = {
        url: "https://i.imgur.com/wju8gLe.png",
        initX: 205,
        initY: 264,
        x: 205,
        y: 264,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: FOOD,
        note: "Any type of leftover food belong in the organic waste bin."
        }
    return fishbones;
}

function createToothpaste() {
    var toothpaste = {
        url: "https://i.imgur.com/na3BnTw.png",
        initX: 104,
        initY: 260,
        x: 104,
        y: 260,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: PLASTIC,
        note: "Toothpaste tubes should be properly cleaned out before "
              + "being placed in the plastic recycling bin."
        }
    return toothpaste;
}

function createMirror() {
    var mirror = {
        url: "https://i.imgur.com/NAh1S2x.png",
        initX: 142,
        initY: 130,
        x: 142,
        y: 130,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: TRASH,
        note: "Mirrors cannot be recycled due to the coating used on glass "
              + "to make it reflective. Be sure to wrap broken mirror pieces "
              + "before throwing them in the garbage."
        }
    return mirror;
}

function createBubbleWrap() {
    var bubblewrap = {
        url: "https://i.imgur.com/cvJ1Iou.png",
        initX: 336,
        initY: 245,
        x: 336,
        y: 245,
        selected: false,
        stay: true,
        dragging: false,
        informing: false,
        type: TRASH,
        note: "Although many plastics are recylable, bubble wraps and bags "
              + "cannot be recyled due to their thin films that can get tangled "
              + "in recycling machines."
        }
    return bubblewrap;
}

function createPaperBin() {
    var paperBin = {
        url: "https://i.imgur.com/AgJIG61.png",
        x: 229,
        y: 342,
      }
    return paperBin;
}

function createPlasticBin() {
    var plasticBin = {
        url: "https://i.imgur.com/6x6FPJW.png",
        x: 117,
        y: 342,
    }
    return plasticBin;
}

function createFoodBin() {
    var foodBin = {
        url: "https://i.imgur.com/sSve89v.png",
        x: 8,
        y: 342,
    }
    return foodBin;
}

function createTrashBin() {
    var trashBin = {
        url: "https://i.imgur.com/jm4NMB8.png",
        x: 343,
        y: 342,
    }
    return trashBin;
}

function setup() {
    createCanvas(450, 480);
}

function draw() {
    //load images for background, wastes, and waste bins
    background(220);
    image(backgroundPic, 0, 0);
    for (var i = 0; i < wasteBins.length; i++) {
        image(wasteBinsPics[i], wasteBins[i].x, wasteBins[i].y);
    }
    //Show explanation on top of the canvas if informing is true
    for (var i = 0; i < wastes.length; i++) {
        if (wastes[i].informing) {
            fill(220);
            noStroke();
            rect(0, 0, 450, 60);
            fill(0);
            text(wastes[i].note, 10, 10, 440, 480);//wrapping text within canvas
        }
        if (wastes[i].stay) { //if stay is true, images are all shown on canvas
            image(wastePics[i], wastes[i].x, wastes[i].y);
            if (wastes[i].dragging) {
                //update waste with current mouse locations
                wastes[i].x = mouseX - wastePics[i].width / 2;//offset amount
                wastes[i].y = mouseY - wastePics[i].height / 2;
        }
      }
    }
    if (correct) {
        text("Correct!", 10, 20); //shows up when answer is correct
    }
    fill(255);
    text("Score: " + score, 10, 90); //show scoreboard
}

function preload() {
    //Preload all the images by pushing the objects' URL into new array
    var backgroundURL = "https://i.imgur.com/4jWCbcI.png"
    backgroundPic = loadImage(backgroundURL);
    wastePics = [];
    for (var i = 0; i < wastes.length; i++) {
        wastePics.push(loadImage(wastes[i].url));
    }
    wasteBinsPics = []
    for (var i = 0; i < wasteBins.length; i++) {
        wasteBinsPics.push(loadImage(wasteBins[i].url));
    }
}

function mousePressed() {
    //Use mousePressed to drag each trash item within the canvas
    //I created parameters for each trash image, so that the mouse can click
    //within the area of each trash image.
    for (var i = 0; i < wastes.length; i++) {
        wastes[i].informing = false; //Clear information when mouse is pressed.
        var x0 = wastes[i].x; //top left X coordinate
        var y0 = wastes[i].y; //top right Y coordinate
        var x1 = wastes[i].x + wastePics[i].width; //top right X coordinate
        var y1 = wastes[i].y + wastePics[i].height; //bottom y coordinate
        if (!selected & x0 < mouseX && mouseX < x1 && y0 < mouseY && mouseY < y1) {
            selected = true; //trash is selected within the image boundaries
            wastes[i].dragging = true;
        }
    }
}

function mouseReleased() {
    //Use mouseReleased to evaluate whether the chosen trash is
    //dropped into the correct bin.
    //Like previously, I created specific parameters for trashbin images.
    selected = false;
    for (var i = 0; i < wastes.length; i++) {
        if (wastes[i].dragging) {
            wastes[i].dragging = false;
            var corrBin = wasteBins[wastes[i].type];
            var corrBinPic = wasteBinsPics[wastes[i].type];
            var x0 = corrBin.x;
            var y0 = corrBin.y;
            var x1 = corrBin.x + corrBinPic.width;
            var y1 = corrBin.y + corrBinPic.height;
            if (y0 < mouseY & mouseY < y1) {
                //Since all trashbins have the same Y height, I differentiated
                //the correct bin by determining the X locations
                if (x0 < mouseX && mouseX < x1) { //Correct Bin
                    correct = true;
                    wastes[i].stay = false; //waste will disappear
                    wastes[i].informing = false; //information will not show
                    score += 1; //score is updated by one when answer is correct
                } else {
                    //if incorrect, information will show up, and
                    //the waste image will go back to its initial location
                    correct = false;
                    wastes[i].informing = true;
                    wastes[i].x = wastes[i].initX; //initial X coordinate
                    wastes[i].y = wastes[i].initY; //initial Y coordinate
                }
            } else {
                correct = false; //the default status
            }
        }
    }
}

Jacky Tian’s Final Project Proposal

For the final project, I’m going to design a “catch and run” game. There will be two “characters” in the game where one represents the cop and the other one represents the thief. Players need to use their mouseclick to control the movement of the “thief”. The mission of the “thief” is to collect all the coins floating in the canvas. There will be other elements such as bombs that can result in penalty if thief touches.

Cathy Dong-Project 12-Proposal

concept sketch

In the final project, I’ll be making a game that allows users to create their own De Stijl drawing. De Stijl uses abstract forms, such as vertical and horizontal compositions, and colors, such as black, and white, and prime colors. The project will be grid based and the users are able to choose grid complicity as needed. By clicking on the grids, they will be able to draw lines with various thickness and rectangle blocks with De Stijl colors. When the drawing is completed, they can hide the base grids with a simple key press.

Cathy Dong-Looking Outwards-12

de stijl drawing
de stijl drawing

I am inspired by de stijl movement. It’s a Dutch art movement founded in 1917. It emphasizes on pure abstraction and universality through a reduction to essentials of form, vertical and horizontal compositions, and color, black, white, and primary colors. The name of De Stijl comes from critic Theo Van Doesburg, and the most well-know artists are Piet Mondrian, Bart van der Leck and Vilmos Huszar. Architects such as Gerrit Rietveld, Robert van’t Hoof and JJP Oud applies this art concept to their architectural design. The projects that I admire the most are Rietveld Schroder House by Rietveld, and Eames House by Charles and Ray Eames.

CJ Walsh – Looking Outwards 12 – Precedent Projects

The two artists I have chosen to highlight for this Looking Outwards are Roz Dimon and Claudia Hart. Both are digital artists with work mainly in the areas of computation and graphic design. I found that their work relates well to the pieces that I want to create through a series of programs in my final project, which will explore collage, prints, and patterns.

Frog Pledge by Roz Dimon

I found the collage element of this project to be really intriguing. Dimon takes imagery from archive collections and uses custom programming to develop digital collaged elements that tell the story of the collections she has pulled from. In addition to being visual, these pieces also have audio and motion elements. I think as a standalone image and with the full experience the project is powerful and really fun.

Dimon’s work: https://www.rozdimon.com/

Augmented Reality Wallpaper by Claudi Hart

I thought this project was also very close to my goals for the final project. I really enjoy the combination of images and textures to create really dynamic prints. The other fun thing about this project was that it utilized augmented reality to create a user experience of viewing the wallpapers. As, with Dimon’s work, I really appreciate the fact that this project is a visual product and an experience.

Hart’s Work: https://claudiahart.com/

Overall I feel really inspired by these two pieces because of the extended element of designing an experience. It makes me consider what I could do with the programs that I generate to make them into more of an experienced piece of artwork. Both artists have a very distinct style and method, but at the heart the are both combining imagery and objects to create unique visual patterns and compositions.

Raymond Pai – Project-12-Proposal

Image result for plant brush tilt

For my final project, I would like to create a growing-plant drawing experience. It should predict the user’s next steps using their previous steps and randomly and gradually grow plant parts out of their strokes. It should also use inputs from the environment such as sound and light to change the ‘mood’ of the drawing. If possible, I want the drawing to appear three-dimensional. To push this further, I want the stroke to draw based on how the user moves their hand in front of the computer camera. For example, a simple finger-pointed movement in front of the camera would create a stroke, which the software would slowly ‘grow’ the branches and flowers from the stroke the user drew:

Kristine Kim & Min ji Kim Kim – Project 12-Proposal

For the final project, I am collaborating with Min Ji Kim Kim from Section A. Because this is our final project, we wanted to create something that was meaningful for both of us. We decided to create something related to Christinianity since it is an important part of our identities.

Our project is essentially an interactive “storybook”. We will choose 2-3 stories from the Bible and create interactive “pathways” that tell that Bible story. The user will be able to select which story they wanna play/learn about.

There will be a character on the screen that the user will be able to move using the arrow keys. As the character moves along the pathway, there will be objects appearing in the pathway and the background that the user can click on. These objects will either create a special effect on the environment or create a text box with the plot. The user will go through the rest of the pathway and once they reach the end, they will have finished that Bible story. We wanted to make it interactive and fun so that children can enjoy learning about the Bible. 

Read Min Ji’s post for more details.

Also, our inspirations are included in my Looking Outwards 12 .

Outline and plan for our final project
continuation of plan / diagram of our project.

Shannon Ha – Project 12 – Proposal

For my final project, I want to do something with sounds, more specifically, iconic sounds that we are accustomed to hearing through our daily usage of technology (think Apple startup sound, Intel sound, Netflix sound, Wii sound etc.). I want to create some sort of sound remix game that allows players to randomly press on keys to play the iconic sounds while some sort of interactive graphic related to the company that owns the sound will be displayed (kind of like Patatap). Another idea I have is to make a sound matching game where players have to match trimmings of iconic sounds to each brand/company that it is associated with by clicking on keys that will be linked to each brand/company. I don’t actually know if I am allowed to use these sounds (if there are copyright issues or not), so my final project will very much depend of which of these sounds I will be able to find free sourcing for.