Mid-Term Project

Concept 

For the Midterm Project, I initially started with a museum-like idea but as I focused more on the aesthetics and the picture I had in mind, it started looking like an old library room. I went with a friendly user interactivity experience, where a person experiences a calm and peaceful experience in a tiny underground library, where they could explore some books and have a few reads. I decided to encompass mostly positive quotes from historical figures from different backgrounds as well as Quranic verses. I also decided to include Greek temples and lanterns that hopefully align with parts of European culture and Arab Muslim culture as well.

 

Code Highlight 

The most part I struggled with is representing the quotes randomly as the user clicks on the bookshelf. I first placed an array inside the code itself but I kept getting multiple errors and unpleasant results, hence I decided to move the quotes in a CSV file and split the quotes at a semicolon, similar to how data visualization is implemented. I’m still facing one issue, the quote is being displayed twice, for the time being, I just left it there as a reflection but hopefully would figure out the mistake I made.

function room1_quotes() {
  fill(currentColor[0], currentColor[1], currentColor[2]);
  stroke(currentColor[0], currentColor[1], currentColor[2]);
  strokeWeight(10);
  rect(260, 260, 320, 220, 20);

  // Inside the book
  noStroke();
  fill(193, 154, 107);
  rect(270, 270, 300, 210);

  fill(0); // Set text color to black
  textSize(15); // Adjust text size as per your requirement
  textAlign(LEFT); // Change the text alignment to LEFT

  let textX = 270 + 10; // X-coordinate of the text
  let textY = 270 + 10; // Y-coordinate of the text
  let textWidth = 300 - 20; // Adjust the width to leave some margin
  let textHeight = 210 - 20; // Adjust the height to leave some margin

  // Loop through the quotes and display them as paragraphs

  for (let i = 0; i < selectedquotes.length; i++) {
    text(selectedquotes[i], textX, textY, textWidth, textHeight);
    textY += textHeight + 10;
  }
}
Reflection 

This assignment was definitely time consuming in my experience. It took me a while to figure out a lot of things, especially that I’m not very used to working with classes. I looked at random examples online that did not necessarily do anything I implemented but gave the solution to some of the problems I faced like presenting quotes randomly, and having images change but not rapidly. However, I learned a lot from coding this project, it compelled me to spend a good amount of time trying to understand how each code snippet affects the other and what might be causing glitches or any lags. It certainly made me more confident about my ability to implement something I envisioned, even though its not everything I wanted, but I’m pleased with what I have.

References

 

Leave a Reply