Midterm Progress

Concepts I had throughout:

Working on my midterm, I had multiple ideas for games. I thought of the snake game, and flappy bird, and the bouncing ball game. While the idea for the program for all the games didn’t seem too difficult, I wanted to focus more on the game rather than choose based on difficulty. I thought the snake game was too common and it wouldn’t be unique and wouldn’t really mean anything to anyone. Next, flappy bird was actually pretty cool and I think doing its code would’ve exposed me to different types of functions from the reference in p5js and I liked that. However, I settled on the bouncy ball game, especially because I thought it relates to most of the content we covered throughout the course and I liked that because it helped me review everything we did so far. The bouncing ball was also a concept covered in the video tutorials by TheCodingTrain which was really helpful to me.

Coding Process

I started my program by brainstorming what functions and variables I would need. I figured out which functions I needed for my code and then planned in which order I would code them in, and where exactly I would use each variable. This really helped the whole programming process as it helped me organize everything and figure out where exactly the bugs I ran into are. Moreover, it helped me learn from my mistakes. (I cannot post my code progress because I am doing this after finishing the final product).

Midterm Project – Sky Bounce Game

https://editor.p5js.org/merna.rakkad/full/kFdTOWJAb

Concept:

The concept of this game was to bring back a game I used to play as a child. I lost this game when I was young and couldn’t find it ever again, even after going to many lengths to find it. While the game I created isn’t exactly the same, it still reminds me of my childhood and brings back many childhood memories. Once I realized I could create a game on my own, this was the first thing I thought of and I was elated to start working on it.

As I grew up, I realized the specific game I played was probably deleted, and this made me want to attempt to recreate it to bring it back to other kids, and remind other young adults of our near childhood. The outcome did not exactly fully represent the game, but it is close enough and still brings me the same enjoyment I got as a child.

How it works:

The way this game works is basically a ball that bounces off a platform. If you miss the platform, you lose. As the game progresses, the speed of the ball increases and the platform gets smaller, making it harder and harder to win. The winning score is 12, since after 12, it becomes impossible to win as the platform will simply cease to exist.

I am proud of the OOP I used in this project because it is one of the things I struggle with the most.

Problems I ran into:

I ran into many bugs in this project, some that I even could not fix. For example, the sound I inputted into the game would not input, and the restart button would disappear based on whether the sound works or not. Moreover, sometimes the ball would not bounce or it would move in a straight line. These are bugs that happened randomly and are not consistent.

Assignment 3 – OOP

https://editor.p5js.org/merna.rakkad/full/fLiO5Qym8

Concept:

Coding using OOP was more difficult than I expected it to be, but with practice it ended up being as easy as the rest of the concepts. Learning OOP from scratch with no background in coding generally confused me a little because it was completely different and included many new functions and concepts, but doing this assignment helped me understand it; OOP felt very simple by the end of the assignment.

The concept of this program is simple, it is yet another artwork. I intended to make something that was visually pleasing and coordinated, and OOP helped me do that.

Using different creative names helps keep the code entertaining, for example when I used circir, that helped me store the different names and parts of the code in my head without being bored.

A problem I ran into was getting the constructors to work, my code kept crashing and the website would lag and I’d have to repeat the entire process again. After redoing the code though, I finally understood that my problem was with the syntax and I fixed it.

 

Assignment 2 – Loops

https://editor.p5js.org/merna.rakkad/full/LpG1LkHo3

Concept:

I just started learning about loops and how to use them recently, and so, once I realized how they work and how I can make the most appealing projects with them, I started playing with the code and making different shapes and colors. In this project, I created art using shapes that are not really identifiable, but the way I did it was, I created circles that increased and decreases in size constantly, which resulted in the shape that came out.

I felt really proud after doing this following part of the code. As I’ve previously mentioned, I have not worked with loops or conditionals before, so getting this done and getting it to work was really a milestone for me and I am really proud ofit

while (x <= windowWidth) {
let r = random(255);
let g = 0;
let b = random(255);
fill(r, g, b);
ellipse(x, y, wed, hei);
wed += widinc;
hei += heiinc;
if (wed > 200 || wed < 100) {
widinc *= -1;
}
if (hei < 100 || hei > 200) {
heiinc *= -1;

Moving on, I feel very confident after this assignment that I will be able to implement concepts and ideas like this in bigger projects like the midterm. Mastering the art of loops and conditional statements opens the doors to many different creative opportunities and projects.

Assignment 1 – Self Portrait

https://editor.p5js.org/merna.rakkad/sketches/qsRQY7gfy

My concept

As this was my first time coding or creating any type of output like this, I found this assignment to be slightly difficult, and tried to express myself as much as I could.

This picture represents who I am on multiple levels. I moved to the UAE when I was less than a year old, and grew up here. However, I always saw Egypt as home. I only visit Egypt for 2 months a year, yet every year, I build a stronger connection with it and I grow to become even more patriotic. This self portrait is a way for me to describe how I feel when I am away from Egypt: indifferent. I love living in the UAE, but Egypt will always be where I feel most comfortable, like I’m right where I’m supposed to be.

The line represents how disconnected I feel from my family over there when I am in the UAE. It feels like there is a barrier between us, and between my home and I. (The 3 triangles represent the pyramids 🙂 )

A highlight of some code that I’m particularly proud of

I am not necessarily proud of a specific part of my code, since it is mostly coding shapes and their dimensions, but finding accurate dimensions was very time-consuming and I’m proud that the dimensions ended up looking normal.

Reflection and ideas for future work or improvements

For my next assignment, I hope I will be able to add interactivity or movements in the code to make it look better and to be able to express myself more. For example, in this assignment, I wanted to move the stickman over to Egypt and back, with the indifferent face changing to a happy one, but I was unable to. Next time, I hope I can apply ideas like this.

Sketch- N/A.