Skip to content

An implementation of the Dijkstra shortest path algorithm on an hexagonal grid using a priority queue in Unreal Engine 5.4

Notifications You must be signed in to change notification settings

M4thi4sL/UE5HexDijkstra

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unreal Engine 5 Dijkstra Hexagonal Grid Pathfinding System

This project is a complete refactor of the original DijkstraBlueprint repository, updated to follow industry-standard coding practices and optimization.

Branches

Dijkstra_blueprint contains the latest version of the blueprint only implementation.

Dijkstra_C++ contains the latest version of the C++ / Blueprint implementation.

You can also find a zipped up version of either project in the release section.

🚧 TODO: add speed comparison between blueprint and c++ versions

Features

BP_GridManager

Responsible for managing the hexagonal grid system.

  • Random Grid Generation: Creates a random hex grid based on given dimensions.

  • Goal Assignment: Randomly sets a goal within the grid for pathfinding.

  • Path-finding implementation based on Dijkstra.

BP_Hexagon

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

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

debug view: hex_debug

About

An implementation of the Dijkstra shortest path algorithm on an hexagonal grid using a priority queue in Unreal Engine 5.4

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published