没有合适的资源?快使用搜索试试~ 我知道了~
毕业论文设计-基于C++的扫雷游戏设计与实现.doc
0 下载量 173 浏览量
2023-06-30
05:01:00
上传
评论
收藏 1.05MB DOC 举报
温馨提示
试读
34页
毕业论文设计-基于C++的扫雷游戏设计与实现.doc
资源推荐
资源详情
资源评论
武汉理工大学《C++》课程设计
1
基于 C++的经典扫雷游戏程序设计
目录
摘
要······································
································3
1 、 引
言······································
······························4
1.1 课 题 背 景 及 意
义······································
·················4
1.2 Visual C++ 发 展 概
况······································
·············5
1.3 关 于 本 课
题······································
·····················6
2 、 游 戏 的 总 体 分 析 与 设
计······································
··············7
2.1 游 戏 功 能 简
介······································
···················7
2.2 设 计 构
想······································
·······················7
2.3 流 程 规
武汉理工大学《C++》课程设计
2
划······································
·······················8
3 、 扫 雷 游 戏 的 具 体 实 现 过
程······································
···········9
3.1 扫 雷 游 戏 模 块 的 实
现······································
·············9
3.1.1 扫 雷 游 戏 主 窗 体 的 创
建······································
······9
3.1.2 主 界 面 控 制 菜 单 的 设
计······································
·····13
3.2 扫 雷 游 戏 核 心 ----- 布 雷 算 法 设
计······································
···13
3.3 扫 雷 鼠 标 事 件 的 处
理······································
············20
3.4 扫 雷 其 它 处
理······································
··················27
3.4.1 难 度 设 置 菜 单 消 息 处
理······································
·····27
3.4.2 背 景 音 乐 菜 单 消 息 处
理······································
·····28
武汉理工大学《C++》课程设计
3
3.4.3 其 它 处
理······································
··················29
4 、 扫 雷 游 戏 程 序 的 调 试 与 运
行······································
·········29
5 、 扫 雷 游 戏 设 计 总
结······································
·················31
6 、 致
谢······································
·····························31
7 、 参 考 文
献······································
·························32
摘要
游戏业发展一日千里,该行业极大的影响和改变了人们的生活和娱乐方式,游戏为消
费者提供丰富多彩的虚拟空间,使消费者可以自由自在的享受虚拟世界的乐趣,实现自己
在现实生活着那个可能永远不能实现的梦想,满足了消费者的心理和精神需求。
扫雷游戏是 Windows 操作系统自带的一个小游戏,过去的几年里 Windows 操作系统
历经数次换代,变得越来越庞大、复杂,但这个可爱的小游戏在任何版本的 Windows 操作
系统里去却依然保持着原貌。但几乎每个电脑使用者都接触过它,并且深爱着这款小游戏。
扫雷游戏是比较经典的一款小游戏,实现它的方法很多,可以用很多不同算法和语言
实现,如 C,C++,VB,JAVA 等。本论文研究的是以 Visual C++ 6.0 为开发环境,设计并开发
一款扫雷游戏,其功能类似于 Windows 操作系统自带的扫雷游戏。论文首先介绍了制作游
戏的整体思路及整个游戏设计的流程规划,然后介绍了雷区的布置及地雷随机产生的实现
方法;重点介绍了在游戏过程中各事件的处理,其中又以鼠标事件和清除未靠近地雷区方
武汉理工大学《C++》课程设计
4
块这两方面最为最要,鼠标事件是利用鼠标所发出的信息了解使用者的意图,进而做出相
对应的动作,而清除未靠近地雷区方块由于引进了“递归”这个概念而使其简单化。
关键字:扫雷;Visual C++ 6.0;事件;递归
Abstract
Game industry develops by leaps and bounds,and it has a great impact on the way people
live and entertainment, games provide consumers with a variety of virtual space, so that
consumers can enjoy the free fun of the virtual world, achieve the dream that may never achieve
in real life, and satisfy the psychological and spiritual needs consumer.
The Sweep Mine Game is a small game that the Windows operating system have. Over
the past few years the Windows operating system has experienced a number of chang,and
become much larger and more complexed. However, this lovely game in any version of the
Windows operating system has keep the original appearance. Almost every computer users have
come into contact with it, and love this game.
The Sweep Mine Game is an classical little game, and there are many ways can achieve
it,we can use many different algorithms and languages,such as C,C++,VB,JAVA and so on.This
study is based on Visual C++ 6.0 to designed and made the sweep mine game,it’s function is
similar to the game that the Windows operating system has. First we introduced the whole idea
of making the game and the process planning of the game design,then introduced the method
of the layout of minefields and mines randomly generated. And focuses on the process of dealing
with the incident in the game, among them, the mouse events and clearance of unexploded
landmines around the box are the two most important thing, the mouse events is to use the
message that the mouse give to understand the the user's intent, then make the corresponding
action, and clearance of unexploded landmines around the box has became simply with the
introduction of the "recursive" .
Key words: Sweep Mine, Visual C++ 6.0, Affairs, Recursion
武汉理工大学《C++》课程设计
5
1 引言
1.1 课题背景及意义
当前随着计算机的深入普及,越来越多的人有了个人电脑,人们运用计算机完成许多
重要的工作,计算机在人们的生活中变的越来越来重要。随着计算机的应用和发展计算机
已经不单纯是一个工作工具,人们越来越重视计算机的娱乐性了,近年来游戏产业规模持
续成长,全球每年游戏业总产值已经突破 200 亿美金,远远超越好莱坞电影产业以及音乐
娱乐事业,而成为目前娱乐事业的最大主流。不过游戏产业光鲜亮丽的背后,却也隐含着
高风险、高成本的危机,显示游戏产业慢慢步入“微利时代”。
目前整个游戏产业的运作模式已经跟好莱坞电影产业的运作模式相同,电影产业有制
片、发行、宣传等分工,游戏产业亦同,由专业的游戏研发小组负责研发游戏,也有如微
软、美商艺电这类国际级大厂负责游戏发行,甚至连“游戏制作人”也被培养成明星一样
成为一种招牌,如任天堂有王牌制作人宫本茂、SEGA 有铃木裕、KONAMI 有小岛秀夫、CAPCOM
有三上真司、TECMO 有板垣伴信...等,明确的游戏产业分工的确有助于游戏产业的规模发
展与进化,但也无形中让游戏开发成本大增。为了降低游戏开发成本,开发娱乐性强成本
低的游戏就成为当前的主要课题,在这种趋势下各种小型的低成本的游戏软件应运而生。
在这其中,系统自带的小游戏也占据了相当重要的地位,与那些网络游戏和 3D 游戏相比,
它有编写简单容易上手等特点,非常适合人们在完成工作的时候适当的娱乐要求。这些小
游戏大都是以益智和娱乐为目的,不仅给紧张工作的人们以放松,还可以让人们的大脑得
到开发。这些小游戏包括扫雷,弹球,纸牌等等。而本课题就是扫雷游戏的设计。
1.2 Visual C++ 发展概况
Visual C++是一个功能强大的可视化软件开发工具。自 1993 年 Microsoft 公司推
出 Visual C++1.0 后,随着其新版本的不断问世,Visual C++已成为专业程序员进行
软件开发的首选工具。
剩余33页未读,继续阅读
资源评论
yyyyyyhhh222
- 粉丝: 404
- 资源: 6万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功