Preface
I haven't written C ++ for several yearsCodeToday, my friend asked me a C ++ question. Why can't I think of the answer. Haha. So now I want to write down a C ++ game that I wrote in my sophomore year. Otherwise, I will probably forget it ......
Effect
Start the game with a pop-up screen:
Then there is the main game interface:
After the game started, a fat little rabbit squatted on the rotten Lawn:
The time was too short. At that time, even the rolling background was not done.
Click the left button and the rabbit pops up. You can use the mouse to control the direction of the rabbit so that it falls above the bell, so that it will continue to jump to the higher Bell.
Jump the first bell for 10 minutes and the second for 20 minutes. If the bell is not attached and the rabbit falls to the ground, the game ends:
Program
Developed based on the MFC framework, the game mainly contains two packages: engineclasses and myclasses (hey, I was still using my ...... ).
Engineclasses is a class that can be used in other games. It is considered a general game engine, which contains some instructor code. Myclasses is the main class in this game. The relationship is as follows:
The main logic of the game is in the Manager class. Crabbit uses a specially manufactured class csprite to complete some special functions. The cbell Bell class and cbomb explosion effect class all use the same scheme and inherit from the cgenericsprite in the engineclass package. The cbells and cbombs classes are a collection of cbell and cbomb.
In fact, looking at the code of this game is very simple and there is no special design. However, after a week, the final result is still good. It is also the only C ++ program I have stayed for so far.
Code download: Http://files.cnblogs.com/zgynhqf/code.rar
Sorry
I apologize to the four beautiful women in the group, especially the group leader haishen. :)
Sorry, this game was originally made by a group. However, it seems that everyone means to let me do it by myself, and I am actually writing all the code by myself. Dizzy. In fact, I think it is really not team spirit. Although no one of you blame me, I am sorry. In any case, everyone should do it together. :)
Thanks
Thanks to my college teachers, there is no reason.
Thank you, Tom, for your roommate. Thank you for your materials. Thank you for recordingScream when the character goes down......
Miss university time ......