P5.js is a JavaScript library that allows it’s user to create interactive experience with code. Naturally, I gravitated toward trying to make a simple game with it. The biggest hurdles I had was creating movement for my game. Because of the draw function, which is a forever loop, I can easily can an interactive picture with one or two interactions. Doing more than that becomes far more difficult, since the function updates each instance of what I want to do when example A tries to move up or down without my own input. Since things happens on a grid with an identifiable X and Y location, example A will have to be updated through these location from the forever loop and may not interact with other things on the screen since it through a technicality, the code does not see the presented interacions.
Nevertheless, through constant patience and testing of trial and errors, I was able to make a semi-functioning pong game which I presented to the teacher. In it, the player controls the paddle and has to move it left or right so that the ball can touch it and bounce upward again. Sometimes, because of the previous-mentioned problem, the ball would either not interract with the paddle and force a lose state, or it interracted to much with it to force a win state. Still, this was an experience worth learning on introducing the difficulties of codes and game making.