- 1、本文档共50页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
.
.
摘要 本文主要阐述网络回合制战斗系统的实现,包括回合制战斗系统的整个流程(战斗开始、玩家下达战斗指令、战斗动画、战斗结束),和网络回合制战斗系统常见的主要功能(攻击、使用技能、使用物品)的实现,并且在游戏项目《PKer》中进行实践和测试。在开发环境方面,服务器采用国内IOCP高性能开源框架“HP-Socket”(Windows平台),并且连接到Mysql数据库,客户端采用近年比较火热的强大跨平台引擎Unity3D(2D,C#)并且使用Sqlite作为嵌入式数据库。除此以外,本文还对战斗系统实现所涉及到的相关技术如Unity引擎的协同程序、单例设计模式和分包算法进行简要介绍。
关键词 回合制战斗系统, 网络游戏,Unity3D,协同程序,游戏编程
ABSTRACT This article mainly expounds the implementation of network turn-based combat system, including the whole process of turn-based combat system (battle begins, the players fighting instructions, combat animation, battle ends), and the main function of common (attack, using skills, using items) implementation, and in the game PKer in practice and test of the project. In the aspect of development environment, C++ IOCP server with Windows platform and connect to the Mysql database, the client uses Unity3D (2D, C#) and uses Sqlite as an embedded database. In addition to this, this article also involved to combat system related technologies such as the Unity engine coroutines, singleton design pattern and the subcontract algorithm are briefly introduced.
KEYWORDS Turn-based combat system, online game, Unity3D, Coroutine, Singleton design pattern
目 录
TOC \f \h \z \t 样式1,1,样式2,2,样式3,3 前 言 1
第1章 绪论 2
1.1 回合制游戏简介 2
1.1.1 广义上的回合制游戏 2
1.1.2 狭义上的回合制游戏 2
1.2 回合制战斗系统简介 2
1.3 实践项目《PKer》简介 2
第2章 开发环境和部分涉及技术简介 4
2.1 开发环境简介 4
2.2 Unity协同程序 4
2.2.1 Unity协同程序简介 4
2.2.2 Unity协同程序的运用 4
2.3 单例设计模式 5
2.3.1 单例设计模式 5
2.3.2 单例设计模式的运用 6
2.3.3 单例设计模式在Unity中的运用 7
2.4 分包算法 7
2.4.1 分包的原因 7
2.4.2 环形缓冲区(Circular Buffer) 7
2.4.3 分包算法流程图 9
第3章 战斗动画实现方案的研究与对比 11
3.1 研究背景 11
3.2 实现方案一:有限状态机 11
3.3 实现方案二:协同程序(Coroutine) 12
3.4 方案抉择结论 13
第4章 回合制网游战斗系统设计 14
4.1 回合制网游战斗系统设计 14
4.2 回合制网游战斗系统服务器实现思路 15
4.3 回合制网游战斗系统客户端实现思路 15
4.4 战斗系统框架结构(以实践项目《PKer》为例) 16
第5章 回合制战斗系统实现 18
5.1 战斗系统相关消息结构体的定义 18
5.2 服务器战斗系统的实现 20
5.2.1 服务器战斗系统相关结构体 20
5.2.2 初始化一个战局 23
5.2.3 接收客户
您可能关注的文档
- 智能指控平台使用说明.doc
- maya建模教程-古代城堡建模教程.doc
- 工序样板交底记录(砌体).doc
- 沉箱拖运安装安全施工方案.doc
- 2500平方高压电缆评估说明.doc
- 智能系统投标标书.doc
- 混凝土修补专项方案.doc
- 新电子桌牌说明书v2..doc
- 纳米晶玉板橱柜台面.doc
- 手编伞绳伞绳表带手电手绳教程.doc
- 2024年江西省寻乌县九上数学开学复习检测模拟试题【含答案】.doc
- 2024年江西省省宜春市袁州区数学九上开学学业水平测试模拟试题【含答案】.doc
- 《GB/T 44275.2-2024工业自动化系统与集成 开放技术字典及其在主数据中的应用 第2部分:术语》.pdf
- 中国国家标准 GB/T 44275.2-2024工业自动化系统与集成 开放技术字典及其在主数据中的应用 第2部分:术语.pdf
- GB/T 44285.1-2024卡及身份识别安全设备 通过移动设备进行身份管理的构件 第1部分:移动电子身份系统的通用系统架构.pdf
- 《GB/T 44285.1-2024卡及身份识别安全设备 通过移动设备进行身份管理的构件 第1部分:移动电子身份系统的通用系统架构》.pdf
- 中国国家标准 GB/T 44285.1-2024卡及身份识别安全设备 通过移动设备进行身份管理的构件 第1部分:移动电子身份系统的通用系统架构.pdf
- GB/T 44275.11-2024工业自动化系统与集成 开放技术字典及其在主数据中的应用 第11部分:术语制定指南.pdf
- 中国国家标准 GB/T 44275.11-2024工业自动化系统与集成 开放技术字典及其在主数据中的应用 第11部分:术语制定指南.pdf
- 《GB/T 44275.11-2024工业自动化系统与集成 开放技术字典及其在主数据中的应用 第11部分:术语制定指南》.pdf
文档评论(0)