Job 4-desktop ice hockey game Software Design (Preliminary)

Source: Internet
Author: User

Icehocky-table ice hockey game feature introduction

Desktop : the desktop coordinate system's origin is set in the positive center, the x-axis to the right, the y-axis downward, the four-axis frame is the border, the ice hockey bounce back (after the collision speed about the collision surface normal symmetry), up and down two hole for the ball hole.

ice hockey : With the parameters speed and angle, respectively, the size and direction of the ice hockey movement.

Display Parts : Displays the position speed information of ice hockey, batter, etc.

To Add features : Change the desktop, ice hockey and other size parameters to add the start, End interface;

Increase the scoring function;

The velocity calculation after the collision between the batter and the ice hockey player;

Consider simplifying the function, just to accept information such as location speed and then visualize it;

        

animated schematic :

(Desktop video GIF animation made by software screentogif)

Summary :

Involved in more details, need to try more practice to master the various modules of QT function;

There are many errors in the whole function, the speed of the calculation is not strict, collision detection is not dependent on the physical engine, no mathematical physical model support, only rely on the QT item Collision detection implementation;

The idea of a data interface is important, and if you have two classes that need access to every other when you use them, you can simply create pointers to the other class in your own class, passing pointers as constructor arguments when instantiated. Private members that cannot be accessed directly should add additional interface functions, and the transmission of data and information can be realized by means of signals and slots, shared memory, Dbus, etc.

  

Code GitHub Link: https://github.com/tangyuanjie/iceHocky

Job 4-desktop ice hockey game Software Design (Preliminary)

Related Article

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.