简体   繁体   English

平铺地图上的LibGDX AStar寻路

[英]LibGDX AStar Pathfinding on a Tiled Map

I want to have pathfinding in my .tmx file that created by tiled tool for libgdx but I am very biginner in libgdx. 我想在我的.tmx文件中找到寻路,该文件是由平铺工具为libgdx创建的,但是我在libgdx中非常重要。 can you show me a complete pathfinding example in tiled maps with libgdx? 您可以使用libgdx在平铺地图中显示完整的寻路示例吗?

I use tiled for build my game map. 我使用tile制作游戏地图。 in this grid map , I want to add node to every grid and connect with other nodes that it make us a graph to pathfinding . 在此网格图中,我想将节点添加到每个网格中,并与其他节点连接,这使我们成为探路图。

like this image 喜欢这张图片

How can I add nodes to tiles and connect them, and how can I run pathfinding on such a graph in libgdx? 如何将节点添加到图块并进行连接,如何在libgdx中的此类图形上运行寻路?

I want some thing like this : libgdx pathfinding 我想要这样的东西: libgdx寻路

Dont know if it fits your needs, but have you seen this? 不知道它是否适合您的需求,但是您看到了吗?

https://github.com/xaguzman/pathfinding https://github.com/xaguzman/pathfinding

Its well documented. 它有据可查。 Also check bridge inside it. 还要检查其中的桥。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM