Game Pathfinding System Design based on A-Star Pathfinding Algorithm
Abstract
Pathfinding systems are used in many applications today, including navigation systems, autonomous driving systems, and games. The core part of the pathfinding system is the pathfinding algorithm, A Star pathfinding algorithm is a kind of efficient pathfinding algorithm, which is especially suitable for the design of game pathfinding. In this paper, based on the A Star algorithm, Godot game engine and C Sharp language are used to write a pathfinding program. After comparing different pathfinding methods and the estimated function, the A Star algorithm is improved according to the needs of the actual game pathfinding system, so that the pathfinding program can avoid crossing the obstacles through the diagonal by searching the surrounding obstacles and excluding unavailable nodes, and find a shorter path by using the Euclidean distance estimated function. The program applies the improved A Star algorithm in practice, and finally can complete the basic pathfinding needed in the game, which is practical for the design of the game's pathfinding system.
References
- Chen Y, Shen S, Chen T, et al. 2014 Path optimization study for vehicles evacuation based on Dijkstra algorithm. Procedia Engineering, 71, 159-165.
- Shu X W 2012 The improved dijkstra's shortest path algorithm and its application. Procedia Engineering, 29, 1186-1190.
- DuchoĆ F, Babinec A, Kajan M, et al. 2014 Path planning with modified a star algorithm for a mobile robot. Procedia engineering, 96, 59-69.
- Ma X 2024 Robot path planning and obstacle avoidance based on a combination of hybrid A-star algorithm and time-elastic-band algorithm. AIP Publishing, 3144(1).
- Zhang Y, Dong B, Zhang L, et al. 2024 Global path planning for mobile robots based on improved A Star algorithm. Research Square.
- Yin W, Yang X 2013 A totally Astar-based multi-path algorithm for the recognition of reasonable route sets in vehicle navigation systems. Procedia-Social and Behavioral Sciences, 96, 1069-1078.
- Erke S, Bin D, Yiming N, et al. 2020 An improved A-Star based path planning algorithm for autonomous land vehicles, International Journal of Advanced Robotic Systems, 17(5).
- Liu C, Mao Q, Chu X, et al. 2019 An improved A-star algorithm considering water current, traffic separation and berthing for vessel path planning. Applied Sciences, 9(6), 1057.
- Permana S H, Bintoro K Y, Arifitama B, et al. 2018 Comparative analysis of pathfinding algorithms A star, dijkstra, and bfs on maze runner game. IJISTECH (International J. Inf. Syst. Technol), 1(2), 1.
- Lawande S R, Jasmine G, Anbarasi J and Izhar L I 2022 A Systematic Review and Analysis of Intelligence-Based Pathfinding Algorithms in the Field of Video Games. Appl. Sci, 12, 5499.