首页 | 本学科首页   官方微博 | 高级检索  
     

TCP/IP协议在多人网络游戏中的应用研究
引用本文:曹伟,张长君.TCP/IP协议在多人网络游戏中的应用研究[J].辽东学院学报(自然科学版),2009,16(1).
作者姓名:曹伟  张长君
作者单位:1. 辽东学院,信息学院,辽宁,丹东118000
2. 大连大学,信息工程学院,辽宁,大连116622
摘    要:多人网络游戏中协议是很重要的保证,通过对网络协议的比较发现:TCP协议能够保证数据包的完整、有序地传送,但传送数据包的速度比较慢;而UDP传送数据包的速度远远快于TCP协议,但是不保证数据包的传送和有序。为此,文中讨论了选择TCP/IP的理由,以及为克服TCP协议传送速度慢而采取的一些方法,诸如用W insock函数族来开发客户端,采用更高效的重叠I/O模型;并在服务器端做详细的设置,比如对服务器的网络连接做设置,对消息做设置,特别阐述了使用服务器广播技术,把游戏地图分成九块广播出去,并采用二维矩阵碰撞检测的方法,把相交块的坐标转换成内部坐标,然后进行运算,算出块之间的相对位置,并着重给出了同步问题的解决方案,最后阐述了综合同步法的设计思路;文中还根据论述内容画出了关于"客户端非重要消息的处理流程"图和"客户端重要消息的处理流程"图,使读者一目了然。

关 键 词:TCP/IP协议  多人网络游戏  Winsock函数  重叠I/O模型  服务器广播  同步解决方案

Application of TCP/IP to Multiplayer Online Games
CAO Wei,ZHANG Chang-jun.Application of TCP/IP to Multiplayer Online Games[J].Journal of Liaodong University:Natural Sciences,2009,16(1).
Authors:CAO Wei  ZHANG Chang-jun
Affiliation:1.College of Information Technology;Eastern Liaoning University;Dandong 118000;China;2.School of Information Engineering;Dalian University;Dalian 116622;China
Abstract:Protocol is a very important guarantee in multiplayer online games.It was found that TCP could transmit data packets integrally and orderly,but its speed was slow;on the other hand,UDP could transmit data packets faster,but the integrality and order of data packets could not be guaranteed.To solve this problem,a proposal using TCP/IP was put forward,and some methods to raise its transmission speed were given.We can use Winsock function group to develop the clients with high-efficient overlapped I/O model.In...
Keywords:TCP/IP  multiplayer online game  Winsock function  overlapped I/O model  server broadcasting  synchronization solution  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号