Creative Coding Week 2
For my homework this week I had to create a shape and give it some sort of emotion. I decided to go with a cube that was a little bit of an introvert.
The main idea was that when you get a little close to it, it'll freak out a little bit, then run away... just like real life!
At first, I had some issues where the hitbox for my shape was too precise causing a lot of unresponsive like issues.
To solve that I found a sample in the p5js example sketches called "mouse functions" by p5 (link in comments of code).
It used an if statement with four statements that checked to see if the mouse X and Y were within the shapes upper and lower X and Y.
I used some simple code that we learned in the last class to keep the box in bounds and put in some random values to make the box jump to less predictable directions.
The next thing I wanted to do was to make the cube turn a shade of red when you got closer, I used some simple math that got the absolute value of the difference between where the mouse was and the cube and had it change some of the RGB values.
I also tried to practice around and used functions and variables where ever I could so I made some text embedded in some functions as well as an event where if u hold down the mouse click, the cube's personality does a 180 and becomes introverted and a little spaztastic and green.
The last challenge was that I wanted to have some animation principal implemented, before someone does an action, there's usually a little bit of a wind-up, in this case, the cube is instantly startled before jumping farther away, but to do that I needed some sort of delay before the second movement or it would be all merged into one movement. That's when I got some advice from Professor Scott and learned how to set up a timer.
The Art of Interactive Design: A Euphonious and Illuminating Guide to Building Successful Software By Chris Crawford Chapter 1 Response
I never thought too much about interaction. To me, it was the thing that separated video games from a passive activity like watching a TV show or movie. When I try to define interaction, it’s putting in an input, and getting and output. But then there was the refrigerator example, and I have a really hard time thinking of a bulletproof argument that separates a simple video game and a very complicated refrigerator… Maybe fridges are more interactive than they seem. Sure they don’t have super complicated processing but they do fit my definition of interactive. I guess I would have to agree that it shouldn’t be just binary and maybe there should sort of tier list for interactivity. So maybe a fridge with different ice settings and could communicate with your smart home would be in a different category from one from the 20s. Boiling a subject like interactivity down in a philosophical way I think can help up understand the idea more and derive more from it. I never thought of categorizing different activities as reaction and participation and how much I could relate to talking with terrible conversationalists. It does come down to talking with someone on equal grounds for higher levels of interactivity. As someone who has had to talk with engineers, socially awkward folks, slow, or old people, it really takes the fun out of conversations, which makes that listen, process, respond thing true. Maybe it’s when interactivity is high in a conversation that makes it enjoyable just like why games are fun too. The last thing I want to touch upon is the idea of UI/UX design. I can see a very high-level graphic designer working closely with an excellent engineer to make some great products but I think Chris has a point that a skilled interaction designer hybrid type would outclass the duo. Better yet, I would just have all three of them on a team with the interaction designer at the helm, meshing all the abilities together if I could. But having both skills in a good ratio is a pretty hard thing to do and quite the unicorn of a person to come by if they are. I also don’t think rugs are interactive… maybe unless you run around on them with socks to shock someone, beat the dust out of it in the yard, or live in Aladdin’s whole new world.home