计算机系统应用
計算機繫統應用
계산궤계통응용
APPLICATIONS OF THE COMPUTER SYSTEMS
2014年
8期
135-138
,共4页
走迷宫算法%推箱子游戏%触摸屏%路径搜索%Android
走迷宮算法%推箱子遊戲%觸摸屏%路徑搜索%Android
주미궁산법%추상자유희%촉모병%로경수색%Android
maze algorithm%Sokoban game%touch-screen%path searching%Android
在Android等移动平台上的触屏版推箱子游戏中,游戏主角在触摸操作下的移动路径计算属于走迷宫算法。提出了一种基于右手法则、足迹标记和捷径优化的迷宫路径搜索算法,采用直行、沿墙搜索和路径优化三个步骤实现。经实际项目的应用验证,该算法具有良好的有效性和高效性,能够满足游戏操作的实时性要求。
在Android等移動平檯上的觸屏版推箱子遊戲中,遊戲主角在觸摸操作下的移動路徑計算屬于走迷宮算法。提齣瞭一種基于右手法則、足跡標記和捷徑優化的迷宮路徑搜索算法,採用直行、沿牆搜索和路徑優化三箇步驟實現。經實際項目的應用驗證,該算法具有良好的有效性和高效性,能夠滿足遊戲操作的實時性要求。
재Android등이동평태상적촉병판추상자유희중,유희주각재촉모조작하적이동로경계산속우주미궁산법。제출료일충기우우수법칙、족적표기화첩경우화적미궁로경수색산법,채용직행、연장수색화로경우화삼개보취실현。경실제항목적응용험증,해산법구유량호적유효성화고효성,능구만족유희조작적실시성요구。
In the Sokoban game of touch-screen edition which runs on the mobile platform such as Android, the computing of the game protagonist’s walking path under touch operation belongs to maze algorithms. A path searching maze algorithm based on the right-hand rule, footprint marking and shortcut optimizing is proposed. It is implemented through three steps, including walking straight, searching along the wall and optimizing path. After verification of application in the actual project, it shows that the algorithm has good effectiveness and efficiency to meet the real-time requirements of the game operations.