Concept
What’s wrong with how are you?
There is nothing wrong with asking or answering how are you, so to speak. It’s just a way to break the ice, to open the conversation. It’s just a filling word for an empty greeting.
There is nothing wrong with how are you, but replying to or initiating countless ‘how are you’ every day can be overwhelming. I want to generate a piece that speaks to this kind of social anxiety. Also I realized that I have never played with text before so this will be a nice chance.
As user presses their mouth, the sentences are going to enlarge to occupy the whole screen, creating the sense of suffocation. While enjoying the simplicity brought by B&W, I utilize a lot of randomness to make the page look too dull. The inspiration of the basic design comes from this example I found on p5.js website.
Highlighted codes & improvements:
Base on how we generated the bouncing ball, I created the words class in the word.js and called all the functions we set up in the sketch.js. Thanks to this Youtube tutorial, I also learned how to do fade-in fade-out action which is essential for my code.
// Method to fade in the word (255=black) fadeIn() { if (this.alpha < 255){ this.alpha = this.alpha + this.fadeSpeed; // Increase transparency } } // Method to fade out the word fadeOut() { if (this.alpha > 0) { this.alpha = this.alpha - this.fadeSpeed; // Decrease transparency } }
I’m not entirely sure how to keep the text within the edges. I might run another if statement to improve that in the future or just by putting limits on this.x? Also, it would be interesting if the user could click on something to trigger the decrement of the sketch.
Things I wanna try out in the future: 2D collision and blendmode in color.