Comparison Analysis of Dijkstra and A-Star Algorithms in NPC (Non-Playable Character) Movement on a Single-Player Game

Artificial intelligence in a game plays a vital role in enhancing the player's gaming experience, especially in single-player games. NPCs are the primary means of interaction in single-player games, assisting and guiding players like interactions with other players. Chaos Crossing requires pathfinding technology for optimal NPC movement, allowing them to navigate the environment grid-based while avoiding static obstacles. The Dijkstra algorithm and the A-Star algorithm need to be compared because, based on previous research, the Dijkstra algorithm has proven effective for calculating the shortest distance to the destination point in a static environment based on a two-dimensional grid with characters moving in it, as well as the A-Star algorithm can avoid a static environment based on grid and is used to determine the shortest distance to the destination point in the character's movement. This quantitative research aims to find a solution that optimizes NPC movement by testing and comparing Dijkstra's and A-Star's algorithms in a static environment grid based on the game Chaos Crossing. The test results and comparative analysis show that the A-Star algorithm performs a faster route search with an average value of 36.37 seconds than Dijkstra's algorithm with an average matter of 20.76 seconds and utilizes memory more efficiently with an average value of 20.19 MB than Dijkstra's algorithm with a value 22.17 MB on average. However, Dijkstra's algorithm produces a slightly shorter track distance, with an average value of 42.26 units, compared to the A-Star algorithm, with an average value of 42.39 units.

Institutions

Publication Details

Journal
SHILAP Revista de lepidopterología
Published
2024-10-01
DOI
https://doi.org/10.25124/ijait.v8i1.6053
Primary Topic
Artificial Intelligence in Games
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Comparison Analysis of Dijkstra and A-Star Algorithms in NPC (Non-Playable Character) Movement on a Single-Player Game

SHILAP Revista de lepidopterología
Artificial Intelligence in Games
article

Comparison Analysis of Dijkstra and A-Star Algorithms in NPC (Non-Playable Character) Movement on a Single-Player Game

article en

Abstract

Artificial intelligence in a game plays a vital role in enhancing the player's gaming experience, especially in single-player games. NPCs are the primary means of interaction in single-player games, assisting and guiding players like interactions with other players. Chaos Crossing requires pathfinding technology for optimal NPC movement, allowing them to navigate the environment grid-based while avoiding static obstacles. The Dijkstra algorithm and the A-Star algorithm need to be compared because, based on previous research, the Dijkstra algorithm has proven effective for calculating the shortest distance to the destination point in a static environment based on a two-dimensional grid with characters moving in it, as well as the A-Star algorithm can avoid a static environment based on grid and is used to determine the shortest distance to the destination point in the character's movement. This quantitative research aims to find a solution that optimizes NPC movement by testing and comparing Dijkstra's and A-Star's algorithms in a static environment grid based on the game Chaos Crossing. The test results and comparative analysis show that the A-Star algorithm performs a faster route search with an average value of 36.37 seconds than Dijkstra's algorithm with an average matter of 20.76 seconds and utilizes memory more efficiently with an average value of 20.19 MB than Dijkstra's algorithm with a value 22.17 MB on average. However, Dijkstra's algorithm produces a slightly shorter track distance, with an average value of 42.26 units, compared to the A-Star algorithm, with an average value of 42.39 units.

SHILAP Revista de lepidopterología
Universitas Jember (ID)
Openalex Percentile: Top 60%
Artificial Intelligence in Games
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Comparison Analysis of Dijkstra and A-Star Algorithms in NPC (Non-Playable Character) Movement on a Single-Player Game · SHILAP Revista de lepidopterología (2024) | TGRS Research Map | TGRS