Write your own game: Flappy Bird

Source: Internet
Author: User

recently prepared to use spare time to write small games, strengthen the use and understanding of design patterns, first choose from Flappy Bird this simple game to start, the implementation of a super simple version. Develop language C + +, schema MFC, image processing using GDI.
First, about Flappy Bird

"Flappy Bird" is a work developed by Dong Nguyen, an independent game developer from Vietnam, in which the player must control a bird that crosses the barrier of water pipes of various lengths, and this bird is not flying at all ... So players every click on the bird will fly higher, do not click on the drop, the player must control the rhythm, touch the screen point of time, so that the birds can jump in the moment of falling, just can pass through the narrow gap of the water pipe, as long as a little distraction, immediately will fail to die. Simple but not coarse 8-bit pixel screen, Super Mario game in the water pipes, eyes a little sluggish birds and a few white clouds, daytime night two modes constitute the game of everything. Players need to constantly control the frequency of tapping the screen to adjust the bird's flight altitude and landing speed, so that the bird smoothly through the screen to the right of the gap. If the bird accidentally touches the tube, the game is over.

Two detailed design 1. Material (1) Game background

  

(2) Bird

①②③

(3) Well pipe

2. Functional Analysis Mind Mapping

  

3. Detailed design class diagram (1) Transparent Bitmap encapsulation class

  

(2) Overall class diagram

  

Three-effect

  

  

  

Four code download

Flappybirddemo:https://github.com/lizoo6zhi/DataStructure.Demo.CPlus

Write your own game: Flappy Bird

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.