基于OPENGL的3D游戏设计摘要:随着时代进步,从简单的色块堆砌而成的画面到数百万多边形组成的精细人物,游戏正展示给我们越来越真实且广阔的世界。对于近几年游戏的发展来说,老式2D游戏的画面、游戏性、互动性已经无法满足各类玩家的需要,而3D游戏无论是在游戏画面的真实程度、操作的流畅程度、以及故事背景方面的优越性都非常突出。在这种发展趋势下,2D游戏所占领的市场将会变得微乎其微,3D游戏的开发将会成为整个游戏制作领域的一种趋势。针对于3D游戏开发,OpenGL作为一个3D的应用程序编程接口(API)来说,是非常合适的。OpengGL作为与硬件无关的软件接口,只要操作系统使用了OpengGL适配器就可以打到相同的效果。它又是一个开放图形库,在跨平台领域上非常便利。并且它具有优良的移植性,是广大3D游戏开发者的首选。本论文为利用OpengGL进行3D射击游戏的设计与开发,采用碰撞检测、粒子系统、MD2模型绘制、3D声效等技术,最终实现一个射击游戏。关键词:游戏,基于OpengGL,三维,射击游戏DesignThe3DGameBasedonOpenGLAbstract:Alongwiththeprogressofthetimes,finecharactersfromsimplecolorswatchbuiltthepicturetothemillionsofpolygons,thegameistoshowusmoreandmorerealandthewideworld.Forthedevelopmentofthegameinrecentyears,theold2Dgames'screen,gamesandinteractivehavebeenunabletomeetallkindsofgameplayerneeds,while3Dregardlessofthegameonthegamescreenreality,smoothoperation,andthebackgroundofthestoryofthesuperiorityisveryprominent.Inthistrend,2Dgameoccupiedmarketwillbecomeverylittle,thedevelopmentof3Dgameswillbecomethegamemadeatrendinthefield.For3Dgamedevelopment,OpenGLastheapplicationprogramminginterfaceofa3D(API),isaverysuitable.OpengGLastheinterfaceofthesoftwareandhardwareindependence,aslongastheoperatingsystemusestheOpengGLadaptercanreachthesameeffect.Itisalsoanopengraphicslibrary,cross-platforminareasveryconvenient.Andithasgoodtransplantation,isthe3Dgamedeveloper'schoice.Inthispaper,thedesignanddevelopmentof3DshootinggameistouseOpengGL,thecollisiondetection,particlesystem,MD2model,3Dsoundrenderingtechnology,theultimaterealizationofashootinggame.Keywordsgame,OpengGL,3D,shootinggame西安石油大学毕业设计(论文)目录1引言............................................................................................................................................................11.1课题的背景及意义........................................................................................................................11.2毕业设计的任务............................................................................................................................11.3国内外现状的研究........................................................................................................................21.4开发技术与开发平台....................................................................................................................31.4.1开发技术..............................................................................................................................31.4.2开发平台..............................................................................................................................32OpenGL简介与3D图形学相关.............................................................................................................52.1OpenGL简介.................................................................................................................................52.1.1OpenGl特点.......................................................................................................................52.1.2OpenGL功能......................................................................................................................62.1.3OpenGL渲染......................................................................................................................72.23D图形学相关..............................................................................................................................82.2.1向量与矩阵.........................................................................................................................82.2.2变换.....................................................................................................................................82.2.3投影.....................................................................................................................................82.2.43D裁剪...............................................................................................................................93游戏设计.................................................................................................................................................113.1游戏的组成..................................................................................................................................113.2游戏的结构..................................................................................................................................113.3本游戏设计..................................................................................................................................124关键技术.................................................................................................................................................154.1摄像机漫游..................................................................................................................................154.2碰撞检测......................................................................................................................................164.3粒子爆炸....................................................................................................