AI Path Finding
First post!
Finally, after a few days of tinkering around with the algorithm, looking up pseudo-code online, fighting with C++ and getting some help from friends, I've managed to properly implement path finding.
In the images I've uploaded, the purple lines are the 'connections' to each and every single node that doesn't cross over a tower, and the green line is the path from the bottom right point, to the top left point.
Basically how it works, is whenever you place down a tower, 4 'nodes' are created just outside of each corner of the tower. Then these nodes are connected to every other node where it can (basically it connects to another node if there isn't a tower in the way). Then, the path is figured out from all of the nodes.
Specifically, the Dijkstra's path finding algorithm is used here that also implements priority queue for the nodes. There's still a lot of optimization to be done (it slows down a bit once you add too many towers), but it's an ongoing process.
I'm glad I finally got it working :) Once it's nice and snappy I can start making the actual game.
-eragnarok
Get Light+ TD
Light+ TD
Spiritual remake of the classic Starland TD online game
Status | Released |
Author | eragnarok |
Tags | Multiplayer, Tower Defense, Vector |
More posts
- Well, that's it :)Dec 07, 2022
- UpdateJul 07, 2020
- Final versionJan 04, 2019
- Checking inDec 18, 2018
- Minor Update (v1.1.3)Nov 25, 2018
- Minor Update (v1.1.2) + TournamentNov 24, 2018
- It's finished.Nov 22, 2018
- 0.8.5.1 Release (this one works)Nov 06, 2018
- 0.8.5 release (early) (DOESN'T WORK)Nov 05, 2018
- Beta Update 0.8.3Oct 10, 2018
Leave a comment
Log in with itch.io to leave a comment.