Font Size: a A A

RPG Mobile Game Development Based On Cocos2d-x Engine

Posted on:2016-06-28Degree:MasterType:Thesis
Country:ChinaCandidate:Z C ShenFull Text:PDF
GTID:2348330503978056Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
The efficient map loading method of the game should be selected in Role-playing game (RPG).Traditional static loading technology has been unable to meet the expanding scale of the game map.More efficient dynamic on-demand loading technology need more widely used in the game.Additionally,efficient and real pathfinding algorithm is needed in RPG game.Currently, A* algorithm is widely used in the popular role-playing game,but the A* algorithm does not apply in the large scale map.Moreover, the NPC in the RPG game should learn independently and dynamically adapt to the game environment,the traditional qualitative AI cannot satisfy the development of the RPG game.This study develops a RPG game based on Cocos2d-x engine and improves efficiency of map loading method and pathfinding algorithm.This paper firstly studies the map dynamic loading technology and preloading strategy, then proposes a on demand loading strategy. The strategy assess the map peace and keep the map peace which will most possibly be reused in the memory to reduce disk access times and costs. Additionally, this paper studies the efficient pathfinding algorithm,after comparing disadvantages of several hierarchical pathfinding algorithm, a hierarchical pathfinding algorithm combining A* and Bresenham algorithm is proposed in this study, this pathfinding algorithm fully considers the obstacles information of subdomain to reduce the search area of the A* algorithm, which improves the efficiency of pathfinding. Moreover, agent model is built for NPC,in the decision-making system of agent model, the finite state machine and the BP neural network are integrated used, and neural network is optimized by the genetic algorithm. The NPC built by agent modeling can make decisions independently by analyzing environmental information, so players can't predict the behavior of NPC,which improves the game challenging and interesting.The result of experiment shows that 1.98 map peaces are loaded per second using map dynamic loading technology and preloading strategy can't improve performance. hierarchical pathfinding algorithm combining A* and Bresenham algorithm expands less nodes and uses less time than HPA*. The classification of accuracy of BP network is 77.5%, while the accuracy of BP network optimized by GA is 85%.This paper studies and improves the three technology of RPG game and the result of experiment shows that the performance has been improved.
Keywords/Search Tags:RPG game, map loading, pathfinding algorithm, undeterminative AI, neural network, genetic algorithm
PDF Full Text Request
Related items