Rabbit jump Bell (remember a game originally written)

Source: Internet
Author: User

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 ......

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.