HGE Source Explor 0x0

Source: Internet
Author: User

This article is ready to start HGE game engine code reading, in fact I have read the HGE code, here will be ready to re-read the code. Reading the code will prepare the code to be read apart, read each function separately, and prepare as follows:

Window of the game

For any program, a window is required, so the most basic game is a window. Then we find hge about the Game window section, learn more about this section. (Window King: I am the foundation of Everything OH.) )

Input information for the game

For a game, interaction is also necessary, since it is necessary to interact with the player's input. Here we can see hge about the input section, create the input events and then, of course, wait for processing. (input June: where is your mouse slide!) Feed! )

Loading of the game's resources

This part of the game is also necessary, because the game in the expression of pictures and music, it is this part behind silently support the entire supply of resources. (Load June: Hum!) Not for the game, for the players you! I'm going to lick the girl in the hard drive, PRPR .

Graphics rendering of the game The core !

(DX June: It's my turn to debut!) This part is the main part of the whole engine, because no graphics you play a bird. So in this section you will describe the entire image from the hard drive file to the screen graphics, allowing you to see the whole process of the image moving up. (Load June: Hum!) Not the resources I gave you. DX June: You are my heart, you are my liver, you are my 3/4, how can less you. )

The audio system of the game

For the game, if there is no audio that is not the world that the deaf see, this is not the world we want to create. So, audio is a must. HGE audio is not implemented by itself, using the Bass.dll Audio library. Implement your own interface by calling. (Audio June: Do you want to hear the moaning of the sister?) Want to enjoy the momentum of the symphony? So you want to achieve me)

Miscellaneous

The engine actually has a few modules on it, and then there are the miscellaneous ones left. For this part, because in the previous procedure you will encounter this part of the help, so in the previous module mentioned in the corresponding. This part of the content is also very important! Here are some of the following: information storage (INI file read/write in hge), error information input and output, and information management of power supply (I don't know what power information management is for, anyway.) ), Time control (two poi), a time to master the game is very important, because the timer and many other events to time.

Tool classes in the HGE

In this case, we will build the tool class on the basis of the original engine, which is the tool which can be easily developed later. (That's not the way to make it easy.) )

Next, I'll read the entire code in part, and in the process, I'll slowly visualize the process in the order I read the code. 1 after the completion of the section, we can get a window of what the game needs, 2 parts completed, you can start to determine the input ! Here you can determine whether the button is pressed, mouse movement and so on, 3 part of the completion, seemingly can not be reflected immediately, but we can still view the resources of information, etc., 4 part of the completion, the engine is basically completed, the completion of this section can start to try to do only the graphics the game, regardless of the audio, 5 part of the completion, it is able to appear sound , 6 part of the completion of the entire HGE game engine source code to the end.

As the final end, is also 7 parts, here we will see the particle generator , on the basis of the engine to complete the final program.

Figure 1: Engine module

Figure 2: Engine run

Let ' s go!

HGE Source Explor 0x0

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.