基于OpenGL的简单3d游戏的设计与实现
姓名
系别、专业
导师、职称
完成时间
目录
摘要 Ⅰ
Abstract Ⅱ
1 OpenGL概述 1
OpenGL的特点及功能 1
OpenGL工作流程 4
OpenGL绘图流程 4
2 系统分析与设计 5
6
7
3 OpenGL的配置 7
7
4 基础类的实现 7
7
8
9
10
BMP图像文件格式 11
11
12
5视角控制 12
12
12
13
6 游戏场景设计 16
17
19
7 模型设计 24
模型概述 24
MD2格式说明 24
25
读取MD2文件方法的实现 26
游戏运行截图 27
注释 30
参考文献 31
致谢 32
摘要
随着电脑进入千家万户,人们对电脑游戏的要求也越来越高,而3D游戏正满足人们对这方面的需求。人们对游戏的画面,动画的逼真度,易操作性以及游戏的思想,故事情节越来越重视。许多大型的3D游戏大部分都产自国外,而国内目前对3D游戏的制作还不够成熟,特别是一些游戏画面的逼真度,还有游戏的制作思想,以及游戏的可玩性都尚有不足。近几年国内制作的3D游戏也慢慢上了轨道,在这方面要加大对培养制作游戏人才的力度,力争做到像《魔兽世界》一样水平的3D游戏。目前使用openGL实现其游戏画面方面的效果还是主流之一。本课题就是基于Visual Studio 2005 平台的3D游戏,虽然目前的程序有些简单,但这是为制作复杂3D游戏打下基础。
本游戏主要由四个部分组成:视角控制,天空,地面和模型载入。首先要建立一些系统必备的基础文件,如各种头文件载入的一个文件集合Stdafx,以方便其他文件调用函数库里的文件(如OpenGL库文件,数学函数库文件等)。在此基础上建立一些如字体类(组要用来显示数字的),向量类,位图载入类和系统基础框架类等系统运行必备的一些基础类。建立好了这些游戏运行必备的一些基础类后,我们就可以建立天空类,地形类了。然后用一个SkyAndTerrain把这两个文件封装起来。
关键词:电脑;3D游戏;OpenGL;Visual Studio 2005
Abstract
puters in every household, people are demanding more and puter games, whereas the 3D game is to meet the needs of people in this area. People on the game screen, animation is realistic, easy to operate and game ideas, more and more emphasis on storyline. Many large-scale 3D game produced in most foreign countries, while domestic production of the current 3D game is not mature enough yet, especially the fidelity of the game screen, there are the production thought the game, and gameplay are still enough . In recent years,domestic production of 3D games are slowy on the track,in this context to increase the production of the game on the train personnel,and strive to be like”WOW”,the same level of 3d gaming. Current openGL game screen area to achieve its effect is one of the mainstream. This issue is based on Visual Studi
【毕业设计】基于opengl的3d游戏的设计与实现 来自淘豆网m.daumloan.com转载请标明出处.