This week was a rough one for me due to poor time management, and sadly I didn't leave nearly as much time as I would have liked for this week's assignment. However, I did have a lot of fun creating my first game in p5.js, so that's something! It's not very visually interesting in my opinion - nor is the single gameplay mechanic stellar by any means, but I think it's a decent application of the learning material this week.
I was inspired by Dan's suggestion in this week's lesson make something float this week. I thought a balloon would be a fun and graphically simple object to subject various types of forces on! I also thought it would be fun to use manual input to generate said forces, and what better force than your own breath would be used to keep a balloon in the air?!
The best way I could think of to implement the use of ones lungs in this sketch is to use the microphone. I create a vector that uses the registered mic volume, which allows you to move a balloon away from deadly obstacles that threaten to pop it. To make the game harder, I created another wind-like force that constantly pushes the balloon in the opposite direction to your breath.
What Didn't Work:
I had a lot of ideas I wanted to implement in this sketch, but I simply struggled with figuring out exactly how to implement them. I thought I would add some more difficulty to the game by randomly generating other obstacles that make it harder for the balloon to travel upward, but I would then have to design more collision into the game and was a bit unsure how to go about doing that past what I did for the walls.
I also wanted to have the opposing wind vector value be randomly generated, but I found it was difficult to map the mic range with a random value and still have the game be winnable as I found that even minute changes can make the game impossible to win, so I spent a lot of time tuning the values to make it work well (at least on my headset mic).
Thoughts For The Future
If I had more time and wanted to expand on this game, I would try to create a level system where the wind vector value would increase slightly each level and maybe the radius of the balloon would get larger to make it harder to control. Adding in a surface area variable to create drag would also have been an interesting forces to play with. Furthermore, I think adding a bit of wobble or pendulum swinging would have given the balloon a more realistic motion - but I'm not really sure where to start with that, I guess adding a vector that controls rotation would have done it.
Another interesting factor could have been to integrate real weather wind speed so if you play on a windy day, you probably cant win. But if you play on a calm day, you can play forever.
What I Learned:
This was a tough week, my eyes are far bigger than my stomach and sometimes my ideas feel limited by my technical coding abilities, but I'm really enjoying learning about physics and trying to visualize/simulate these ideas. I honestly think learning these concepts along with learning to code is a really brilliant pairing.
Comments