mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 02:45:55 +00:00
Mapping and generation fixes
This commit is contained in:
parent
7482cfa496
commit
8c17738371
18 changed files with 628 additions and 53 deletions
|
|
@ -22,6 +22,7 @@
|
|||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FLocal_003FJetBrains_003FShared_003FvAny_003FSourcesCache_003Ff1d69ec2da76ccf9bc8a75c8e0fdca9a7ba1adf8c8c9d5047e2fa5991c02eca_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APlayerMovement_005FScriptMethods_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FLocal_003FJetBrains_003FShared_003FvAny_003FSourcesCache_003F4af4702ac4bbb9ab7299554c41beea2bf703b4a_003FPlayerMovement_005FScriptMethods_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APlayerMovement_005FScriptMethods_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FLocal_003FTemp_003FSourceGeneratedDocuments_003F4DC97777E7037C0C573FE095_003FGodot_002ESourceGenerators_003FGodot_002ESourceGenerators_002EScriptMethodsGenerator_003FPlayerMovement_005FScriptMethods_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARandomNumberGenerator_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FLocal_003FJetBrains_003FShared_003FvAny_003FSourcesCache_003Ff3904a37595c6ba196c53d51d222137924fbe088bafe31479177247b658a1_003FRandomNumberGenerator_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AScriptManagerBridge_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FLocal_003FJetBrains_003FShared_003FvAny_003FDecompilerCache_003Fdecompiler_003F4fd22cd129a84c16b5d8004b467c426f518800_003F3a_003Fc456f450_003FScriptManagerBridge_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStringName_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb9315b94b9124600ad99083b1bc65e44584a00_003Faa_003Fd6996970_003FStringName_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelpers_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FLocal_003FJetBrains_003FShared_003FvAny_003FSourcesCache_003Fbb2a94dce7ca55a596694df58d3ca91c6d9c9c9c9813775e4d1abd0f91dc59_003FThrowHelpers_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
|
|
|
|||
19
Resources/RogueliteMaps/Corridor_1x2.tres
Normal file
19
Resources/RogueliteMaps/Corridor_1x2.tres
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[gd_resource type="Resource" script_class="RogueliteRoomResource" load_steps=6 format=3 uid="uid://q1ugy8nvmvsd"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://cocl3qontm3be" path="res://Resources/Enemies/Base_Fairy.tres" id="1_odkhu"]
|
||||
[ext_resource type="Resource" uid="uid://cqfyuurvqb8m6" path="res://Resources/Enemies/Base_Fairy_Special.tres" id="2_a3aid"]
|
||||
[ext_resource type="Resource" uid="uid://qbo6avc7x64b" path="res://Resources/Enemies/Fairy_Guard.tres" id="3_23niv"]
|
||||
[ext_resource type="Resource" uid="uid://cfdvg162u65sr" path="res://Resources/Enemies/Thermathron.tres" id="4_cqpv8"]
|
||||
[ext_resource type="Script" uid="uid://bl2ne8w12e3a" path="res://Scripts/Resources/Roguelite/RogueliteRoomResource.cs" id="5_cqqot"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("5_cqqot")
|
||||
RoomName = &"LongMap"
|
||||
Type = 1
|
||||
ScenePath = &"uid://cr8mtm0gfbpub"
|
||||
Size = Vector2i(1, 2)
|
||||
StartShrouded = true
|
||||
DoorGridPositions = Array[Vector2i]([Vector2i(0, -1), Vector2i(0, 1), Vector2i(1, 0), Vector2i(-1, 0)])
|
||||
SpawnableEnemies = Array[Object]([ExtResource("1_odkhu"), ExtResource("2_a3aid"), ExtResource("3_23niv"), ExtResource("4_cqpv8")])
|
||||
DoorDirections = 30
|
||||
metadata/_custom_type_script = "uid://bl2ne8w12e3a"
|
||||
19
Resources/RogueliteMaps/Corridor_3x2.tres
Normal file
19
Resources/RogueliteMaps/Corridor_3x2.tres
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[gd_resource type="Resource" script_class="RogueliteRoomResource" load_steps=6 format=3 uid="uid://c1lxymqnucaas"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://cocl3qontm3be" path="res://Resources/Enemies/Base_Fairy.tres" id="1_bium7"]
|
||||
[ext_resource type="Resource" uid="uid://cqfyuurvqb8m6" path="res://Resources/Enemies/Base_Fairy_Special.tres" id="2_rya56"]
|
||||
[ext_resource type="Resource" uid="uid://qbo6avc7x64b" path="res://Resources/Enemies/Fairy_Guard.tres" id="3_1g85j"]
|
||||
[ext_resource type="Resource" uid="uid://cfdvg162u65sr" path="res://Resources/Enemies/Thermathron.tres" id="4_uel5e"]
|
||||
[ext_resource type="Script" uid="uid://bl2ne8w12e3a" path="res://Scripts/Resources/Roguelite/RogueliteRoomResource.cs" id="5_sg6hg"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("5_sg6hg")
|
||||
RoomName = &"LargeMap"
|
||||
Type = 1
|
||||
ScenePath = &"uid://d06oxglp06qyt"
|
||||
Size = Vector2i(3, 1)
|
||||
StartShrouded = true
|
||||
DoorGridPositions = Array[Vector2i]([Vector2i(0, -1), Vector2i(0, 1), Vector2i(1, 0), Vector2i(-1, 0)])
|
||||
SpawnableEnemies = Array[Object]([ExtResource("1_bium7"), ExtResource("2_rya56"), ExtResource("3_1g85j"), ExtResource("4_uel5e")])
|
||||
DoorDirections = 30
|
||||
metadata/_custom_type_script = "uid://bl2ne8w12e3a"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="Resource" script_class="RogueliteMapTheme" load_steps=57 format=3 uid="uid://cw6868vuvuynh"]
|
||||
[gd_resource type="Resource" script_class="RogueliteMapTheme" load_steps=60 format=3 uid="uid://cw6868vuvuynh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bwtif3if3ea0u" path="res://Scripts/Resources/RogueliteMapTheme.cs" id="1_2rtdw"]
|
||||
[ext_resource type="Resource" uid="uid://cltxhkrqp055v" path="res://Resources/Items/Money_Pickup.tres" id="1_ae3bb"]
|
||||
|
|
@ -35,6 +35,7 @@
|
|||
[ext_resource type="Resource" uid="uid://cwtma7mxged8a" path="res://Resources/RogueliteMaps/ShopRoom1.tres" id="18_gh41q"]
|
||||
[ext_resource type="Resource" uid="uid://crqgvauqarfaq" path="res://Resources/RogueliteMaps/TreasureRoom1.tres" id="19_bn1n6"]
|
||||
[ext_resource type="Resource" uid="uid://bo4efv7rwowuh" path="res://Resources/RogueliteMaps/SecretRoom1.tres" id="20_0on7r"]
|
||||
[ext_resource type="PackedScene" uid="uid://dx1urm7nttkqk" path="res://Scenes/Actors/level_teleporter.tscn" id="22_eegnh"]
|
||||
[ext_resource type="Resource" uid="uid://bxvv82vno8ub1" path="res://Resources/RogueliteMaps/1x1_1.tres" id="23_p3lfl"]
|
||||
[ext_resource type="Resource" uid="uid://d01146n5uo0gd" path="res://Resources/RogueliteMaps/1x2_1.tres" id="24_tsgja"]
|
||||
[ext_resource type="PackedScene" uid="uid://cl7s06sk106uo" path="res://Scenes/Props/VendingMachine.tscn" id="30_exyjy"]
|
||||
|
|
@ -45,8 +46,10 @@
|
|||
[ext_resource type="PackedScene" uid="uid://dff3lrk4srymb" path="res://Scenes/Misc/Vertical_Solid_Wall.tscn" id="40_tsgja"]
|
||||
[ext_resource type="Resource" uid="uid://cqlh2k4fndgg1" path="res://Resources/RogueliteMaps/Acid_Horizontal_Walkway.tres" id="40_w335g"]
|
||||
[ext_resource type="Resource" uid="uid://bdpbekqhuuq4l" path="res://Resources/Items/Shield_Extend_Pickup.tres" id="41_tsgja"]
|
||||
[ext_resource type="Resource" uid="uid://q1ugy8nvmvsd" path="res://Resources/RogueliteMaps/Corridor_1x2.tres" id="42_nnvxo"]
|
||||
[ext_resource type="Resource" uid="uid://ciybnocjfpshh" path="res://Resources/Items/Heart_Extend_Pickup.tres" id="42_qo6vk"]
|
||||
[ext_resource type="PackedScene" uid="uid://c21m7w5ahpsd0" path="res://Scenes/Activable/Shroud.tscn" id="43_3kwn2"]
|
||||
[ext_resource type="Resource" uid="uid://c1lxymqnucaas" path="res://Resources/RogueliteMaps/Corridor_3x2.tres" id="43_11cll"]
|
||||
[ext_resource type="PackedScene" uid="uid://byms2dhliyux0" path="res://Scenes/Actors/teleporter.tscn" id="43_to7mi"]
|
||||
[ext_resource type="Resource" uid="uid://bgcgeg187vg1h" path="res://Resources/Items/IcicleRepeater.tres" id="45_f7mru"]
|
||||
[ext_resource type="Resource" uid="uid://dau0s8ob7qnpc" path="res://Resources/Items/IceShotgun.tres" id="46_3kwn2"]
|
||||
|
|
@ -90,11 +93,13 @@ KeyCardsPrefabs = Array[PackedScene]([ExtResource("5_0lwa1"), ExtResource("6_03i
|
|||
ShroudPrefab = ExtResource("43_3kwn2")
|
||||
PointItemResource = ExtResource("5_ga54h")
|
||||
TeleporterPrefab = ExtResource("43_to7mi")
|
||||
LevelTeleporterPrefab = ExtResource("22_eegnh")
|
||||
LevelTeleporterDestinationPath = &"uid://bf1kqr3o6r6d4"
|
||||
ChestChance = 15.0
|
||||
EnemyDropChance = 40.0
|
||||
ChestLootTable = SubResource("Resource_nnvxo")
|
||||
ShopLootTable = SubResource("Resource_11cll")
|
||||
EnemiesLootTable = SubResource("Resource_tsgja")
|
||||
WeaponsLootTable = SubResource("Resource_eegnh")
|
||||
Rooms = Array[Object]([ExtResource("5_sludw"), ExtResource("6_b3pjl"), ExtResource("7_nil27"), ExtResource("8_pmfuo"), ExtResource("9_0lwa1"), ExtResource("14_rjphh"), ExtResource("15_2gg5d"), ExtResource("16_402ix"), ExtResource("17_52l5g"), ExtResource("18_gh41q"), ExtResource("19_bn1n6"), ExtResource("20_0on7r"), ExtResource("23_p3lfl"), ExtResource("24_tsgja"), ExtResource("36_ga54h"), ExtResource("37_cxv74"), ExtResource("38_f7mru"), ExtResource("39_3kwn2"), ExtResource("40_w335g")])
|
||||
Rooms = Array[Object]([ExtResource("5_sludw"), ExtResource("6_b3pjl"), ExtResource("7_nil27"), ExtResource("8_pmfuo"), ExtResource("9_0lwa1"), ExtResource("14_rjphh"), ExtResource("15_2gg5d"), ExtResource("16_402ix"), ExtResource("17_52l5g"), ExtResource("18_gh41q"), ExtResource("19_bn1n6"), ExtResource("20_0on7r"), ExtResource("23_p3lfl"), ExtResource("24_tsgja"), ExtResource("36_ga54h"), ExtResource("37_cxv74"), ExtResource("38_f7mru"), ExtResource("39_3kwn2"), ExtResource("40_w335g"), ExtResource("42_nnvxo"), ExtResource("43_11cll")])
|
||||
metadata/_custom_type_script = "uid://bwtif3if3ea0u"
|
||||
|
|
|
|||
19
Resources/RogueliteMaps/Generic_3x2.tres
Normal file
19
Resources/RogueliteMaps/Generic_3x2.tres
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[gd_resource type="Resource" script_class="RogueliteRoomResource" load_steps=6 format=3 uid="uid://c5lwk3cho2f4s"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://cocl3qontm3be" path="res://Resources/Enemies/Base_Fairy.tres" id="1_mnnmw"]
|
||||
[ext_resource type="Resource" uid="uid://cqfyuurvqb8m6" path="res://Resources/Enemies/Base_Fairy_Special.tres" id="2_m6mrv"]
|
||||
[ext_resource type="Resource" uid="uid://qbo6avc7x64b" path="res://Resources/Enemies/Fairy_Guard.tres" id="3_qfomp"]
|
||||
[ext_resource type="Resource" uid="uid://cfdvg162u65sr" path="res://Resources/Enemies/Thermathron.tres" id="4_oqn6u"]
|
||||
[ext_resource type="Script" uid="uid://bl2ne8w12e3a" path="res://Scripts/Resources/Roguelite/RogueliteRoomResource.cs" id="5_0ho8j"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("5_0ho8j")
|
||||
RoomName = &"LargeMap"
|
||||
Type = 1
|
||||
ScenePath = &"uid://c36nvk7cw3emg"
|
||||
Size = Vector2i(3, 1)
|
||||
StartShrouded = true
|
||||
DoorGridPositions = Array[Vector2i]([Vector2i(0, -1), Vector2i(0, 1), Vector2i(1, 0), Vector2i(-1, 0)])
|
||||
SpawnableEnemies = Array[Object]([ExtResource("1_mnnmw"), ExtResource("2_m6mrv"), ExtResource("3_qfomp"), ExtResource("4_oqn6u")])
|
||||
DoorDirections = 30
|
||||
metadata/_custom_type_script = "uid://bl2ne8w12e3a"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=15 format=4 uid="uid://24wh7h2dbljf"]
|
||||
[gd_scene load_steps=18 format=4 uid="uid://24wh7h2dbljf"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b2j00riayxkit" path="res://Scripts/Controllers/RogueliteRoom.cs" id="1_vhsym"]
|
||||
[ext_resource type="Resource" uid="uid://dn3ai56rrxfnk" path="res://Resources/RogueliteMaps/Beginner1.tres" id="2_vhsym"]
|
||||
|
|
@ -9,6 +9,8 @@
|
|||
[ext_resource type="PackedScene" uid="uid://djf0y08ix66fn" path="res://Scenes/Interactable/Chest.tscn" id="7_kublc"]
|
||||
[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="8_dbn5e"]
|
||||
[ext_resource type="Resource" uid="uid://cltxhkrqp055v" path="res://Resources/Items/Money_Pickup.tres" id="9_5yebg"]
|
||||
[ext_resource type="Script" uid="uid://8umfjejbkcsm" path="res://Scripts/Actors/RogueliteEnemySpawner.cs" id="10_c0yr1"]
|
||||
[ext_resource type="Resource" uid="uid://cocl3qontm3be" path="res://Resources/Enemies/Base_Fairy.tres" id="11_5rt6n"]
|
||||
[ext_resource type="Script" uid="uid://g6oraxgd87ij" path="res://Scripts/Actors/TeleporterMarker.cs" id="12_f3e1d"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3e762pxublbt" path="res://Sprites/teleporter.png" id="13_c0yr1"]
|
||||
[ext_resource type="LabelSettings" uid="uid://buk3e7bbwmnv1" path="res://Resources/Styles/Hud_Text_Style.tres" id="14_c0yr1"]
|
||||
|
|
@ -20,6 +22,10 @@ size = Vector2(272, 85)
|
|||
atlas = ExtResource("13_c0yr1")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5yebg"]
|
||||
atlas = ExtResource("13_c0yr1")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[node name="Tilemaps" type="Node2D" node_paths=PackedStringArray("RoomClearActivation")]
|
||||
process_mode = 1
|
||||
script = ExtResource("1_vhsym")
|
||||
|
|
@ -61,6 +67,11 @@ LootTable = Array[ExtResource("8_dbn5e")]([ExtResource("9_5yebg"), ExtResource("
|
|||
|
||||
[node name="EnemySpawners" type="Node2D" parent="."]
|
||||
|
||||
[node name="RogueliteEnemySpawner3" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(293, 58)
|
||||
script = ExtResource("10_c0yr1")
|
||||
Enemy = ExtResource("11_5rt6n")
|
||||
|
||||
[node name="PlayerEnterDetector" type="Area2D" parent="."]
|
||||
visible = false
|
||||
collision_layer = 0
|
||||
|
|
@ -92,4 +103,19 @@ script = ExtResource("12_f3e1d")
|
|||
Type = 2
|
||||
MarkerTexture = SubResource("AtlasTexture_5rt6n")
|
||||
|
||||
[node name="Exit" type="Marker2D" parent="Features"]
|
||||
position = Vector2(40, 136)
|
||||
script = ExtResource("12_f3e1d")
|
||||
Type = 5
|
||||
MarkerTexture = SubResource("AtlasTexture_5yebg")
|
||||
|
||||
[node name="Label2" type="Label" parent="Features/Exit"]
|
||||
z_index = 1
|
||||
offset_left = -15.0
|
||||
offset_top = 12.0
|
||||
offset_right = 37.0
|
||||
offset_bottom = 35.0
|
||||
text = "Exit test"
|
||||
label_settings = ExtResource("14_c0yr1")
|
||||
|
||||
[connection signal="area_entered" from="PlayerEnterDetector" to="." method="OnRoomEntered"]
|
||||
|
|
|
|||
|
|
@ -82,4 +82,10 @@ script = ExtResource("7_5nx6x")
|
|||
Type = 1
|
||||
MarkerTexture = SubResource("AtlasTexture_5nx6x")
|
||||
|
||||
[node name="Exit" type="Marker2D" parent="Features"]
|
||||
position = Vector2(161, 112)
|
||||
script = ExtResource("7_5nx6x")
|
||||
Type = 5
|
||||
MarkerTexture = SubResource("AtlasTexture_5nx6x")
|
||||
|
||||
[connection signal="area_entered" from="PlayerEnterDetector" to="." method="OnRoomEntered"]
|
||||
|
|
|
|||
144
Scenes/Maps/RogueliteMaps/Corridor_3x2.tscn
Normal file
144
Scenes/Maps/RogueliteMaps/Corridor_3x2.tscn
Normal file
File diff suppressed because one or more lines are too long
117
Scenes/Maps/RogueliteMaps/Generic_3x2.tscn
Normal file
117
Scenes/Maps/RogueliteMaps/Generic_3x2.tscn
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=17 format=4 uid="uid://o2bbndsuqj28"]
|
||||
[gd_scene load_steps=16 format=4 uid="uid://o2bbndsuqj28"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b2j00riayxkit" path="res://Scripts/Controllers/RogueliteRoom.cs" id="1_mfwx1"]
|
||||
[ext_resource type="Resource" uid="uid://fa7jvapga27y" path="res://Scenes/Maps/RogueliteMaps/LongSidePassage.tres" id="2_d1uiv"]
|
||||
|
|
@ -7,7 +7,6 @@
|
|||
[ext_resource type="Script" uid="uid://8umfjejbkcsm" path="res://Scripts/Actors/RogueliteEnemySpawner.cs" id="5_oxby7"]
|
||||
[ext_resource type="PackedScene" uid="uid://bc64lr3vlwchq" path="res://Scenes/Door_Vertical.tscn" id="5_w63wm"]
|
||||
[ext_resource type="PackedScene" uid="uid://crph24e6e0v0q" path="res://Scenes/Interactable/Control_Pad.tscn" id="6_570qx"]
|
||||
[ext_resource type="Resource" uid="uid://ysd6wl2gmdhn" path="res://Resources/Enemies/Turret360.tres" id="6_w63wm"]
|
||||
[ext_resource type="PackedScene" uid="uid://dcbcyp1qogcl0" path="res://Scenes/Props/BigTankHorizontal.tscn" id="7_570qx"]
|
||||
[ext_resource type="Resource" uid="uid://qbo6avc7x64b" path="res://Resources/Enemies/Fairy_Guard.tres" id="10_kagm8"]
|
||||
[ext_resource type="Resource" uid="uid://cocl3qontm3be" path="res://Resources/Enemies/Base_Fairy.tres" id="11_04mp4"]
|
||||
|
|
@ -75,11 +74,6 @@ position = Vector2(255, 224)
|
|||
|
||||
[node name="EnemySpawners" type="Node2D" parent="."]
|
||||
|
||||
[node name="RogueliteEnemySpawner6" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(174, 40)
|
||||
script = ExtResource("5_oxby7")
|
||||
Enemy = ExtResource("6_w63wm")
|
||||
|
||||
[node name="RogueliteEnemySpawner7" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(169, 288)
|
||||
script = ExtResource("5_oxby7")
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
[gd_scene load_steps=7 format=4 uid="uid://c36nvk7cw3emg"]
|
||||
[gd_scene load_steps=13 format=4 uid="uid://c36nvk7cw3emg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b2j00riayxkit" path="res://Scripts/Controllers/RogueliteRoom.cs" id="1_5bd7y"]
|
||||
[ext_resource type="Resource" uid="uid://cjtcksew0qy6d" path="res://Resources/RogueliteMaps/TestRGMapLarge.tres" id="2_5bd7y"]
|
||||
[ext_resource type="TileSet" uid="uid://6k28roiljylj" path="res://Tilesets/factory_tileset.tres" id="5_2mndj"]
|
||||
[ext_resource type="Script" uid="uid://8umfjejbkcsm" path="res://Scripts/Actors/RogueliteEnemySpawner.cs" id="5_4pnhf"]
|
||||
[ext_resource type="Script" uid="uid://krean0uywtms" path="res://Scripts/TilemapAvoidance.cs" id="6_1dlui"]
|
||||
[ext_resource type="Resource" uid="uid://cocl3qontm3be" path="res://Resources/Enemies/Base_Fairy.tres" id="6_1w61p"]
|
||||
[ext_resource type="Resource" uid="uid://qbo6avc7x64b" path="res://Resources/Enemies/Fairy_Guard.tres" id="7_2mndj"]
|
||||
[ext_resource type="Script" uid="uid://umyqgyxjiaig" path="res://Scripts/Actors/ChestMarker.cs" id="8_1dlui"]
|
||||
[ext_resource type="Texture2D" uid="uid://qeh4ai8h6sw5" path="res://Sprites/Chest.png" id="9_d57gj"]
|
||||
|
||||
[sub_resource type="NavigationPolygon" id="NavigationPolygon_rlq0q"]
|
||||
vertices = PackedVector2Array(474, 58, 474, 10, 486, 10, 486, 58, 794, 58, 794, 10, 806, 10, 806, 58, 934, 58, 934, 134, 806, 134, 794, 134, 806, 150, 794, 150, 486, 134, 474, 134, 486, 150, 474, 150, 166, 58, 166, 134, 166, 150, 154, 150, 154, 134, 154, 58, 26, 134, 26, 58, 166, 10, 154, 10)
|
||||
|
|
@ -15,6 +20,10 @@ source_geometry_mode = 1
|
|||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5bd7y"]
|
||||
size = Vector2(909, 85)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wvfe8"]
|
||||
atlas = ExtResource("9_d57gj")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[node name="Map" type="Node2D" node_paths=PackedStringArray("RoomClearActivation")]
|
||||
process_mode = 1
|
||||
script = ExtResource("1_5bd7y")
|
||||
|
|
@ -45,17 +54,6 @@ metadata/_edit_lock_ = true
|
|||
[node name="Actors" type="Node2D" parent="Tilemaps"]
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="EnemySpawners" type="Node2D" parent="."]
|
||||
|
||||
[node name="RogueliteEnemySpawner" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(57, 67)
|
||||
|
||||
[node name="RogueliteEnemySpawner2" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(373, 75)
|
||||
|
||||
[node name="RogueliteEnemySpawner3" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(739, 101)
|
||||
|
||||
[node name="NavigationRegion2D" type="NavigationRegion2D" parent="."]
|
||||
visible = false
|
||||
navigation_polygon = SubResource("NavigationPolygon_rlq0q")
|
||||
|
|
@ -69,4 +67,52 @@ collision_mask = 2
|
|||
position = Vector2(480.5, 94.5)
|
||||
shape = SubResource("RectangleShape2D_5bd7y")
|
||||
|
||||
[node name="EnemySpawners" type="Node2D" parent="."]
|
||||
|
||||
[node name="RogueliteEnemySpawner6" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(281, 102)
|
||||
script = ExtResource("5_4pnhf")
|
||||
Enemy = ExtResource("6_1w61p")
|
||||
|
||||
[node name="RogueliteEnemySpawner7" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(362, 94)
|
||||
script = ExtResource("5_4pnhf")
|
||||
Enemy = ExtResource("7_2mndj")
|
||||
|
||||
[node name="RogueliteEnemySpawner8" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(437, 119)
|
||||
script = ExtResource("5_4pnhf")
|
||||
Enemy = ExtResource("6_1w61p")
|
||||
|
||||
[node name="RogueliteEnemySpawner9" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(232, 60)
|
||||
script = ExtResource("5_4pnhf")
|
||||
Enemy = ExtResource("7_2mndj")
|
||||
|
||||
[node name="Features" type="Node2D" parent="."]
|
||||
|
||||
[node name="Chest" type="Marker2D" parent="Features"]
|
||||
position = Vector2(171, 80)
|
||||
script = ExtResource("8_1dlui")
|
||||
MarkerTexture = SubResource("AtlasTexture_wvfe8")
|
||||
SpawnChance = 10.0
|
||||
|
||||
[node name="Chest2" type="Marker2D" parent="Features"]
|
||||
position = Vector2(314, 84)
|
||||
script = ExtResource("8_1dlui")
|
||||
MarkerTexture = SubResource("AtlasTexture_wvfe8")
|
||||
SpawnChance = 10.0
|
||||
|
||||
[node name="Chest4" type="Marker2D" parent="Features"]
|
||||
position = Vector2(118, 137)
|
||||
script = ExtResource("8_1dlui")
|
||||
MarkerTexture = SubResource("AtlasTexture_wvfe8")
|
||||
SpawnChance = 10.0
|
||||
|
||||
[node name="Chest3" type="Marker2D" parent="Features"]
|
||||
position = Vector2(81, 83)
|
||||
script = ExtResource("8_1dlui")
|
||||
MarkerTexture = SubResource("AtlasTexture_wvfe8")
|
||||
SpawnChance = 10.0
|
||||
|
||||
[connection signal="area_entered" from="PlayerEnterDetector" to="." method="OnRoomEntered"]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
[gd_scene load_steps=7 format=4 uid="uid://hmu4dw62c10t"]
|
||||
[gd_scene load_steps=12 format=4 uid="uid://hmu4dw62c10t"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b2j00riayxkit" path="res://Scripts/Controllers/RogueliteRoom.cs" id="1_4lag8"]
|
||||
[ext_resource type="Resource" uid="uid://ryfk7g1wqypk" path="res://Resources/RogueliteMaps/TestRGMapLong.tres" id="2_4lag8"]
|
||||
[ext_resource type="Script" uid="uid://8umfjejbkcsm" path="res://Scripts/Actors/RogueliteEnemySpawner.cs" id="5_ehmby"]
|
||||
[ext_resource type="TileSet" uid="uid://6k28roiljylj" path="res://Tilesets/factory_tileset.tres" id="5_upf1e"]
|
||||
[ext_resource type="Resource" uid="uid://cocl3qontm3be" path="res://Resources/Enemies/Base_Fairy.tres" id="6_112g0"]
|
||||
[ext_resource type="Script" uid="uid://krean0uywtms" path="res://Scripts/TilemapAvoidance.cs" id="6_kwstq"]
|
||||
[ext_resource type="Script" uid="uid://umyqgyxjiaig" path="res://Scripts/Actors/ChestMarker.cs" id="7_wcv20"]
|
||||
[ext_resource type="Texture2D" uid="uid://qeh4ai8h6sw5" path="res://Sprites/Chest.png" id="8_upf1e"]
|
||||
|
||||
[sub_resource type="NavigationPolygon" id="NavigationPolygon_rlq0q"]
|
||||
vertices = PackedVector2Array(166, 58, 294, 58, 294, 294, 166, 294, 166, 310, 154, 310, 154, 294, 154, 58, 26, 294, 26, 58, 166, 10, 154, 10)
|
||||
|
|
@ -15,10 +19,15 @@ source_geometry_mode = 1
|
|||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4lag8"]
|
||||
size = Vector2(272, 247)
|
||||
|
||||
[node name="Map" type="Node2D"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kwstq"]
|
||||
atlas = ExtResource("8_upf1e")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[node name="Map" type="Node2D" node_paths=PackedStringArray("RoomClearActivation")]
|
||||
process_mode = 1
|
||||
script = ExtResource("1_4lag8")
|
||||
RoomResource = ExtResource("2_4lag8")
|
||||
RoomClearActivation = []
|
||||
|
||||
[node name="Tilemaps" type="Node2D" parent="." groups=["navigation_polygon_source_geometry_group"]]
|
||||
|
||||
|
|
@ -46,14 +55,10 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="EnemySpawners" type="Node2D" parent="."]
|
||||
|
||||
[node name="RogueliteEnemySpawner" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(57, 67)
|
||||
|
||||
[node name="RogueliteEnemySpawner2" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(82, 185)
|
||||
|
||||
[node name="RogueliteEnemySpawner3" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(261, 248)
|
||||
[node name="RogueliteEnemySpawner6" type="Marker2D" parent="EnemySpawners"]
|
||||
position = Vector2(99, 118)
|
||||
script = ExtResource("5_ehmby")
|
||||
Enemy = ExtResource("6_112g0")
|
||||
|
||||
[node name="NavigationRegion2D" type="NavigationRegion2D" parent="."]
|
||||
visible = false
|
||||
|
|
@ -69,4 +74,24 @@ collision_mask = 2
|
|||
position = Vector2(162, 175.5)
|
||||
shape = SubResource("RectangleShape2D_4lag8")
|
||||
|
||||
[node name="Features" type="Node2D" parent="."]
|
||||
|
||||
[node name="Chest" type="Marker2D" parent="Features"]
|
||||
position = Vector2(185, 136)
|
||||
script = ExtResource("7_wcv20")
|
||||
MarkerTexture = SubResource("AtlasTexture_kwstq")
|
||||
SpawnChance = 10.0
|
||||
|
||||
[node name="Chest2" type="Marker2D" parent="Features"]
|
||||
position = Vector2(105, 55)
|
||||
script = ExtResource("7_wcv20")
|
||||
MarkerTexture = SubResource("AtlasTexture_kwstq")
|
||||
SpawnChance = 10.0
|
||||
|
||||
[node name="Chest3" type="Marker2D" parent="Features"]
|
||||
position = Vector2(185, 56)
|
||||
script = ExtResource("7_wcv20")
|
||||
MarkerTexture = SubResource("AtlasTexture_kwstq")
|
||||
SpawnChance = 10.0
|
||||
|
||||
[connection signal="area_entered" from="PlayerEnterDetector" to="." method="OnRoomEntered"]
|
||||
|
|
|
|||
120
Scenes/Maps/RogueliteMaps/corridor_1x2.tscn
Normal file
120
Scenes/Maps/RogueliteMaps/corridor_1x2.tscn
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.Collections;
|
||||
using System.Threading.Tasks;
|
||||
using Cirno.Scripts.Components.FSM;
|
||||
using Cirno.Scripts.Enums;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Godot;
|
||||
|
||||
|
|
@ -9,7 +10,7 @@ namespace Cirno.Scripts.Activables;
|
|||
|
||||
public partial class LevelTeleporter : Teleporter
|
||||
{
|
||||
[Export] public string LevelPath { get; private set; }
|
||||
[Export] public string LevelPath { get; set; }
|
||||
[Export] public MapResource Map { get; private set; }
|
||||
|
||||
[Export] public bool SaveInventory { get; private set; }
|
||||
|
|
@ -38,6 +39,11 @@ public partial class LevelTeleporter : Teleporter
|
|||
|
||||
if (!string.IsNullOrWhiteSpace(LevelPath))
|
||||
{
|
||||
if (GlobalState.Instance.SessionSettings.GameMode is GameMode.Roguelite)
|
||||
{
|
||||
GlobalState.Instance.SessionSettings.LevelNumber += 1;
|
||||
}
|
||||
|
||||
GlobalState.Instance.GotoScene(LevelPath);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -41,9 +41,9 @@ public partial class TeleporterMarker : FeatureMarker
|
|||
if (Engine.IsEditorHint()) return null;
|
||||
if (_spawnedTeleporter is not null) return this;
|
||||
|
||||
_spawnedTeleporter = this.CreateSibling<Teleporter>(mapTheme.TeleporterPrefab);
|
||||
_spawnedTeleporter = this.CreateSibling<Teleporter>(Type is TeleporterMarkerType.NextLevel ? mapTheme.LevelTeleporterPrefab : mapTheme.TeleporterPrefab);
|
||||
|
||||
if (Type is TeleporterMarkerType.Receiver or TeleporterMarkerType.Start)
|
||||
if (Type is TeleporterMarkerType.Receiver or TeleporterMarkerType.Start or TeleporterMarkerType.NextLevel)
|
||||
{
|
||||
_spawnedTeleporter.IsEnabled = false;
|
||||
}
|
||||
|
|
@ -52,11 +52,16 @@ public partial class TeleporterMarker : FeatureMarker
|
|||
_spawnedTeleporter.IsEnabled = true;
|
||||
}
|
||||
|
||||
if (Type is TeleporterMarkerType.InvisibleReceiver)
|
||||
if (Type is TeleporterMarkerType.InvisibleReceiver or TeleporterMarkerType.NextLevel)
|
||||
{
|
||||
_spawnedTeleporter.Invisible = true;
|
||||
}
|
||||
|
||||
if (Type is TeleporterMarkerType.NextLevel && _spawnedTeleporter is LevelTeleporter levelTeleporter)
|
||||
{
|
||||
levelTeleporter.LevelPath = mapTheme.LevelTeleporterDestinationPath;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ namespace Cirno.Scripts.Controllers;
|
|||
public partial class RogueliteRoom : Node2D
|
||||
{
|
||||
[Export] public RogueliteRoomResource RoomResource { get; set; }
|
||||
|
||||
[Export] public Array<Node2D> RoomClearActivation { get; set; }
|
||||
|
||||
[Export] public Array<Node2D> RoomClearActivation { get; set; }
|
||||
|
||||
public RogueliteMapTheme MapTheme { get; set; }
|
||||
|
||||
|
|
@ -35,8 +35,9 @@ public partial class RogueliteRoom : Node2D
|
|||
|
||||
public Vector2 RoomSize => BaseRoomSize * RoomResource.Size;
|
||||
|
||||
[Signal] public delegate void RoomClearedEventHandler();
|
||||
|
||||
[Signal]
|
||||
public delegate void RoomClearedEventHandler();
|
||||
|
||||
public Vector2I RandomBottomExit()
|
||||
{
|
||||
return BottomLeft + new Vector2I(GD.RandRange(0, RoomResource.Size.X - 1), 0);
|
||||
|
|
@ -68,7 +69,7 @@ public partial class RogueliteRoom : Node2D
|
|||
private List<EnemyFSMProxy> _enemies = [];
|
||||
|
||||
public List<TeleporterMarker> Teleporters { get; private set; } = [];
|
||||
|
||||
|
||||
private Array<EnemyResource> SpawnableEnemies => RoomResource.SpawnableEnemies;
|
||||
|
||||
private BlackCover _shroud;
|
||||
|
|
@ -224,15 +225,15 @@ public partial class RogueliteRoom : Node2D
|
|||
// Move marker based on direction
|
||||
var newMarkerPosition = marker.Direction switch
|
||||
{
|
||||
DoorDirections.East => marker.GlobalPosition + new Vector2(-4,0),
|
||||
DoorDirections.West => marker.GlobalPosition + new Vector2(-12,0),
|
||||
DoorDirections.North => marker.GlobalPosition + new Vector2(0,0),
|
||||
DoorDirections.South => marker.GlobalPosition + new Vector2(0,-2),
|
||||
DoorDirections.East => marker.GlobalPosition + new Vector2(-4, 0),
|
||||
DoorDirections.West => marker.GlobalPosition + new Vector2(-12, 0),
|
||||
DoorDirections.North => marker.GlobalPosition + new Vector2(0, 0),
|
||||
DoorDirections.South => marker.GlobalPosition + new Vector2(0, -2),
|
||||
_ => marker.GlobalPosition
|
||||
};
|
||||
|
||||
marker.GlobalPosition = newMarkerPosition;
|
||||
|
||||
|
||||
var wall = this.CreateChildOf<Node2D>(marker, marker.Direction switch
|
||||
{
|
||||
DoorDirections.North => MapTheme.HorizontalNorthWallPrefab,
|
||||
|
|
@ -337,23 +338,22 @@ public partial class RogueliteRoom : Node2D
|
|||
double chance = chestMarker.OverrideChance ? chestMarker.SpawnChance : MapTheme.ChestChance;
|
||||
if (roll <= chance)
|
||||
{
|
||||
|
||||
var hasLoot = MapTheme.ChestLootQueue.TryDequeue(out var loot);
|
||||
if (!hasLoot)
|
||||
{
|
||||
GD.Print("Ran out of loot to spawn");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
var chest = marker.CreateChild<Chest>(MapTheme.ChestPrefab);
|
||||
|
||||
|
||||
chest.LootTable.Add(loot);
|
||||
}
|
||||
}
|
||||
else if (markerNode is TeleporterMarker teleporterMarker)
|
||||
{
|
||||
var tp = teleporterMarker.Spawn(MapTheme);
|
||||
|
||||
|
||||
MapTheme.TeleportersList.Add(tp);
|
||||
Teleporters.Add(tp);
|
||||
}
|
||||
|
|
@ -368,10 +368,21 @@ public partial class RogueliteRoom : Node2D
|
|||
if (_enemies.Count == 0)
|
||||
{
|
||||
OpenDoors();
|
||||
EnableLevelExitTeleporter();
|
||||
EmitSignalRoomCleared();
|
||||
}
|
||||
}
|
||||
|
||||
private void EnableLevelExitTeleporter()
|
||||
{
|
||||
var teleporter = Teleporters.FirstOrDefault(x => x.Type is TeleporterMarkerType.NextLevel);
|
||||
|
||||
if (teleporter is null) return;
|
||||
|
||||
teleporter.SpawnedTeleporter.IsEnabled = true;
|
||||
teleporter.SpawnedTeleporter.Invisible = false;
|
||||
}
|
||||
|
||||
public void OpenDoors()
|
||||
{
|
||||
foreach (var connection in _connections)
|
||||
|
|
@ -421,6 +432,8 @@ public partial class RogueliteRoom : Node2D
|
|||
if (_enemies.Count <= 0)
|
||||
{
|
||||
OpenDoors();
|
||||
// TODO: Just for testing
|
||||
EnableLevelExitTeleporter();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public partial class RogueliteRoomManager : Node2D
|
|||
|
||||
public void InitSpawning()
|
||||
{
|
||||
GlobalState.Instance.SessionSettings.GameMode = GameMode.Roguelite;
|
||||
GenerateStraightLineDungeon();
|
||||
}
|
||||
|
||||
|
|
@ -109,6 +110,7 @@ public partial class RogueliteRoomManager : Node2D
|
|||
rng.Dispose();
|
||||
}
|
||||
|
||||
GD.Seed(_seed);
|
||||
GD.Print($"Seed: {_seed}");
|
||||
}
|
||||
|
||||
|
|
@ -209,7 +211,7 @@ public partial class RogueliteRoomManager : Node2D
|
|||
|
||||
if (!offshootsQueue.TryDequeue(out var offshootTypeToSpawn))
|
||||
{
|
||||
GD.Print("Ran out of offshoot types, add more");
|
||||
GD.Print("Ran out of offshoot types");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -240,14 +242,20 @@ public partial class RogueliteRoomManager : Node2D
|
|||
lockNext = true;
|
||||
}
|
||||
|
||||
if (offshootTypeToSpawn is RoomType.Key &&
|
||||
offshootsQueue.Peek() is RoomType.Key)
|
||||
if (offshootTypeToSpawn is RoomType.Key)
|
||||
{
|
||||
bool hasNextRoom = offshootsQueue.TryPeek(out var nextRoom);
|
||||
if (!hasNextRoom || nextRoom is RoomType.Key)
|
||||
|
||||
// Stop if next room is a key
|
||||
break;
|
||||
}
|
||||
//break;
|
||||
}
|
||||
else
|
||||
{
|
||||
offshootsQueue.Enqueue(offshootTypeToSpawn);
|
||||
}
|
||||
}
|
||||
|
||||
// Add more dungeon if not enough rooms are generated
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ public partial class RogueliteMapTheme : Resource
|
|||
[Export] public LootItem PointItemResource { get; set; }
|
||||
|
||||
[Export] public PackedScene TeleporterPrefab { get; set; }
|
||||
[Export] public PackedScene LevelTeleporterPrefab { get; set; }
|
||||
[Export] public StringName LevelTeleporterDestinationPath { get; set; }
|
||||
|
||||
|
||||
[ExportGroup("Chances")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue