Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
# Change Log - Procedural 3D Dungeon Generator Plug-in

## 20250722-1.7.4 (57)
## 20250831-1.7.5 (58)
### Changes
* Enable/disable control of shadow generation in point light derived classes changed from per-partition to per-light.
* Fixed a misjudgment of the viewing cone in the determination of active partition.
* Limit the transfer method of the minimap to only the area of the change.
* Added actors that regularly spawn actors.
* Fixed several bugs
### 変更点
* ポイントライト派生クラスの影の生成の有効無効制御をパーティエーション単位からライト単位に変更
* アクティブパーティエーションの判定で視錐台の判定ミスを修正
* ミニマップの転送方法を変更範囲のみに限定
* アクターを定期的にスポーンするアクターを追加
* いくつかの不具合を修正

## 20250722-1.7.3 (56)
## 202500809-1.7.4 (57)
### Changes
* Fixed several bugs
### 変更点
* いくつかの不具合を修正

## 202500807-1.7.3 (56)
### Changes
* Added widget class to assist in creating mini-maps
* Adjusted the effective range of point light and spot light shadows
Expand Down
4 changes: 2 additions & 2 deletions DungeonGenerator.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 57,
"VersionName": "1.7.4",
"Version": 58,
"VersionName": "1.7.5",
"FriendlyName": "Dungeon Generator",
"Description": "Procedural 3d dungeon generator plugin. Easy generation of levels, mini-maps and missions.",
"Category": "Procedural Systems",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<a href="https://github.com/shun126/UE5-DungeonGeneratorDemo/issues">Issues</a>,
<a href="https://github.com/shun126/UE5-DungeonGeneratorDemo/discussions">Discussions</a>,
<a href="https://github.com/shun126/UE5-DungeonGeneratorDemo/wiki">Wiki</a>,
<a href="https://mnu.sakura.ne.jp/_doxygen/dungeon_generator">Doxygen</a>
<a href="https://happy-game-dev.undo.jp/_doxygen/dungeon_generator/index.html">Doxygen</a>
</p>
</div>

Expand Down Expand Up @@ -82,7 +82,7 @@ Or, [Fab](https://fab.com/s/f5587c55bad0) is releasing it under Epic license. If
# 👀 See also
* [Wiki](https://github.com/shun126/UE5-DungeonGeneratorDemo/wiki)
* [DeepWiki](https://deepwiki.com/shun126/DungeonGenerator)
* [Doxygen](https://mnu.sakura.ne.jp/_doxygen/dungeon_generator/)
* [Doxygen](https://happy-game-dev.undo.jp/_doxygen/dungeon_generator/index.html)
* [Issues](https://github.com/shun126/UE5-DungeonGeneratorDemo/issues)
* [Discussions](https://github.com/shun126/UE5-DungeonGeneratorDemo/discussions)

Expand Down
19 changes: 10 additions & 9 deletions Source/DungeonGenerator/DungeonGenerator.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,33 @@ public DungeonGenerator(ReadOnlyTargetRules Target) : base(Target)
new string[]
{
});
*/
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"AIModule"
});
});
*/

PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"AIModule",
"NavigationSystem",
"NetCore",
"NetCore",
"SlateCore",
"UMG",
"Foliage"
});
"Foliage",
}
);
if (Target.bBuildEditor)
{
PrivateDependencyModuleNames.AddRange(
new string[] {
"UnrealEd",
"JsonUtilities",
});
"JsonUtilities",
});
}

/*
Expand Down
17 changes: 11 additions & 6 deletions Source/DungeonGenerator/Private/Core/Generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1533,13 +1533,17 @@ namespace dungeon
const int32 minZ = room->GetBackground();
const int32 maxZ = room->GetForeground();

const int32 count = room->GetRect().Area() / 8;
for (int32 i = 0; i < count; ++i)
int32 count = static_cast<int32>(std::sqrt(static_cast<float>(room->GetRect().Area())));
if (count >= 5)
{
const int32 x = mGenerateParameter.GetRandom()->Get(room->GetLeft(), room->GetRight());
const int32 y = mGenerateParameter.GetRandom()->Get(room->GetTop(), room->GetBottom());
if (CanFillStructuralColumnVoxel(x, y, minZ, maxZ))
FillStructuralColumnVoxel(x, y, minZ, maxZ);
count /= 2;
for (int32 i = 0; i < count; ++i)
{
const int32 x = mGenerateParameter.GetRandom()->Get(room->GetLeft(), room->GetRight());
const int32 y = mGenerateParameter.GetRandom()->Get(room->GetTop(), room->GetBottom());
if (CanFillStructuralColumnVoxel(x, y, minZ, maxZ))
FillStructuralColumnVoxel(x, y, minZ, maxZ);
}
}

if (mGenerateParameter.GetRandom()->Get(3) == 0)
Expand Down Expand Up @@ -1620,6 +1624,7 @@ namespace dungeon
switch (mVoxel->Get(location).GetType())
{
case Grid::Type::Slope:
case Grid::Type::DownSpace:
case Grid::Type::StructuralColumn:
return false;

Expand Down
7 changes: 3 additions & 4 deletions Source/DungeonGenerator/Private/Core/Helper/DrawLots.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ All Rights Reserved.

namespace dungeon
{
/*
重み付き抽選
*/
/**
* 重み付き抽選
*/
template <class InputIterator, class Predicate>
InputIterator DrawLots(const std::shared_ptr<Random>& random, InputIterator first, InputIterator last, Predicate pred) noexcept
{
Expand All @@ -31,7 +31,6 @@ namespace dungeon
InputIterator mBody;
};
std::vector<Entry> weights;
weights.reserve(std::distance(first, last));
for (InputIterator i = first; i != last; ++i)
{
auto weight = pred(*i);
Expand Down
9 changes: 5 additions & 4 deletions Source/DungeonGenerator/Private/DungeonGenerateActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ ADungeonGenerateActor::ADungeonGenerateActor(const FObjectInitializer& initializ
{
// Tick Enable
PrimaryActorTick.bCanEverTick = PrimaryActorTick.bStartWithTickEnabled = true;
PrimaryActorTick.TickInterval = 6.f / 60.f;

SetCanBeDamaged(false);
}
Expand Down Expand Up @@ -389,14 +390,14 @@ float ADungeonGenerateActor::GetGridSize() const
return DungeonGenerateParameter && DungeonGenerateParameter->GridSize;
}

FVector ADungeonGenerateActor::GetRoomMaxSize() const
FVector ADungeonGenerateActor::GetRoomMaxSizeWithMargin(const int32_t margin) const
{
if (DungeonGenerateParameter)
{
FVector result;
result.X = DungeonGenerateParameter->GetRoomWidth().Max;
result.Y = DungeonGenerateParameter->GetRoomDepth().Max;
result.Z = DungeonGenerateParameter->GetRoomHeight().Max;
result.X = DungeonGenerateParameter->GetRoomWidth().Max + margin;
result.Y = DungeonGenerateParameter->GetRoomDepth().Max + margin;
result.Z = DungeonGenerateParameter->GetRoomHeight().Max + margin;
return result * DungeonGenerateParameter->GetGridSize().To3D();
}
return FVector::ZeroVector;
Expand Down
Loading