+1 vote

Hi all.

So I found something that could help greatly with making progress in my game, but it's in a language I don't know.

Pathfinding꞉ BFS Algorithm

I would like to "translate" it into GDScript, but I don't know what to replace what with.

EDIT: Also, I should have mentioned this before, but the map I wish to use Pathfinding on has an Half-Offset.

in Engine by (197 points)
edited by

Perhaps you can alternatively use AStar?
I googled a tutorial for using AStar here (albeit its for 3.0 and might need adjustments here and there):
https://medium.com/kitschdigital/2d-path-finding-with-astar-in-godot-3-0-7810a355905a

Hrm… Well, that works, but skips open gaps between two tiles when there's an half-offset.

I looked at the algorithim and I noticed that it does the same thing the built in path finding does so why not use it?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.