ICM Week 10 Pixel Array Project with Jan

For our pixel array project Jan and I were inspired by two pieces of art, the Treachery of Images and John Baldesarri’s “I will not make anymore boring art.” We wanted to recreate the pipe image with text pixels that read “this is not an image.” Once we got that working we decided to decode the image in red. When you type the letters in the words, they reappear in their original pixels.

First we had to load all of the pixels of the original image. We wrote a for loop to go through each pixel and take the color value. We created an array with the letters that are in “this is not an image.” After that, we re-project the letters over the image with a condition. This condition is whether or not each text variable has been typed yet. This is found in the special p5 function keyTyped. We flip each variable every time it is pressed. If it has not been pressed it starts out red. Once it is pressed it displays the original color of the treachery of images.

Below is our keyTyped function and Letter class we created to store the information of each letter pixel.

Below is the link to the final sketch:

https://editor.p5js.org/wpolitan/sketches/07Zl925Z_

Smash the Pumpkin ICM

I cleaned up the game play on my Smash the Pumpkin Halloween midterm game. Now, the array of pumpkins never gets larger than 200. This way the smashed pumpkins are still in rotation. This makes the game harder but also fixes the overloading array issue. Before the game would eventually slow down because the array was being pushed to forever. Now the game runs smoother and is more enjoyable.

I achieved this through two pieces of code. First, I limited the array size seen here.

I also needed to recycle the pumpkins back to the bottom after they reach the top.

Below is the game play for the cleaned up version!

Below is my final source code for the whole project.

Looking back on my first blog post I can say that I have come a long way in solidifying my understanding of basic coding concepts. While I used to do some C# coding in unity a few years back, I figured out that I really needed to reinforce more of the basics than I had expected. This has helped me conceptualize and think about future projects, now having the base understanding. In my first blog post I also expressed a desire to learn more about the internet of things and incorporating more into my code. This was achieved through serial communication and seeing my 10print design changing with a potentiometer. That was an extremely gratifying experience and I hope to only build and bridge my skills and classes more.

The landscape of code is vast, and I believe that there are harmful elements. Although coding itself is not to be blamed. I think back to Ken Perlin’s discussion in our Applications course where he talked about human nature being the cause for how bad systems can be in place. The technology is just a tool and not inherently bad, although unfortunately used in harmful ways. And just like any other tool it can also help me be more creative. I find it is very helpful to bring my artistic sensibilities to different platforms as well. This includes P5 sketches, installations, interactive art, etc. I am excited for the future and all of the projects to come.

ICM Week 6

This week I set out to make a Halloween themed game. While it still needs a lot of work, I’m happy with my use of classes and am excited to build upon that. It is a very simple smash the pumpkin game, where there is a particle system creating an array of pumpkins. They are randomized and generate from the bottom of the screen upwards. The cursor is turned into a hammer, and when you smash a pumpkin the image updates to a smashed pumpkin. Also once you hit 50 smashed pumpkins, they shrink to half the size. I need to find a way to update my distance function for when the shrinking happens. I was having trouble getting it to update without throwing the program into some kind of infinite loop.

Here are some photos of the game in addition to the main source code.

https://editor.p5js.org/wpolitan/sketches/rO3QkvRB4

ICM Week 5

This week we talked about defining our own functions, and tidying our code. While I slightly changed the look of my project from last week I made a lot of changes within the code to expand on what I was trying to do. I originally set out to make an interesting 10print example using triangles instead of diagonal lines. This week I implemented a for-loop instead of an if statement for the actual 10print horizontal printing functionality. I then wanted to further randomize things with some sort of user input. I thought using an object I call “color” would be a fun way to change things up. That way while it is printing different triangular shapes I used the mousePressed function to change the colors being printing. As I continue to expand on these ideas I will be making it more user interactive and intuitive how to change the shapes and the amount times it runs.

I also added a new argument to my printing functions called “times” which dictates how many times each function will run. This became interesting when I realized that if I call two functions in draw at the same time, the spacing would actually be different because they are being drawn together. This created crazier patterns and is an interesting idea to try and expand on in the future. Below are some examples of the resulting images and new code.

ICM Week 4

This week I wanted to focus on creating a simple algorithmic design that iterates, and changes over time. I was really inspired by the 10print example. Instead of using diagonal lines I wanted to incorporate more colors, so I used triangles with fill. I loved watching the program move in rows and grow. I also wanted it to keep changing once it hits the bottom. I began experimenting with different colors and transparencies. Below are some examples of the iterations I went through and the final code.

https://editor.p5js.org/wpolitan/sketches/iAmFy4oRB

ICM Week 3

For this week’s project Neta and I attempted to make a breathing exercise. We start on the home screen, where we see a prompt that asks how you are feeling. There are two black circles to choose from. When you hover over either circle another prompt appears. “Are you anxious?” or “Feeling good?” If you choose feeling good, it takes you to our exit function. If you choose, anxious it take you to the breathing exercise. This is what the graphics look like.

We originally wanted the circle to inflate while the cursor is hovering, and then stop itself after four seconds. This is where we ran into some issues. We couldn’t get the circle to stop without ending the If conditional. When we did set it to start deflating, it would get caught in a feedback loop at its maximum size. I think by controlling the circle with different variables it could’ve helped us achieve what we wanted. I think a “for loop” could’ve helped too but it is not something we have figured out yet. We did get a slider on the exercise page to turn the background from yellow to pure white.

We then added a smiley face instead of the cursor on the exit function for aesthetics.

Below is the code for the home screen.

We also built on the game state changing in my last project to change when options are clicked.

Here is a link to the final project.

https://editor.p5js.org/wpolitan/sketches/pQPpAOTp0

ICM Week 2

I’m very interested in making games so I decided to focus my project on calls to action and level building. I used simple commands like dragging your cursor over an object, to get the user to trigger an action. I then wanted the game to call a new function to do something else. I made levels for this.

Here I built in the four stages of the project.

These are all the variables I defined
Here you can see I collected the amount of time the user has been clicking, then triggering the next level.

https://editor.p5js.org/wpolitan/sketches/CLdarbmJv