alcoranpaul / DunGen

Procedural Dungeon Generator made for Flax Engine
MIT License
0 stars 0 forks source link

For every hallway in the list, use the A* algorithm to find paths from the start of a hallway to the end #1

Closed alcoranpaul closed 5 days ago

alcoranpaul commented 1 week ago

After one path is found, it modifies the state of the world, so that future hallways can path around existing ones.

The cost function I used makes it cheaper to go through a hallway that another iteration carved, than to make a new hallway. This encourages the pathfinder to combine hallways that pass through the same area. Going through a room is possible, but expensive. So in most cases, the pathfinder will prefer to go around rooms.

alcoranpaul commented 6 days ago

Reference: https://www.youtube.com/watch?v=alU04hvz6L4&t=80s

alcoranpaul commented 5 days ago

Image Image