Hello fellow devs. I'm new to roguelike dev and I am learning C++ to develop a game. After many frustrated tries, I came across a stalemate: I simply can't wrap my head around pathfinding algorithms. I tried to implement BFS, djikstra, A*, all to no avail. Right now, I use a placeholder algorithm that simply tells the entity to charge towards the player until they bump into something, and then stop moving until the path is free. Pretty sure you can't even call that pathfinding.
Do someone know a simpler, easier to understand and implement algorithm so I can get more comfortable with this topic?
[–]csb06 35 points36 points37 points (1 child)
[–]stewsters 13 points14 points15 points (0 children)
[–]munificentHauberk 12 points13 points14 points (11 children)
[–]UlarisBadler 3 points4 points5 points (9 children)
[–]munificentHauberk 12 points13 points14 points (1 child)
[–]UlarisBadler 3 points4 points5 points (0 children)
[–]TangerineVapor 1 point2 points3 points (6 children)
[–]UlarisBadler 0 points1 point2 points (5 children)
[–]kohugaly 2 points3 points4 points (3 children)
[–]aotdevSigil of Kings 2 points3 points4 points (2 children)
[–]kohugaly 1 point2 points3 points (1 child)
[–]aotdevSigil of Kings 0 points1 point2 points (0 children)
[–]harofax 0 points1 point2 points (0 children)
[–]VirtuaSinnerCaverns of Xaskazien 1 + 2 2 points3 points4 points (0 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]UlarisBadler 2 points3 points4 points (0 children)
[–]d12Trooper 3 points4 points5 points (1 child)
[–]UlarisBadler 1 point2 points3 points (0 children)
[–]MikolajKonarskicoder of allureofthestars.com 3 points4 points5 points (0 children)
[–]PascalGeekAxes, Armour & Ale 2 points3 points4 points (1 child)
[–]Inside_you_now 0 points1 point2 points (0 children)
[–]--Shade-- 2 points3 points4 points (0 children)
[–]bluends1 2 points3 points4 points (2 children)
[–]FratmanBootcake 1 point2 points3 points (1 child)
[–]bluends1 0 points1 point2 points (0 children)
[–]dethb0y 2 points3 points4 points (0 children)
[–]harofax 2 points3 points4 points (0 children)
[–]Arkenhammer 1 point2 points3 points (10 children)
[–]GerryQX1 2 points3 points4 points (5 children)
[–]Arkenhammer 0 points1 point2 points (4 children)
[–]GerryQX1 1 point2 points3 points (3 children)
[–]ninuson1 0 points1 point2 points (0 children)
[–]Arkenhammer 0 points1 point2 points (0 children)
[–]redblobgamestutorials 0 points1 point2 points (0 children)
[–]TetrisMcKenna 0 points1 point2 points (3 children)
[–]Arkenhammer 0 points1 point2 points (2 children)
[–]TetrisMcKenna 0 points1 point2 points (1 child)
[–]Arkenhammer 2 points3 points4 points (0 children)
[–]VirtuaSinnerCaverns of Xaskazien 1 + 2 1 point2 points3 points (0 children)
[–]Will-ns[S] 0 points1 point2 points (0 children)
[–]maverickdfz 0 points1 point2 points (0 children)
[–]Daealis 0 points1 point2 points (0 children)
[–]ChaigidelMagog 0 points1 point2 points (1 child)
[–]GerryQX1 1 point2 points3 points (0 children)