摘 要
随着计算机技术的发展,电子游戏的形式越来越丰富,用户对于电子游戏的娱乐性需求也越来越高,追求更加真实的感官体验成为电子游戏的一条发展趋势。作为虚拟现实领域的一项的综合应用,3D游戏已经在电脑、手机、机顶盒等多平台得到了普及,相对于传统的2D游戏,3D游戏让用户感觉更融入,更加享受,但所依赖的计算机技术也更加复杂,计算机图形学、物理仿真等都成为3D游戏开发所需要的重点研究方向。我国在电子游戏领域的发展与领先国家还具有一定的差距,为了振兴本国电子游戏行业,对这一项综合应用所涉及的技术进行整体的梳理是完全有必要的。
论文按照从设计到实现,从理论到应用。首先介绍了3D游戏的一般技术框架,之后围绕一款基于Unity3D的小型的无人机驾驶游戏,使用Unity3D支持多个平台,可方便引入各方面插件。在游戏设计和实现阶段,先简单介绍了游戏的创意,接着设计了整个游戏的的整体结构,并将游戏系统主要分为图形渲染、物理仿真、网络同步等模块,图形渲染使用Unity3D中OpenGL插件,使得游戏可以运行到手机平台,为了更精确、更快速处理无人机的物理仿真,使用了PhysX来对车身及场景进行物理设计,着重涉及到碰撞检测、车身刚体及轮胎的悬挂系统的概念及算法,并且增加界面设计及网络模块使得用户增加互动性。论文的最后对游戏做了一定的分析,在执行效率及可玩性做出了改进展望。
整个游戏系统各模块之间接口灵活且耦合性低,且运行效率高,虽然属于小型游戏,但涉及的技术点较为全面,可以为同类问题提供参考。
关键字:Unity3D,游戏,图形引擎,物理引擎,PhysX,无人机驾驶
Abstract
With the development of computer technology, the form of electronic games is more and more abundant, and the entertainment demand of users for electronic games is higher and higher. The pursuit of more real sensory experience has become a developing trend of electronic games. As a comprehensive application in the field of virtual reality, 3D games have been widely used on many platforms, such as computers, mobile phones, set-top boxes, etc. Compared with traditional 2D games, 3D games make users feel more integrated and enjoy. But the computer technology is more complex, computer graphics, physical simulation and so on have become the important research direction of 3D game development. China in the field of video games There is still a certain gap between the development and the leading countries. In order to revitalize the domestic video game industry, it is absolutely necessary to comb the technology involved in this comprehensive application.
From design to implementation, from theory to application. This paper first introduces the general technical framework of 3D games, then around a small UAV driving game based on Unity3D, using Unity3D to support multiple platforms, can easily introduce various plug-ins. In the stage of game design and implementation, the paper introduces the creativity of the game, then designs the whole structure of the game, and divides the game system into graphics rendering, physical simulation, network synchronization and other modules. Graphics rendering uses the OpenGL plug-in Unity3D to enable the game to run on the mobile platform for more precision. The physical simulation of UAV is processed more quickly, and the physical design of body and scene is carried out by using PhysX, with emphasis on collision detection, concept and algorithm of suspension system of body rigid body and tire. And the interface design and the network module make the user more interactive. At the end of the paper, the game is analyzed, and the performance efficiency and playability are prospected.
The interface between the modules of the whole game system is flexible, low coupling and high efficiency. Although it belongs to a small game, the technical points involved are relatively comprehensive, which can provide reference for similar problems.
Keywords: Unity3D, game,graphic engine, physical engine, PhysX, automobilism
目 录
摘 要 I
Abstract II
一、 绪论 1
(一) 研究背景和研究意义 1
(二) 国内外研究现状 1
(三) 论文组织结构 2
二、 3D游戏技术的知识系统 2
(一) 3D图形库 2
(二) 物理引擎 5
(三) Unity3D 8
三、 无人机模拟飞行游戏的设计 11
(一) 游戏创意 11
(二) 游戏框架结构设计 13
(三) 游戏层次结构设计 14
四、 无人机模拟飞行游戏的实现 15
(一) 场景渲染实现 15
(二) 场景物理仿真实现 21
(三) 无人机动力学模拟 22
(四) 用户图形界面实现 24
(五) 网络联机模块实现 27
五、 游戏展示与性能分析 28
(一) 游戏展示 28
(二) 性能分析 30
六、 项目总结 32
(一) 总结 32
(二) 下一步工作的展望 33
参考文献 34