forked from salvatorespoto/DijkstraBlueprint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,34 @@ | ||
# Unreal Engine 4 Dijkstra Shortest Path Algorithm Blueprint | ||
# Unreal Engine 5 Dijkstra Hexagonal Grid Pathfinding System | ||
|
||
A blueprint implementation of the Dijkstra shortest path algorithm on an exagonal grid. | ||
This project is a complete refactor of the [original DijkstraBlueprint repository](https://github.com/salvatorespoto/DijkstraBlueprint), updated to follow industry-standard coding practices and optimization. | ||
|
||
The project come with a level that includes a randomly generated map with obstacles and waypoints, that illustrates the algorithm result. | ||
# Features | ||
|
||
You can download the whole project or only the exported blueprint in the Release link. | ||
### BP_GridManager | ||
|
||
Responsible for managing the hexagonal grid system. | ||
|
||
Click on the following image for a demonstration video: | ||
* Random Grid Generation: Creates a random hex grid based on given dimensions. | ||
|
||
* Goal Assignment: Randomly sets a goal within the grid for pathfinding. | ||
|
||
### BP_Hexagon | ||
|
||
<p align="center"> | ||
<a href="https://www.youtube.com/watch?v=puJTlvWsM6c"> | ||
<img src="http://i3.ytimg.com/vi/puJTlvWsM6c/maxresdefault.jpg" /> | ||
</a> | ||
</p> | ||
Primarily serves as the visual representation of hexagons in the grid. All logic and data are decoupled from this class and loaded from data assets, allowing for easy customization. | ||
|
||
### PDA_Base | ||
|
||
The base class for all future data assets. It contains a single function that returns all soft references that need to be loaded. This function is intended to be overridden by child classes if needed. | ||
|
||
![softreferences](https://github.com/user-attachments/assets/19154116-e999-4a31-bd06-ea2cfa3594e0) | ||
|
||
### PDA_Hexagon | ||
|
||
Inherits from PDA_Base. It defines the hexagon's mesh, materials, and travel cost. It overrides the GetSoftReferences function to return all necessary soft references for asset initialization. | ||
|
||
# Showcase | ||
![Dijkstra](https://github.com/user-attachments/assets/ff5e47fe-50e6-45f2-b740-4d7e56a8515c) | ||
|
||
debug view: | ||
![hex_debug](https://github.com/user-attachments/assets/cbe40fa7-acb9-4f6f-857e-8a1812d0201a) |