AI Pathfinding On a Round Planet - Race Game Devlog
In this video, I will implement the A* pathfinding algorythm on a round planet to let my AI car in my race game reach a randomly selected goal point no matter where it is and what is in the way. It will dodge obstacles like mountains and find the shortest path. I will also start making my car follow the path. The A* pathfinding algorythm is usually used in 2D or in 3D on flat surfaces by divinding the surface into a grid and calculating values for each grid that lets the computer find the path that takes the least grid moves. That is done by checking the distance from the start and to the end position. The shorter these distances, the better. However, I wanted to have pathfinding on a sphere. Dividing a planet into a grid is not really doable or at least wouldn't do what I wanted. So, instead, I put a bunch of points on the planet at equal distances and used those positions to do the A* algorythm. Then, I had a list of position to follow to reach the end goal with the shortest path that dodges obstacles like mountains. It may not be perfect, but it's pretty good ! --- Subscribe for game making tutorials, other game-making related content and to follow my projects with the dev logs ! Check out my website for my other socials and if you want to see and try the games I made: https://bit.ly/MaxMakesGames 0:00 Intro 0:21 UI Improvements 0:35 Cash & Challenges 0:50 Why Pathfinding 1:10 How A* Works 2:05 A* Results 2:30 Max Angle 2:45 Even Points On Sphere Surface 4:18 Make Car Follow Path 5:30 Random Planet
Download
0 formatsNo download links available.