文档详情

毕业设计(论文)-基于C语言的扫雷游戏开发_精品.doc

发布:2018-04-05约1.25万字共18页下载文档
文本预览下载声明
基于C语言的扫雷游戏开发 摘 要 本论文研究的是以Visual Basic 6.0为开发环境,设计并开发一款扫雷游戏,其功能类似于Windows操作系统自带的扫雷游戏。论文首先介绍了制作游戏的整体思路及整个游戏设计的流程规划,然后介绍了雷区的布置及地雷随机产生的实现方法;重点介绍了在游戏过程中各事件的处理,其中又以鼠标事件和清除未靠近地雷区方块这两方面最为最要,鼠标事件是利用鼠标所发出的信息了解使用者的意图,进而做出相对应的动作,而清除未靠近地雷区方块由于引进了“递归”这个概念而使其简单化。 本次设计只是完成了扫雷游戏的基本功能,在细节方面仍有待以后完善。 关键词:扫雷;Visual Basic 6.0;事件;递归 The Design and Development of Mine Game Abstract What my thesis research for is basic on the develop environment of Visual Basic 6.0 , design and develop a mine game,its function is similar to the mine games of the Windows Operating System .The thesis has introduced the layout of mined areas and the method of how to create the mines at random. It use vairies of components in Visual Basic 6.0 and the combination of some simple calculations; the thesis lays emphasis on introducing the processing of each event in the game. Among these events ,the mouse event and the event of clearance of the area which isn’t close to the mine field are much more important.The theory of mouse event is that the intention of user is learned by the information sent out by the mouse and then the program runs according to the information .The other event is simplified by the introduction of the concept of recursion. This design has been completed the basic function of mine game. The details still need to be improved. Key words: Mine game, Visual Basic 6.0, Affairs, Recursion 目 录 论文总页数:18页 1 引言 1 1.1课题背景及意义 1 1.2开发工具的选用及介绍 1 2 游戏的总体分析与设计 3 2.1设计构想 3 2.2流程规划 4 2.3画面规划 5 3 游戏的详细设计 6 3.1游戏初始化 6 3.2雷区的布置 9 3.3游戏中主要模块的介绍与使用 10 3.3.1鼠标事件 10 3.3.2地雷及雷区表面探测情况 12 3.3.3清除未靠近地雷的方块 12 3.3.4游戏难度的选择 14 3.4游戏的判断 14 3.4.1游戏成功完成 14 3.4.2游戏失败 14 4 游戏测试结果 15 结 论 15 参考文献 16 引言 课题背景及意义 在计算机逐步渗入社会生活各个层面的今天,计算机已经成为人们日常生的一部分,越来越多的人使用计算机办公、娱乐等等。 扫雷游戏是Windows操作系统自带的一款小游戏,在过去的几年里,Windows操作系统历经数次换代更新,变得越来越庞大、复杂,功能也越来越强大,但是这款小游戏依然保持原来的容貌,可见这款小游戏受到越来越多人的喜爱。本次的毕业设计我将利用Visual Basic6.0作为开发工具,开发一款类似的“扫雷游戏”。 通过研究Windows操作系统自带的扫雷游戏,我们可以发现在这个游戏中主要有以下两个关键的地方: 第一个是初始化问题,包括随机产生本局游戏中雷的总数,雷的分布对于每一个小区域如何获取周围地区分布的雷数等等。 第二
显示全部
相似文档