【正文】
用開發(fā)包里的方法來實現(xiàn)一個游戲背景的顯示。 國內(nèi)外研究背景無論是在國內(nèi)還是國外,游戲編程已經(jīng)成為了一種時尚,許多程序員都忘我地投入到其中,他們其中有很多人不光是為了盈利,也有很多是純粹為了興趣,許多著名的游戲編程員本身就是狂熱的游戲玩家,所以,無論是國內(nèi)還是國外,誕生了很多經(jīng)典的游戲,其中利用 Visual C++作為開發(fā)平臺的更是不勝枚舉,但是由于我國的游戲編程相對于國外起步較晚,所以在很多地方還存在不小的差距,甚至成了很多游戲軟件業(yè)比較發(fā)達(dá)的國家的游戲加工廠。 code reuse目 錄 論文總頁數(shù):26 頁1 引言 ......................................................................1 課題背景 ..............................................................1 國內(nèi)外研究背景 ........................................................1 本課題研究的意義 ......................................................1 本課題研究的方法 ......................................................12 游戲軟件的現(xiàn)狀和 VC 的概況 .................................................1 中國游戲軟件的現(xiàn)狀 ....................................................1 C++簡介 ...............................................................2 MICROSOFT VISUAL C++簡介 .................................................3 利用 VISUAL C++開發(fā)游戲簡介 .............................................33 開發(fā)環(huán)境介紹 ..............................................................3 開發(fā)環(huán)境 ..............................................................3 關(guān)于 ALLEGRO............................................................44 游戲程序的開發(fā) ............................................................4 游戲的思路和構(gòu)想 ......................................................44.1.1 游戲想法的產(chǎn)生 ....................................................44.1.2 對游戲設(shè)計的初步認(rèn)識 ..............................................44.1.3 模塊成型階段 ......................................................4 程序的類結(jié)構(gòu) ..........................................................5 游戲的實現(xiàn) ............................................................54.3.1 主類 Level 的實現(xiàn) ..................................................54.3.2 Object 類的實現(xiàn) ...................................................114.3.3 Plane 類的實現(xiàn) ....................................................124.3.4 Player 類的實現(xiàn) ...................................................144.3.5 Enemy 類的實現(xiàn) ....................................................154.3.6 Bullet 類的實現(xiàn) ...................................................164.3.7 Prize 類的實現(xiàn) ....................................................175 程序設(shè)計過程中遇到的一些重要問題 .........................................18 關(guān)于碰撞的問題 .......................................................18 關(guān)于游戲畫面的問題 ...................................................21 關(guān)于玩家控制的問題 ...................................................23結(jié) 論 .....................................................................24參考文獻(xiàn) .....................................................................24致 謝 .....................................................................25聲 明 .....................................................................261 引言 課題背景現(xiàn)今,游戲軟件已經(jīng)成為盈利最高的軟件之一,而且還在向著復(fù)雜化、大型化發(fā)展,其中,很多由 Visual C++作為開發(fā)工具的游戲都取得了巨大的成功,比如暴雪公司的《魔獸爭霸》系列和《魔獸世界》 ,這說明 Visual C++開發(fā)游戲具有一定的優(yōu)勢。關(guān)鍵詞:飛行模擬;多態(tài);代碼重用Design and realization of a flight simulation game based on VCAbstractThe appearance of puter game has represented the naissance of a totally new sort way of entertainment. At present, the puter game has attracted a great deal of players by its unique charm. Along with the game industry flourishing, more and more people has joined the profession of game development. Game development has covered many contents including programming, literature, history, music, arts ,etc. Eliminate the significance of market value, game develop is quite important to the culture evolution of our nation to be a special kind of creativity culture production. Game is indispensable to the chain of culture industry. The design based on the develop package and the game frame which already exist uses Microsoft Visual C++2022 to be the platform. These develop package and game frame has raveled out the problem which relate to image and sound effect perfectly. The main task of the design is to add classes that planed by oneself to the game frame, to actualize the function which the design have to realize. When we carry through the classes design, use the inherit and derive function, we need to enable a majority of code can be reused, aim to actualize polymorphism, at the same time. It is necessary to use virtual function in the baseclass, to make pointer can point to the member which has the same name in the subclass more convenience, afterwards, utilize the develop package to realize the demonstration of game background, finally obtain a flight simulation game which can run on Microsoft Visual C++2022, and there’s no seriously bugs especially that can make the game crash when running.Key words: flight simulation。設(shè)計在利用已有的開發(fā)包和已有的游戲框架的基礎(chǔ)上,采用 Microsoft Visual C++2022 為開發(fā)平臺,這些開發(fā)包和框架已經(jīng)完美地解決了游戲圖像和音效方面的問題,設(shè)計的主要工作就是向框架中添加自己所設(shè)計的類,用于實