Project 7 Bitmap Game
Description
I originally wanted to make a game that symbols my daily life: balls represent different kinds of pressure fall from the sky and I’m standing on a lever, trying to keep balance. However, when I search for game characters online, I saw a cute dinosaur I love. I decide to make my bitmap game a story of a dinosaur at the Cretaceous period.
The rule is very simple. The player needs to try his or her best to stay on the lever. The character won’t be hit by the comets, but the lever will. When the lever is hit by the comet, it will lose its balance, and that will make the character fall off.
Design Process
I made a lot of sketches helping me think about how to write the code, but most of them don’t work. My original thought is to make the lever in p5 more like a lever in the real world. However, the system is too complicated, I feel I can’t create using those code I have learned.
I found a library called matter.js which is the perfect tool to recreate the physical system in p5, but noticed I can’t manipulate the code in a short time…
I decide to stick with the code I have learned. I like how my game looks right now, but I hope I can detect the distance between my character and those balls. The problem I’m facing now is how to access a certain variable of an element. When I put all balls in the array, they all show as “Balls.” However, I can’t access certain variables.
Reflection
1.It is easier to handle if I start with class.
2.Variables must be put into “()” when I need to use that variable in another class.
*Try to fix the element's variable in array problem
*Try matter.js!