Link to my Project:
The basic idea of this project is to develop the assignment we have had called rainGame. The purpose of this assignment was to give us a chance practice class. So far, I have not used class in my projects, so I would love to build classes in my final project.
Instead of collecting raindrop, I want to generate a game of a person collecting food:
-Four type of food will drop from the sky: hotdogs, wings, legs, and dumplings.
-If the player misses the food, it will stay on the floor and constrain your space to move. And food will only drops within the space player is able to move. If there’s no more place to move, game over
-When the player “eat” 30 food, you win; however, there will also be bombs falling down. If the player eats the bomb, game over
To further develop the game, the background will various based on data from weather API and time.
The color of sky will become lighter from 6 am to 2am, then gets darker from 2 to 7pm. After 7, the sky will just be dark blue. Then when cloud coverage is bigger than 0, there will be clouds on the sky. The gap between each cloud depends on API value of cloud coverage. If cloud coverage equals to 0, there will be no clouds but a sun. While there is cloud, little raindrop will also show up if humidity value is greater than 90%.
Process:
At first, I let the food that players misses stay on the ground, and the player can still go through the food. This made me think about how we avoid the food on the ground instead of stepping on it, so I came up with the idea to restrain the space to move. It was not hard to use constrain function to set a range for mouseX; however, setting the specific value was not easy until I use imageMode(CENTER). When I first learn about all the Mode() such as rectMode(); I did not pay attention to them; nevertheless, through the course, I notice more and more how useful they are. And I also learned how essential practice are.
2. Sketches:
I tried to use 2D for loop to draw raindrops; however, the program get stuck with that. So I use single for loop to draw less raindrops instead.
3. Final screenshots:
This is the screen when the player wins the game
This is the screen when the player encounters the bomb
This is how it looks when cloud value is 0. The player is during the game, the center shows how many food player has ate
This shows the screen when there is no space to move.
References:
I was inspired by a meme popular in China. It’s a guy eating a hotdog. So I drew the player and food on my iPad and then load png files into p5js. I was also inspired by an illustrator on instagram called nu1t. He adds all kinds of illustration to photography, making objects and foods much more vivid. So I decided to add a sad face to my food when they are on the ground. The Food class in my project was refer to class in rainGame. Then I created subclass extends Food class and a bomb class. Before this project, class was very abstract to me; however, after playing around with its function, inheritance, methods, I became much familiar with classes and objects. I’m really excited about exploring more about classes in the future!
https://furtech.typepad.com/furtech/2009/01/is-humidity-100-when-it-rains.html
http://www.aihami.com/a/gongkai/xuexi/381464.html
http://tieba.baidu.com/p/5943310030https://www.openprocessing.org/sketch/476152
https://www.apixu.com/doc/current.aspx
https://www.teepr.com/231886/annezheng/可愛食物01/https://www.instagram.com/nu1t/
You must be logged in to post a comment.