鉴于大家对其他类别十分关注,我们编辑小组在此为大家搜集整理了“长沙麻将游戏系统的设计与开发”一文,供大家参考学习!
论文字数:16059,页数:39 有开题报告,任务书
摘 要
在互联网高度发达的今天,网络游戏得到了很大的普及。如今网络上的游戏普遍存在地域性特点不强的缺点。本课题将开发一个长沙本地化的麻将游戏,它有着自身独特的打牌方式,并加入了长沙本地化语音功能。
本系统的设计考虑到了系统的高可移植性,高可用性等特点。系统结构采用C/S模式,运用了多线程技术,并利用TCP协议来实现服务器与客户端之间信息的传递。游戏规则的制定在服务器端用单独的类来实现。将来只需要做少许修改,就可支持其他地域的游戏规则。考虑到玩家游戏过程中的速度体验,系统设计中,我们将各种复杂的计算都在服务器端处理,客户端只是简单的显示信息,这样游戏过程中速度将是非常快的。本设计的创新性在于它采用了面向对象的设计思路,将语音功能,计分功能等单独封。这样,只需要对这些单独的模块稍作修改,就可满足不同地域的需求,提高的系统的“扩展性”。
该系统很好的实现了麻将游戏的长沙本地化特点。游戏在本机测试过程中运行良好,同时语音系统也能正常工作,证实了系统的设计和开发都得到了理想的结果。
关键词:长沙麻将,多线程,TCP协议,C/S模式,语音功能
The design and development of "Changsha Majiang"
ABSTRACT
In highly developed Internet today, the network game was much universal. Now the network games on the widespread have many shortcomings, such as geographical characteristics is not strong. This topic will develop a majiang game in Changsha localization, which has its own unique way of playing cards, and we also append localization of voice function to this game.
The design of the system takes into account the high portability and high availability features. We used C/S system architecture model, multithreading technology, and we used TCP protocol to transfer of information between server and clients. Rules of the game were constituted in the server with a separate category. In the future, the game only needs some small modifications to support other geographical rules. Taking into account of the player''s feeling when they playing the game, we will all have complicated calculations on the server side, the client only simply display information. So the speed of this game will be very fast.
The innovation in design lies in its use of the object-oriented design. The function of voice and calculate score is achieved in a separate category. Thus, they only need to make some modifications in these separate modules; it can meet the needs of different regions, which improve the system "scalability."
The system achieved a very good localization features. Games in the course of the test run good, and voice system can work well, too. All of these confirmed that the system design and development has been the desired results.
Keywords: Changsha majiang, multithreading, TCP protocol, C/S mode, voice function
目录
1绪论 1
1.1课题背景与长沙麻将设计的目的 1
1.1.1课题背景 1
1.1.2 长沙麻将设计的目的 2
1.2 网络游戏的市场现状 2
1.2.1 中韩游戏领域对比分析 2
1.2.2 中国网络游戏存在的问题 4
1.3 长沙麻将设计的内容和意义 5
2长沙麻将设计的相关技术介绍 7
2.1 客户端/服务器(C/S)模式介绍 7
2.2 基于JDBC的数据库操作 8
2.3 基于Socket的网络传输 9
2.4 多线程的介绍及应用 10
3长沙麻将总体设计与实现 11
3.1 长沙麻将总体设计思想 11
3.2 服务器与客户端设计 11
3.2.1 并发的,面向连接服务器的算法 12
3.2.2 TCP客户算法 13
3.3 各模块设计 13
3.4 吃牌,碰牌,胡牌算法实现 19
4长沙麻将运行结果及分析 25
4.1 游戏运行环境 25
4.2 游戏运行结果 25
结论与展望 32
致谢 33
参考文献: 34