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.