Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
M4thi4sL authored Sep 22, 2024
1 parent 090b4ab commit 7f9003f
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions README.md
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)

0 comments on commit 7f9003f

Please sign in to comment.