登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

基于Unity 3D引擎的在线多人动作冒险游戏设计与实现毕业论文

 2021-11-02 09:11  

摘 要

在如今的互联网时代,游戏行业的发展极为迅猛。中国如今已经成为世界最大的游戏市场,发展前景难以估量。本课题针对该需求,学习并研究了目前使用最广泛的Unity3D引擎,并基于该引擎设计并实现了一个2D多人联机动作冒险游戏。本游戏中玩家可以控制角色进行移动跳跃,和同房间的其他玩家一起合作,通过躲避多种敌人的攻击以及各种陷阱最终抵达终点。

本课题主要工作:

1.学习研究Unity3D引擎及其脚本实现。包括Unity3D引擎基本组成及其功能,Unity3D的脚本核心Mono的基本原理,Unity3D提供的API及其常用成员功能等内容。

2.针对游戏功能需求,制作游戏场景,角色,UI界面等内容。设计游戏基本结构,游戏循环流程,根据整体流程以及角色控制需求利用Unity3D引擎提供的API实现UI系统,角色移动,场景切换等具体功能。

3.从AI行为需求出发,设计游戏中敌人的AI行为树,根据其行为逻辑设计并实现具体功能。其中使用了A*算法实现敌人对玩家追击过程中的自动躲避障碍物和自动追击效果,以及射线向量运算实现敌人对玩家的观察行为。

4.从网络联机需求出发,利用服务器引擎Photon,设计多客户端之间的信息交互与传递。通过服务器在客户端之间传递各玩家角色的位置状态信息,实现基于状态同步的网络联机。并通过Photon引擎框架实现能够创建,搜索,加入房间的功能。

关键词:Unity3D,C#脚本,游戏循环,AI,服务器引擎

Abstract

In today's Internet era, the development of the game industry is extremely rapid. China now has become the world's largest game market. The development prospect is inestimable. However, the rapid development of the market will inevitably be accompanied by the rough manufacture of products, and huge amounts of funds have made people blinded, thus giving birth to a large number of poor quality products. It is very meaningful to make games with technology, content and experience. In response to these needs, this subject has studied and studied the most widely used Unity3D engine, and designed and implemented a 2D multiplayer online action adventure game based on this engine.

The main work of this topic:

1. Learn to study the Unity3D engine and its script implementation. Including the basic composition and function of the Unity3D engine, the basic principle of Unity3D's script core Mono, the API and common member functions provided by Unity3D and other content.

2. According to the game function requirements, make game scenes, characters, UI interface and other content. Design the basic structure of the game, the game circulation process, and use the API provided by the Unity3D engine to implement the UI system, character movement, scene switching and other specific functions according to the overall process and character control requirements.

3. Starting from the needs of AI behavior, design the enemy's AI behavior tree in the game, and design and implement specific functions according to its behavior logic. Among them, the A * algorithm is used to realize the automatic avoidance of obstacles and automatic pursuit effects during the enemy ’s pursuit of the player, and the ray vector operation is used to realize the enemy ’s observation of the player.

4. Starting from the requirements of network connection, the server engine Photon is used to design the information interaction and transmission between multiple clients. The server transmits the position and status information of each player character between the clients to realize the network connection based on status synchronization. And through the Photon engine framework to achieve the ability to create, search, and join rooms.

Keywords: Unity3D, C # script, game loop, AI, server engine

目录

摘要 III

目录 V

第1章 绪论 6

1.1研究背景及意义 6

1.2国内外研究现状 6

1.4论文主要研究内容及研究工作 6

1.5论文的组织结构 7

第2章 unity3D引擎技术研究 8

2.1 unity3D引擎相关技术简介 8

2.2 unity3D脚本技术简介 9

第3章 基于unity3D引擎的动作游戏设计与实现 15

3.1 场景与地图设计 15

3.2 人物移动,跳跃控制与动画Animator设计 18

3.3 敌人AI设计 22

3.4 UI设计 34

3.3 实验优化与结果分析 37

第4章 基于服务器引擎的网络联机 42

4.1 服务器引擎相关技术简介 42

4.2 网络联机功能设计与实现 43

4.3 实验及结果分析 47

第5章 总结与展望 48

5.1 总结 48

5.2 展望 48

参考文献 49

致谢 50

第1章 绪论

1.1研究背景及意义

近年来,由于计算机技术的迅速发展,人们休闲娱乐方式的方式也越来越多样化,游戏成为当今风靡的娱乐方式,游戏类型百花齐放,玩家选择丰富多彩。游戏也继电影之后被人们认可,称其为第九艺术。第三方平台伽马数据发布《2019中国游戏产业年度报告》显示,2019年我国游戏市场实际销售收入2330.2亿元,同比增长8.7%,位于世界首位。游戏行业用户规模持续扩大,而如今5G时代即将到来,云平台的诞生使得游戏将脱离硬件的限制,全方位为玩家带来最佳的体验,游戏行业的发展前景十分广大。

然而,虽然我国游戏总市场,总玩家数量都高居世界首位。中国游戏行业由于起步较晚,依然落后于美国日本等国家。在中国游戏行业持续发展的今天,许多玩家的审美观念没有形成,设计者对于游戏的理解不深,导致中国游戏的质量参差不齐,大量骗钱无良,缺乏内涵和游戏性的快餐游戏充斥网络。在众多游戏类型中,通过手眼配合做出及时反馈的动作游戏一直深受玩家喜爱,玩家通过反应,判断,决策等方式来达成目标。动作游戏一直通过多种多样的玩法来给予玩家不断进化的游戏体验。这类游戏在锻炼玩家的手眼协调,大脑反应能力的同时还可以加入许多的知识文化等元素。因此,设计优秀的、富于教育意义的动作游戏,是十分有意义的。

1.2国内外研究现状

在过去,电子游戏大多是根据厂商的特定机型进行定制开发的,开发过程冗长繁复,当时的个人电脑也大多用于特殊的商业用途而并非个人娱乐的玩具。游戏引擎这一概念在当时还没有出现,但游戏开发者们已经逐渐意识到“开发过程中每次都需从头开始和大量重复劳动”的问题,并着手为开发游戏构建更加方便的使用工具。

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图