MidTerm Idea

Consept

My initial idea had was to make a game that consist of randomness. in this class we discussed many topics and something that stuck out to me was randomness. it is both wonderful and frustrating. the main idea that i have is a maze that you can solve only by luck instead of skill. so you can reach a stop for example and only be able to pass it by flipping a coin and landing on heads. this maze will be very frustrating since you cant rely on skill its more of a game of chance.

It will be more complex than this with a character and diffrent sections that make you reach the next trail. it will be like Hercules trails if they were based on luck.

Elements

the game will have

  1. the objects we learned with the maze
  2. the character is unable to move thru the walls
  3.   the trails start when the character reaches them
  4. if the character fails they start from the start

the project will contain

  1. sound when losing or through the trail (example the sound of flipping a coin)
  2. instruction page
  3. a dash board to shoe progress
  4. a start button
  5. a game over condition
  6. control over the character
  7. speech from the trails
  8. if you win a celebration command

I know this sounds relatively simple but I am  sure it will be very  challenging

Self-portrait

Concept

my self-portrait was based on me playing football. this is the first coding assignment that i have done and has been challenging. i used the diffrent shapes that we have been learning to come up with something that doesn’t really resemble me but, it kind of does what i would be doing on the weekends. i used diffrent things we learned in class to come up with the design.

Code.

I used the fill command to find the diffrent colors  that i wanted for my kit and shoes. and used the arc command for my hair. i used the loop function to make the ball move looking like i kicked it.

 

 

Lab Three- The Sun

Concept 

My initial idea was to create this one with the hydrogen that is in a different color bouncing around. I enjoy the writing the code I had some challenges with adding the number of bouncing balls that I wanted inside of the ellipses since I would run into the problem of them being stuck either at the top or the bottom. I came up with this idea since in class only worked with a random bouncing ball bouncing around the screen, I initially wanted to look at it if it’s trapped in a certain area. this idea then developed and to thinking what artwork would work with this and I came up with the idea of this sun. the piece itself is interactive so if you click on the background it changes from day to night.

initial design

this evolved to my idea of the sun

Code

I used the mouse background that we learned in class to change the background between day and night. I added an ellipse to form the sun and created a class for the bouncing balls to randomly bounce around the ellipse. I added array to control the amount of hydrogen that I wanted inside the sun

let ball= []; 
 let ball2

function setup() {
  createCanvas(400, 400);
  for (let i= 0; i< 3; i++){
    ball[i] = new BouncingBall(i+1, 2);
  }
   ball1 = new BouncingBall(2, 2);
  ball2 = new BouncingBall(8, 10);
}

function draw() {
  if (mouseIsPressed ) {
    background(color(54));
  } else {
    background(color("#33A1FD"));
  }
 // background("#33A1FD");
  fill("#F79824")
  ellipse (width/2, height/2, 200, 200)
  noFill()
  fill("#FDCA40")
  for (let i= 0; i< 3; i++){
  ball[i].move();
  ball[i].collision();
  ball[i].draw();
  }
  ball2.move();
  ball2.collision();
  ball2.draw();
}



class BouncingBall {
  constructor() {
    this.xPos = width / 2;
    this.yPos = random(100, 300);
    this.xSpeed = 4;
    this.ySpeed = 7;

  }

  move() {
    this.xPos += this.xSpeed;
    this.yPos += this.ySpeed;
  }

  collision() {
    if (this.xPos <= 150 || this.xPos >= (width - 150)) {
      this.xSpeed = -this.xSpeed;
    }
    if (this.yPos <= 150 || this.yPos >= (height - 150)) {
      this.ySpeed = -this.ySpeed;
    }
  }
  
  draw() {
    circle(this.xPos, this.yPos, 30);
  }
}

What i could improve 

I am happy with my work since my first-time coding, I feel like it’s something I wouldn’t have been able to achieve prior to this class. However, I would have liked the night sky to have some stars and I would have added lines to the sun to make it look more realistic. since hydrogen is usually arc shaped rather than balls that would have made it look more realistic and better.

 

Loops

Concept 

My initial design wanted to consist offer piece that is resembled modern art. I was trying to find loop designs to inspire what I had in mind. I decided to go with this piece of art since the lines dropping from the top kind of symbolize a cage. While the rain that flows shows the idea of gloominess that I was going for. the ball in the middle is vibrant and is just going back and forth Finally escapes the screen. The ellipses on top and on the bottom are constantly Still in the background I placed randomly put ellipses.  so while the majority of the painting remains constant there is always something in the background that’s different for every individual.

Methodology 

Firstly, I created the function for the ellipses I used in the background. Then I use the draw function to create both the lines and the rain. Additionally, I created the moving ellipses and give it the coordinates on where to start and stop and I did not want it to blend in with the background rather to create a line to show its path I kept in the print code I used to just give a bit of word play to the art piece

Things I Could Improve On

I initially wanted the rain pattern to go fall not only they diagonally to the right but also the diagonally to the left. I also wanted the major ellipses in the middle to have an opposing one falling from top to bottom. I was thinking of also making more ellipses Forming an X shape but I thought that would ruin the piece.