{"title":"Penerapan算法寻径A* dalam游戏Dual Legacy基于Android","authors":"Felix Octavian, Latius Hermawan","doi":"10.24002/jbi.v14i01.6928","DOIUrl":null,"url":null,"abstract":"A* Pathfinding Algorithm Implementation in Dual Legacy Game based on Android. Games have 2 characters, the player, and the NPC (Non-Playable Character) which cannot be controlled by the player,so the NPC movements are easy to predict. A Star (A*) algorithm is a pathfinding algorithm or finding a way to a destination, in this case searching for the closest path to the player and avoiding obstacles. The enemy NPC is tasked with chasing the player, and the enemy NPC must reduce the player's health. A* algorithm calculatesthe distance of one of the paths and then calculatesthe distance of the other paths. The algorithm will choose the shortest path when all paths have been completed. Research focuses on the NPC's task of finding the shortest route. The A* in the “Dual Legacy” 2D Side-Scrolling RPG game based on Android is expected with this algorithm NPC can search for and chase players/players via the nearest path. The conclusion is that the A Star Algorithm has been successfully implemented, the NPC approaches the player through the shortest distance by avoiding obstacles.Keywords: A Star (A*) algorithm, NPC, game, Android, 2D side-scrolling RPG\nGame biasanya terdapat 2 karakter yaitu player dan NPC (Non-Playable Character) yang tidak bisa dikendalikan oleh player sehingga pergerakan karakter NPC mudah ditebak. Algoritma A Star (A*) merupakan algoritma pathfinding atau mencari jalan ke tujuan, dalam kasus ini mencari jalan terdekat ke player dan menghindari rintangan yang ada. NPC musuh ini bertugas untuk mengejar player dan NPC musuhharus mengurangi darah player. Algoritme A* menghitung jarak satu jalur, menyimpannya, lalu menghitung jarak jalur lainnya. Setelah semua jalur dihitung, algoritma A* memilih jalur terpendek . Penelitian berfokus pada tugas NPC untuk pencarian rute terdekat. Menerapkan algoritma pathfinding A* pada NPC game Dual Legacy 2D Side-Scrolling RPG berbasis Android diharapkan dengan algoritma tersebut NPC dapat mencari dan mengejar pemain / player melalui jalan terdekat. Kesimpulanperancangan ini adalah Algoritma A Star berhasil diimplementasikan, NPC mendekati player melalui jarak terdekat dengan menghindari halangan yang ada.Kata Kunci: algoritma A Star (A*), NPC, game, Android, 2D side-scrolling RPG","PeriodicalId":381749,"journal":{"name":"Jurnal Buana Informatika","volume":"47 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Penerapan Algoritma Pathfinding A* dalam Game Dual Legacy berbasis Android\",\"authors\":\"Felix Octavian, Latius Hermawan\",\"doi\":\"10.24002/jbi.v14i01.6928\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"A* Pathfinding Algorithm Implementation in Dual Legacy Game based on Android. Games have 2 characters, the player, and the NPC (Non-Playable Character) which cannot be controlled by the player,so the NPC movements are easy to predict. A Star (A*) algorithm is a pathfinding algorithm or finding a way to a destination, in this case searching for the closest path to the player and avoiding obstacles. The enemy NPC is tasked with chasing the player, and the enemy NPC must reduce the player's health. A* algorithm calculatesthe distance of one of the paths and then calculatesthe distance of the other paths. The algorithm will choose the shortest path when all paths have been completed. Research focuses on the NPC's task of finding the shortest route. The A* in the “Dual Legacy” 2D Side-Scrolling RPG game based on Android is expected with this algorithm NPC can search for and chase players/players via the nearest path. The conclusion is that the A Star Algorithm has been successfully implemented, the NPC approaches the player through the shortest distance by avoiding obstacles.Keywords: A Star (A*) algorithm, NPC, game, Android, 2D side-scrolling RPG\\nGame biasanya terdapat 2 karakter yaitu player dan NPC (Non-Playable Character) yang tidak bisa dikendalikan oleh player sehingga pergerakan karakter NPC mudah ditebak. Algoritma A Star (A*) merupakan algoritma pathfinding atau mencari jalan ke tujuan, dalam kasus ini mencari jalan terdekat ke player dan menghindari rintangan yang ada. NPC musuh ini bertugas untuk mengejar player dan NPC musuhharus mengurangi darah player. Algoritme A* menghitung jarak satu jalur, menyimpannya, lalu menghitung jarak jalur lainnya. Setelah semua jalur dihitung, algoritma A* memilih jalur terpendek . Penelitian berfokus pada tugas NPC untuk pencarian rute terdekat. Menerapkan algoritma pathfinding A* pada NPC game Dual Legacy 2D Side-Scrolling RPG berbasis Android diharapkan dengan algoritma tersebut NPC dapat mencari dan mengejar pemain / player melalui jalan terdekat. Kesimpulanperancangan ini adalah Algoritma A Star berhasil diimplementasikan, NPC mendekati player melalui jarak terdekat dengan menghindari halangan yang ada.Kata Kunci: algoritma A Star (A*), NPC, game, Android, 2D side-scrolling RPG\",\"PeriodicalId\":381749,\"journal\":{\"name\":\"Jurnal Buana Informatika\",\"volume\":\"47 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-04-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Jurnal Buana Informatika\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.24002/jbi.v14i01.6928\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Jurnal Buana Informatika","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.24002/jbi.v14i01.6928","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
摘要
基于Android的双遗留游戏寻路算法实现游戏有两个角色,玩家和NPC(非可玩角色),NPC不能被玩家控制,所以NPC的移动很容易预测。Star (A*)算法是一种寻路算法,即找到到达目的地的方法,在这里是寻找离玩家最近的路径并避开障碍。敌人NPC的任务是追逐玩家,而敌人NPC必须减少玩家的生命值。A*算法先计算其中一条路径的距离,然后再计算其他路径的距离。当所有路径都完成时,算法将选择最短路径。研究的重点是NPC寻找最短路线的任务。基于Android平台的2D横版RPG游戏《Dual Legacy》中的A*希望NPC能够通过最近的路径搜索并追逐玩家/玩家。结论是,A星算法已经成功执行,NPC通过避开障碍物以最短的距离接近玩家。关键词:A星(A*)算法,NPC,游戏,Android, 2D横版rpg游戏biasanya terdapat 2空手道玩家yaitu玩家dan NPC(非可玩角色)yang tidak bisa dikendalikan oleh玩家sehinga pergerakan空手道玩家mudah ditebak算法A* (A*) merupakan算法寻径算法(寻径算法),算法寻径算法,算法寻径算法,算法寻径算法,算法寻径算法,算法寻径算法,算法寻径算法,算法寻径算法,算法寻径算法,算法寻径算法,算法寻径算法,算法寻径算法NPC musuhharus mengurangi darah玩家。算法:A* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *Setelah semua jalurdihiton,算法A* memilih jalurterdek。Penelitian berfocus pada tugas NPC untuk Penelitian rule terdekat。Menerapkan算法寻径A* pada NPC游戏Dual Legacy 2D横版RPG基于Android diharapkan dengan算法tersebut NPC dpaat Menerapkan dengan /玩家melalui jalan terdekat。算法:A星元元元元元元元元元元元元元元元元元元元元元元元元元元元元。Kata Kunci: algorithm A Star (A*), NPC,游戏,Android, 2D横向卷轴RPG
Penerapan Algoritma Pathfinding A* dalam Game Dual Legacy berbasis Android
A* Pathfinding Algorithm Implementation in Dual Legacy Game based on Android. Games have 2 characters, the player, and the NPC (Non-Playable Character) which cannot be controlled by the player,so the NPC movements are easy to predict. A Star (A*) algorithm is a pathfinding algorithm or finding a way to a destination, in this case searching for the closest path to the player and avoiding obstacles. The enemy NPC is tasked with chasing the player, and the enemy NPC must reduce the player's health. A* algorithm calculatesthe distance of one of the paths and then calculatesthe distance of the other paths. The algorithm will choose the shortest path when all paths have been completed. Research focuses on the NPC's task of finding the shortest route. The A* in the “Dual Legacy” 2D Side-Scrolling RPG game based on Android is expected with this algorithm NPC can search for and chase players/players via the nearest path. The conclusion is that the A Star Algorithm has been successfully implemented, the NPC approaches the player through the shortest distance by avoiding obstacles.Keywords: A Star (A*) algorithm, NPC, game, Android, 2D side-scrolling RPG
Game biasanya terdapat 2 karakter yaitu player dan NPC (Non-Playable Character) yang tidak bisa dikendalikan oleh player sehingga pergerakan karakter NPC mudah ditebak. Algoritma A Star (A*) merupakan algoritma pathfinding atau mencari jalan ke tujuan, dalam kasus ini mencari jalan terdekat ke player dan menghindari rintangan yang ada. NPC musuh ini bertugas untuk mengejar player dan NPC musuhharus mengurangi darah player. Algoritme A* menghitung jarak satu jalur, menyimpannya, lalu menghitung jarak jalur lainnya. Setelah semua jalur dihitung, algoritma A* memilih jalur terpendek . Penelitian berfokus pada tugas NPC untuk pencarian rute terdekat. Menerapkan algoritma pathfinding A* pada NPC game Dual Legacy 2D Side-Scrolling RPG berbasis Android diharapkan dengan algoritma tersebut NPC dapat mencari dan mengejar pemain / player melalui jalan terdekat. Kesimpulanperancangan ini adalah Algoritma A Star berhasil diimplementasikan, NPC mendekati player melalui jarak terdekat dengan menghindari halangan yang ada.Kata Kunci: algoritma A Star (A*), NPC, game, Android, 2D side-scrolling RPG