Hi !!:wave: Welcome to our game project "Flappy Block":icecream:
We are Liu Yitao and Zhang Yuxiang 🤓
Here are some introductions about our game:popcorn: Hope you can enjoy it! :beer:
One day 🏙️ , a dog named BAILEY 🐩 was caught in a factory🏭 and packed into a magical cardboard box📦 . It is pretty difficult for him to escape from the box, so he decides to use the magic of this box to run this strange factory.
1.1: Strange factory:
-
There are countless moving walls in this factory. They are called "obstacles". Fortunately, each wall has a gap, but the position of the hole is random. Over time, the factory automatically controls the wall to speed up. Players need to control the jumping trajectory of the carton to make the carton through these gaps. Note that anything that touches any wall will be grabbed back to the starting point.🍻
-
Here is a possible situation:
Players should control the box by using 'space' to pass through the gaps in the walls from left to right. Whether it hits obstacles or the upper and lower boundaries will die.
1.2: Magic time:
-
Feel difficult? Magic time will help you!!! During the Magic time, all obstacles will disappear :P
-
Here is something about it you have to know:
- Press 's' during the game to use it
- The effect will only last for a few seconds
- The number of times you can use will be reduced by 1 each time you use it, and your remaining times can be viewed in the "Magic numbers" in the upper right corner of the game. Every once in a while you will get an extra chance
1.3: Black box:
-
A black box is a weird thing, if you touch it or pass around it, your gravitational field will reverse!!
-
Here is something about it you have to know:
- It will be randomly generated in the map. no fixed time and no fixed place :(
- Gravity field reversal means that if you do nothing, the block "free-falls" upwards, and only "jumps" downwards when you press space.
- If you accidentally touch it, don't worry, its effect will only last for a few seconds, after a few seconds, your gravity field will return to normal. : )
- If your gravity field is reversed, the color of the block will change from yellow to rose red (pictured below). After a few seconds, your color will change back to yellow and the gravity field will return to normal
- Randomly generate the locations of the wall's gaps. ( Requirement 1 covered )
- Linearly increases walls movement speed.
- Using the space bar to control the jumping of the carton.
- Function that could control the movement of the box and print it out.
- Individual files to control the functions, including printing the box and walls, control the movement of box, random number generation, ranking the scores, etc. ( Requirement 5 covered )
- Use data structures like array to store the game board and the wall position. ( Requirement 2 covered )
- Use dynamic memory to set up a ranking list(unknown length) for the history of scores. ( Requirement 3 covered )
- Use file input to use the random wall position which is stored in another file; use file output to output the score to the ranking file for ranking. ( Requirement 4 covered )
To start the game:
- Compiled on Ubuntu Linux 18.04(maybe)
- Quick start:
./main
- If there are some warning, try to: (There will be several errors during compilation, please ignore it, it will not affect the compilation result)
make clean
make main
./main
- we used a non-standard C/C++ libraries named "conio". We use it to determine whether there is data in the buffer, in other words, whether we have input.
Hope you can enjoy it!!!!