基于unity的回合制网游战斗系统的研究与实现.doc

基于unity的回合制网游战斗系统的研究与实现.doc

  1. 1、本文档共50页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 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 接收客户

您可能关注的文档

文档评论(0)

hkfgmny + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档