1、 毕业设计 ( 论文 ) 题目 基于 DirectX 的飞机大战游戏 (C+版 )的开发与设计 英文题目 The development and Design of Aircraft war game Based on DirectX 学生姓名 张连泉 学号 09111629 指导教师 蒋年德 职称 副教授 专 业 软件工程 东华理工大学软件学院 二零 一三 年 三 月 九 日东华理工大学软件学院毕业设计(论文)摘要 2 摘要 飞机游戏是一款风靡全球的电视机游戏和掌上游戏机产品,曾几何时,它创造了一个无法企及的游戏巅峰,也曾影响了一代产业链。虽然它辉煌的业绩在历史的涡轮中渐渐远去,但这款游戏每
2、每提及,总会令人爱不释手,魂牵梦绕 。 这款游戏的名字叫做 ,它是运行于 Windows 操作系统下的一款 2D 游戏,以 C/C+为开发语言, 构建于 Microsoft Foundation Class Library(MFC)框架体系中,其中 调用了部分的 Win32API 函数接口,在 Visual C+6.0 环境下使用 DirectX(SDK)软件开发包来开发的一款多媒体游戏 。 随着硬件性能的不断提高,游戏的日益普及, DirectX 开发包的更新和完善,使开发者不在需要过多的关注不同的硬件设备。 本论文着眼于 DirectSound, DirectDraw 的运用,开发出仅由于
3、理论研究的二维平面射击类游戏。 本文首先分析了电脑游戏的发展历史,然后分析了制作游戏的基本流程和游戏本身所要包 含的哪几种元素以及游戏应具备的游戏层次。根据 2D 游戏的特点和游戏的角色,以及给用户呈现的游戏界面的特效,对 2D 图形技术, Windows 图形界面编程技术 GDI,DirectDraw 的显卡接口和 DirectSound 声卡接口以及 MVC 设计模式下的 MFC 框架等技术进行了比较仔细的研究。 通过自定义一个游戏类 CGame,封装了游戏元素的基本属性和行为,这样便于在用到游戏的 行为操作是,只要轻松的产生 CGame 对象便可直接调用其方法,也有利于当升级为双人游戏,
4、网路版时,只需要在该类中添加相应的行为便可。当我们向用户呈现 游戏运行的界面时,通过 Timer 时钟控件,映射到相应的 处理函数,使得游戏界面大约每 2 秒钟刷新一下界面,这样才能 让一张位图背景图片具有动态效果。当使用 DirectSound声卡接口时,我方和敌方相互射击所发出的声音,都是在时钟映射函数调用时处理的。 【关键词:】 C/C+; VC+/MFC; 飞机大战游戏 东华理工大学软件学院毕业设计(论文) Abstract 3 Abstract Airplane game is a popular global TV game and handheld game products,
5、once upon a time, it creates a game out of reach peak, have influenced a generation of industrial chain. Although it brilliant performance in the history of turbine faded away, but the game is often mentioned, cuddly, always miss. The games name is , it is running on Windows operating systems, a 2 d
6、 game, with C/C + + as development language, building on the Microsoft Foundation Class Library (MFC) framework, which invokes the part Win32API function interface, in the Visual C + + 6.0 environment using DirectX software development kit (SDK) to develop a multimedia game. With the constant improv
7、ement of the hardware performance, the rising popularity of the game, DirectX development kit update and perfect, make developers dont need too much attention to different hardware devices. The use of this thesis focus on DirectSound, DirectDraw, developed only due to the theoretical research of two-dimensional plane shooting game. This article first analyzes the development history of