中国象棋程序系统设计毕业论文

 2021-04-10 11:04

摘 要

电脑游戏在计算机应用领域占据着很大的份额,而棋牌类游戏由于操作简单,娱乐性强无疑是现代最受大众欢迎的小游戏。本课题通过对中国象棋游戏系统的研究和开发,以及对网络对战平台系统的分析,设计出了一套中国象棋游戏系统。

随着中国市场经济的发展,人民生活消费水平的不断提高,人们对精神生活的要求也逐渐提高。平淡生活的闲暇之余人们更乐意通过一些简单的而有效的方式放松下自己,尤其是长期在办公室面对电脑办公的白领人士,这样一些益智充满趣味的小游戏便应运而生了。而具有悠久历史的中国象棋由于操作简单,趣味性强,成为流行极为广泛小游戏。

象棋小游戏的日益多元化,对游戏的使用和操作提出了更高的要求。目前中国象棋单机游戏的一般功能如下:水平选择、走法、悔棋、退出等,但是限于种种原因,现有的相关小游戏存在各种各样的问题,例如:需要注册才能游戏、界面过于复杂、对计算机硬件要求相对高端等等。而我所研究的课题在一定程度上就能够解决相关问题,用网上对弈或者人人对弈的模式,从而使游戏更加人性化,也更能符合大众娱乐的要求。

本人结合局域网网络特点和象棋小游戏本身对于在计算机上运行的一些客观要求,通过所学知识设计了中国象棋对弈系统。本设计大体上包含了下面一些模块:规则设置模块,网络通信模块以及图像绘制模块。具体来说网络通信模块相关方面的内容和作用使得游戏参与者可以方便迅速地建立网络的相互连接,以此达到计算机之间相互连接对战的相关功能;图像绘制相关模块根据中国象棋的棋盘设置完成象棋运营环境的更新以及相关棋子的动态表示;规则设置模块则根据游戏的具体要求来对游戏参与者所操作的棋步进行一定的约束。

关键词:联机对弈;图像绘制;网络通信

Chinese Chess Program Game System

Abstract

Computer applications in the computer games occupy a large share of the chess game as simple, fun and strong is undoubtedly the most popular modern games. The subject of Chinese chess game system through research and development, as well as online play platform system analysis, design a set of Chinese chess game systems.
    
With the development of China's market economy, people's rising standard of living, people are demanding of the spiritual life gradually improved. The simple life people are more willing to spare a few simple and effective way to relax under their own, especially in the face of the computer in the office of office a long white-collar workers, so that a number of fun little puzzle game was born. And with a long history of Chinese chess as simple, interesting, a very wide range of popular games.

Chess game in the increasingly diversified, the use and operation of the game a higher requirement. Chinese chess game currently stand-alone general functions as follows: the level of selection, moves, undo, exit, etc., but is limited for various reasons, the current game there are various related issues, such as: need to register to the game, the interface is too complicated , relatively high-end computer hardware requirements and so on. The subject of my research to some extent be able to solve the problems, with all chess games on the Internet or the model, making the game more user-friendly and better able to meet the requirements of mass entertainment.

I combined a small LAN network characteristics and the chess game itself is running on your computer some of the objective requirements of the knowledge through the design of the Chinese chess chess system. The design generally includes some of the following modules: the rules set module, the network communication module and image rendering module. Specifically, the network communication module and role-related aspects of the game allows participants to quickly and easily establish a network of mutual connections between computers connected to each other in order to play against the related functions; image rendering related modules according to Chinese chess board setup is complete Chess operating environment updates, and relevant pieces of the dynamic representation; rule set module is based on the specific requirements of the game to the participants of the operation of the game moves to certain constraints.

Keywords: Online chess; Image rendering; Network communication

目 录

1绪论 7

1.1象棋程序设计背景 7

1.2象棋程序设计发展 7

1.3论述本次设计内容 8

2 象棋游戏系统理论基础 9

2.1中国象棋游戏设计基本理论 9

2.2 本次系统构成 9

2.3系统采用技术手段 9

2.3.1 点对点通信 9

2.3.2 TCP/IP协议 10

2.3.3 UDP协议 10

2.3.4屏幕绘制以及用户交互 10

2.3.5远程控制 11

3中国象棋游戏系统设计 12

3.1数据结构 12

3.1.1棋盘 12

3.1.2棋子信息数组 13

3.1.3变量及函数 14

3.2棋盘及棋子绘制与表示 16

3.2.1主页面 16

3.2.2象棋运营环境的表示 16

3.2.3棋子的表示 16

3.2.4状态改变显示 20

3.2.5复看功能 20

3.3规则设置 21

3.3.1棋子规则 21

3.3.2规则算法 22

关键代码:走棋规则 23

3.4网络通信 27

3.4.1CCOM类 27

3.4.2代码 27

3.5棋子操作 29

3.5.1棋子的选中 29

3.5.2棋子操作的相关判断 30

3.5.3棋子光标变化 30

4总结 32

参考文献 33

1绪论

1.1象棋程序设计背景

电脑游戏(Personal computer games, Computer games 或 PC games)是指在电子计算机上运行的具有娱乐功能的软件。电脑游戏和电脑的硬件、互联网的发展发生着非常大的联系。电脑游戏软件为游戏者提供一个虚拟的空间,在某种概念上让人能摆脱现实世界,在一种虚拟生活中扮演着真实世界中无法扮演的角色。与此同时电脑相关科技的发展,给游戏的参与者提供了更多更好的体验和享受。

电脑游戏必须在计算机操作平台上完成和实现其功能,其最突出也是最重要的特性是高度的互动性。这里的高度互动性是指参与游戏的人员对游戏采取不同的使用和操作,会使计算机上的游戏也会发生一定的变化,而游戏程序的所要完成的相关的任务也会根据游戏者的使用不同而发生一定的变化,除此之外计算机能根据参与者所作出的行为举动做出相对较为合适的改变,以此来促使游戏参与者对电脑的本身也做出一定的回复,能够完成和实现相应的游戏参与者和电脑之间的交流。系统在参与者和电脑的相互作用和影响下继续运行。电子计算机游戏软件在一定程度上能够反映出当下电脑科技的较高水平。通常情况下电脑跟新换代的同时,游戏也会随之产生比较明显的变化。

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

课题毕业论文、开题报告、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找,优先添加企业微信。