期刊文献+

迷宫游戏的设计与开发 被引量:1

Design and develop of maze game
下载PDF
导出
摘要 在Eclipse平台上,选择Java语言完成迷宫游戏的设计与开发。采用随机布点算法生成不规则迷宫地图,采用图的深度优先遍历算法随机生成规则地图。在相同的窗口,运用地图格的大小不同来生成较低、中等、较高三种不同难度的规则或不规则地图。把走迷宫的对象设置成角色方块,使用键盘的方向键控制当前移动点进行游戏。按照遍历规则地图的起点不同,把游戏分简单,中等,高难三种难易程度。运用回溯法从入口一步步进行探索,最后找到迷宫出口,并在界面上显示出该路径。编写画布类函数Canvas()实现游戏设置。游戏的成功开发表明,算法研究至关重要,应用这些算法开发游戏是有效的。 The paper designed and developed a Maze game under the Eclipse platform by using Java development tool. The random distributed point algorithm is used to generate an irregular map, and the algorithm of depth-first traveling is used to generate a regular map. Setting different size of the map’s grid in the map on the same game window forms three kinds of degree of difficulty which are low, medium, and high. Set the game walker as a role object, use the keyboard’s arrow keys to control the current point move, and we can play the game. From different point to travel form three level games on regular map which are simple, medium, and difficulty. Take backtracking method to search the path from entrance to the exit step by step, find it at last, and show the path on the interface. Program the function Canvas() to set the game configurations. The result of successful development of the Maze game shows that algorithms are important and using them to develop the game is effective.
出处 《齐齐哈尔大学学报(自然科学版)》 2014年第1期1-5,24,共6页 Journal of Qiqihar University(Natural Science Edition)
基金 厦门理工学院科学技术研究项目(YKJ11012R YKT10037R) 国家自然科学基金项目(61103246) 厦门理工学院创新创业园项目(201311062062)
关键词 迷宫游戏 深度优先遍历 算法设计 回溯法 maze game depth-first traversal algorithm design backtracking method
  • 相关文献

参考文献8

二级参考文献27

共引文献9

同被引文献11

引证文献1

二级引证文献6

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部