Open IDokan opened 3 weeks ago
I was suspicious of performance calling FSlateDrawElement::MakeLines in UMapWidget::NativePaint(), because calling draw call a lot causes severe performance issues.
As far as I investigated it, I conclude it is safe to use in reasonable loops. I attached below research.
A loop through path_points_num caused 0.007ms. A loop through path_points_num * 1000 caused 2ms.
In C++, need to override NativePaint instead of OnPaint function to draw a shape in Widget space. Because OnPaint is a function for Blueprint, OnPaint is not able to override in C++.
In order to modify drawing order using above approach, should handle multiple widgets. Layer modification is not helpful on the issue.
Pause this task for a while until we are ready to implement Event level, Boss level, and Shop level or such things...
Procedural Map Generation System in UE5.4 (Similar to Slay the Spire)
Description
Implement a procedurally generated map system in Unreal Engine 5.4 using C++. The map should resemble the structure of Slay the Spire and feature an entry node, final node, and multiple middle nodes, allowing players to choose paths. The system will generate layers of nodes with randomized connections, ensuring a path from the entry to the final node with a boss encounter.
Requirements
Map Layout
entry
,middle
, andfinal
(boss) nodes.Generation Process
Optimization and Debugging
Reference
Link to Slay the Spire Map Generation Example
Tasks
MapNode
class with properties likeNodeType
, layer, and connection data.