Final Project

alanna reid
3 min readNov 30, 2020

What to do for my final project? Where do I start?

I have decided I would like to continue working with code and the web as the medium for my work. A friend sparked an idea with mention of a gumball machine. My idea is to continue with the “randomness” that I included in my tarot card website. The basic premise is that something different will come out of the gumball machine for each user, it may be a random object of sorts or a fortune, or something like a snapple fact. In my coding, I would like for the user to have to drag a coin over to the machine in order for it to work. The coin will cause the metal bit on the machine to rotate and something like an orb will fall out of the machine containing the user’s random item.

In class, Caroline had an idea for my piece that I quite liked. She said that for the orbs containing a random object like a “little frog or a robot chicken” there could be a message that says something like “you have received immortality”. I really liked the ominous aura that added to the cute little random object and I would definitely like to incorporate that into my project.

This is the start for my gumball piece. The idea is that I will be dragging the coin in the upper left corner (i might insert a picture of a quarter) to a slot in the stand of the machine. I am going to attempt to do this with the “while” and “mouseClicked” functions on p5js. This will allow the user to proceed with the rest of the functions. I am planning to add an “if” statement that won’t allow the user to do anything else until the coin is dropped into the slot. There will also be many more orbs within the glass of the machine in a variety of fun colors. I definitely have my work cut out for me :).

Now that I have figured out the array for my orbs as well as being able to drag the coin to the slot, I need to begin working on coding my actions that are dependent upon the coin being placed into the slot. As Lindsey suggested, I am going to write myself some pseudo-code and then begin working on changing it into code for the program.

I feel stuck. I am struggling to bring my pseudo-code to life. I don’t know how to create a sequence of actions that are all dependent on something else happening before. I need my sound to play when the coin/token is in the slot. Once that happens, I need a new orb to form behind the little gray square and fall onto the ground. Once I figure all that out, I think I will be set for the rest of what I am trying to do. All the easy stuff is done, and not being able to figure out the rest will completely destroy my project. It won’t make any sense until I can figure out the hard parts. I am frustrated.

--

--