Added more test rooms and started working on the dungeon class.

This commit is contained in:
Relintai 2021-08-20 23:53:09 +02:00
parent 7b79378c11
commit 1b492b863f
10 changed files with 636 additions and 8 deletions

View File

@ -0,0 +1,45 @@
tool
extends Spatial
export(bool) var generate_on_ready : bool = true
export(PropData) var start_room : PropData
export(Array, PropData) var rooms : Array
export(bool) var generate : bool setget set_generate, get_generate
var portal_map : Dictionary
var debug : bool = true
func _enter_tree():
if not Engine.editor_hint && generate_on_ready:
call_deferred("generate")
func set_up_room_data():
clear_room_data()
func clear_room_data():
portal_map.clear()
func generate():
clear()
set_up_room_data()
func clear():
if not debug:
for c in get_children():
if c.owner == self:
#don't destroy the user's nodes
continue
c.queue_delete()
else:
for c in get_children():
c.queue_delete()
func set_generate(on):
if on:
generate()
func get_generate():
return false

View File

@ -0,0 +1,15 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://scripts/dungeons/dungeon.gd" type="Script" id=1]
[ext_resource path="res://test_rooms/Room1.tres" type="PropData" id=2]
[ext_resource path="res://test_rooms/Room2.tres" type="PropData" id=3]
[ext_resource path="res://test_rooms/Room3.tres" type="PropData" id=4]
[ext_resource path="res://test_rooms/Room5.tres" type="PropData" id=5]
[ext_resource path="res://test_rooms/Room4.tres" type="PropData" id=6]
[node name="Dungtest" type="Spatial"]
[node name="Dungeon" type="Spatial" parent="."]
script = ExtResource( 1 )
start_room = ExtResource( 2 )
rooms = [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 6 ), ExtResource( 5 ) ]

View File

@ -1,8 +1,7 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/stone_dungeon_1_albedo.png" type="Texture" id=4]
[ext_resource path="res://modules/core_models/wall_zn.gltf" type="MeshDataResource" id=5]
[ext_resource path="res://test_rooms/Room1.gd" type="Script" id=9]
[ext_resource path="res://test_rooms/test2_tiledwalldata.tres" type="TiledWallData" id=10]
[sub_resource type="SpatialMaterial" id=3]
@ -10,7 +9,6 @@ albedo_texture = ExtResource( 4 )
[node name="Room" type="Room"]
points = PoolVector3Array( 5.01, -0.01, -6.01, 5.01, -0.01, 0.00999975, 5.01, 3.01, 0.00999975, 5.01, 3.01, -6.01, -0.0100001, -0.01, -6.01, -0.0100001, 3.01, -6.01, -0.0100001, -0.01, 0.00999975, -0.0100001, 0.745, 0.00999975, -0.0100001, 3.01, 0.00999975, 0.826667, 3.01, 0.00999975, 0.826667, 0.745, 0.00999975 )
script = ExtResource( 9 )
[node name="Portal" type="Portal" parent="."]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,76 @@
[gd_resource type="PropData" load_steps=16 format=2]
[ext_resource path="res://modules/core_models/wall_zn.gltf" type="MeshDataResource" id=1]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/stone_dungeon_1_albedo.png" type="Texture" id=2]
[ext_resource path="res://test_rooms/test2_tiledwalldata.tres" type="TiledWallData" id=3]
[sub_resource type="PropDataTiledWall" id=1]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 5, 0, 0 )
width = 10
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=2]
transform = Transform( 1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 0, 0, -10 )
width = 10
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=3]
transform = Transform( -1, 0, 3.17865e-08, -3.17865e-08, -5.96046e-08, -1, 2.66454e-15, -1, 5.96046e-08, 5, 0, 0 )
width = 5
heigth = 10
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=4]
transform = Transform( -1, 0, 3.17865e-08, 3.17865e-08, 5.96046e-08, 1, -1.77636e-15, 1, -5.96046e-08, 5, 3, -10 )
width = 5
heigth = 10
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=5]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=6]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataMeshData" id=7]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 0 )
mesh = ExtResource( 1 )
texture = ExtResource( 2 )
[sub_resource type="PropDataPortal" id=8]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[sub_resource type="PropDataTiledWall" id=9]
transform = Transform( -1, 0, -1.43059e-07, 0, 1, 0, 1.43059e-07, 0, -1, 5, 0, -10 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=10]
transform = Transform( -1, 0, -1.43059e-07, 0, 1, 0, 1.43059e-07, 0, -1, 2, 0, -10 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataMeshData" id=11]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 3, 2, -10 )
mesh = ExtResource( 1 )
texture = ExtResource( 2 )
[sub_resource type="PropDataPortal" id=12]
transform = Transform( 1, 0, 1.04907e-06, 0, 1, 0, -1.04907e-06, 0, 1, 3, 1, -10 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[resource]
props = [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ]
is_room = true
room_bounds = PoolVector3Array( 5.01, -0.01, -6.01, 5.01, -0.01, 0.00999975, 5.01, 3.01, 0.00999975, 5.01, 3.01, -6.01, -0.0100001, -0.01, -6.01, -0.0100001, 3.01, -6.01, -0.0100001, -0.01, 0.00999975, -0.0100001, 0.745, 0.00999975, -0.0100001, 3.01, 0.00999975, 0.826667, 3.01, 0.00999975, 0.826667, 0.745, 0.00999975 )

View File

@ -0,0 +1,90 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/stone_dungeon_1_albedo.png" type="Texture" id=4]
[ext_resource path="res://modules/core_models/wall_zn.gltf" type="MeshDataResource" id=5]
[ext_resource path="res://test_rooms/test2_tiledwalldata.tres" type="TiledWallData" id=10]
[sub_resource type="SpatialMaterial" id=3]
albedo_texture = ExtResource( 4 )
[node name="Room" type="Room"]
points = PoolVector3Array( 5.01, -0.01, -6.01, 5.01, -0.01, 0.00999975, 5.01, 3.01, 0.00999975, 5.01, 3.01, -6.01, -0.0100001, -0.01, -6.01, -0.0100001, 3.01, -6.01, -0.0100001, -0.01, 0.00999975, -0.0100001, 0.745, 0.00999975, -0.0100001, 3.01, 0.00999975, 0.826667, 3.01, 0.00999975, 0.826667, 0.745, 0.00999975 )
[node name="WallXP" type="TiledWall" parent="."]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 5, 0, 0 )
width = 10
heigth = 3
data = ExtResource( 10 )
[node name="WallXN" type="TiledWall" parent="."]
transform = Transform( 1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 0, 0, -10 )
width = 10
heigth = 3
data = ExtResource( 10 )
[node name="Floor" type="TiledWall" parent="."]
transform = Transform( -1, 0, 3.17865e-08, -3.17865e-08, -5.96046e-08, -1, 2.66454e-15, -1, 5.96046e-08, 5, 0, 0 )
width = 5
heigth = 10
data = ExtResource( 10 )
[node name="Ceiling" type="TiledWall" parent="."]
transform = Transform( -1, 0, 3.17865e-08, 3.17865e-08, 5.96046e-08, 1, -1.77636e-15, 1, -5.96046e-08, 5, 3, -10 )
width = 5
heigth = 10
data = ExtResource( 10 )
[node name="wallzp" type="Spatial" parent="."]
[node name="WallZN2" type="TiledWall" parent="wallzp"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="WallZN3" type="TiledWall" parent="wallzp"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="wallsegment3" type="Spatial" parent="wallzp"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0 )
[node name="MeshDataInstance3" type="MeshDataInstance" parent="wallzp/wallsegment3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
mesh_data = ExtResource( 5 )
texture = ExtResource( 4 )
material = SubResource( 3 )
[node name="Portal" type="Portal" parent="wallzp"]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[node name="wallzp2" type="Spatial" parent="."]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 5, 0, -10 )
[node name="WallZN2" type="TiledWall" parent="wallzp2"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="WallZN3" type="TiledWall" parent="wallzp2"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="wallsegment3" type="Spatial" parent="wallzp2"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0 )
[node name="MeshDataInstance3" type="MeshDataInstance" parent="wallzp2/wallsegment3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
mesh_data = ExtResource( 5 )
texture = ExtResource( 4 )
material = SubResource( 3 )
[node name="Portal" type="Portal" parent="wallzp2"]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )

View File

@ -0,0 +1,76 @@
[gd_resource type="PropData" load_steps=16 format=2]
[ext_resource path="res://modules/core_models/wall_zn.gltf" type="MeshDataResource" id=1]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/stone_dungeon_1_albedo.png" type="Texture" id=2]
[ext_resource path="res://test_rooms/test2_tiledwalldata.tres" type="TiledWallData" id=3]
[sub_resource type="PropDataTiledWall" id=1]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 5, 0, 0 )
width = 16
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=2]
transform = Transform( 1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 0, 0, -16 )
width = 16
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=3]
transform = Transform( -1, 0, 3.17865e-08, -3.17865e-08, -5.96046e-08, -1, 2.66454e-15, -1, 5.96046e-08, 5, 0, 0 )
width = 5
heigth = 16
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=4]
transform = Transform( -1, 0, 3.17865e-08, 3.17865e-08, 5.96046e-08, 1, -1.77636e-15, 1, -5.96046e-08, 5, 3, -16 )
width = 5
heigth = 16
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=5]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=6]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataMeshData" id=7]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 0 )
mesh = ExtResource( 1 )
texture = ExtResource( 2 )
[sub_resource type="PropDataPortal" id=8]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[sub_resource type="PropDataTiledWall" id=9]
transform = Transform( -1, 0, -1.43059e-07, 0, 1, 0, 1.43059e-07, 0, -1, 5, 0, -16 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=10]
transform = Transform( -1, 0, -1.43059e-07, 0, 1, 0, 1.43059e-07, 0, -1, 2, 0, -16 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataMeshData" id=11]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 3, 2, -16 )
mesh = ExtResource( 1 )
texture = ExtResource( 2 )
[sub_resource type="PropDataPortal" id=12]
transform = Transform( 1, 0, 1.04907e-06, 0, 1, 0, -1.04907e-06, 0, 1, 3, 1, -16 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[resource]
props = [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ]
is_room = true
room_bounds = PoolVector3Array( 5.01, -0.01, -6.01, 5.01, -0.01, 0.00999975, 5.01, 3.01, 0.00999975, 5.01, 3.01, -6.01, -0.0100001, -0.01, -6.01, -0.0100001, 3.01, -6.01, -0.0100001, -0.01, 0.00999975, -0.0100001, 0.745, 0.00999975, -0.0100001, 3.01, 0.00999975, 0.826667, 3.01, 0.00999975, 0.826667, 0.745, 0.00999975 )

View File

@ -0,0 +1,90 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/stone_dungeon_1_albedo.png" type="Texture" id=4]
[ext_resource path="res://modules/core_models/wall_zn.gltf" type="MeshDataResource" id=5]
[ext_resource path="res://test_rooms/test2_tiledwalldata.tres" type="TiledWallData" id=10]
[sub_resource type="SpatialMaterial" id=3]
albedo_texture = ExtResource( 4 )
[node name="Room" type="Room"]
points = PoolVector3Array( 5.01, -0.01, -6.01, 5.01, -0.01, 0.00999975, 5.01, 3.01, 0.00999975, 5.01, 3.01, -6.01, -0.0100001, -0.01, -6.01, -0.0100001, 3.01, -6.01, -0.0100001, -0.01, 0.00999975, -0.0100001, 0.745, 0.00999975, -0.0100001, 3.01, 0.00999975, 0.826667, 3.01, 0.00999975, 0.826667, 0.745, 0.00999975 )
[node name="WallXP" type="TiledWall" parent="."]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 5, 0, 0 )
width = 16
heigth = 3
data = ExtResource( 10 )
[node name="WallXN" type="TiledWall" parent="."]
transform = Transform( 1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 0, 0, -16 )
width = 16
heigth = 3
data = ExtResource( 10 )
[node name="Floor" type="TiledWall" parent="."]
transform = Transform( -1, 0, 3.17865e-08, -3.17865e-08, -5.96046e-08, -1, 2.66454e-15, -1, 5.96046e-08, 5, 0, 0 )
width = 5
heigth = 16
data = ExtResource( 10 )
[node name="Ceiling" type="TiledWall" parent="."]
transform = Transform( -1, 0, 3.17865e-08, 3.17865e-08, 5.96046e-08, 1, -1.77636e-15, 1, -5.96046e-08, 5, 3, -16 )
width = 5
heigth = 16
data = ExtResource( 10 )
[node name="wallzp" type="Spatial" parent="."]
[node name="WallZN2" type="TiledWall" parent="wallzp"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="WallZN3" type="TiledWall" parent="wallzp"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="wallsegment3" type="Spatial" parent="wallzp"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0 )
[node name="MeshDataInstance3" type="MeshDataInstance" parent="wallzp/wallsegment3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
mesh_data = ExtResource( 5 )
texture = ExtResource( 4 )
material = SubResource( 3 )
[node name="Portal" type="Portal" parent="wallzp"]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[node name="wallzp2" type="Spatial" parent="."]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 5, 0, -16 )
[node name="WallZN2" type="TiledWall" parent="wallzp2"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="WallZN3" type="TiledWall" parent="wallzp2"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="wallsegment3" type="Spatial" parent="wallzp2"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0 )
[node name="MeshDataInstance3" type="MeshDataInstance" parent="wallzp2/wallsegment3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
mesh_data = ExtResource( 5 )
texture = ExtResource( 4 )
material = SubResource( 3 )
[node name="Portal" type="Portal" parent="wallzp2"]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )

106
game/test_rooms/Room5.tres Normal file
View File

@ -0,0 +1,106 @@
[gd_resource type="PropData" load_steps=22 format=2]
[ext_resource path="res://modules/core_models/wall_zn.gltf" type="MeshDataResource" id=1]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/stone_dungeon_1_albedo.png" type="Texture" id=2]
[ext_resource path="res://test_rooms/test2_tiledwalldata.tres" type="TiledWallData" id=3]
[sub_resource type="PropDataTiledWall" id=1]
transform = Transform( -1, 0, 3.17865e-08, -3.17865e-08, -5.96046e-08, -1, 2.66454e-15, -1, 5.96046e-08, 5, 0, 0 )
width = 5
heigth = 6
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=2]
transform = Transform( -1, 0, 3.17865e-08, 3.17865e-08, 5.96046e-08, 1, -1.77636e-15, 1, -5.96046e-08, 5, 3, -6 )
width = 5
heigth = 6
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=3]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=4]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataPortal" id=5]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[sub_resource type="PropDataMeshData" id=6]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 0 )
mesh = ExtResource( 1 )
texture = ExtResource( 2 )
[sub_resource type="PropDataTiledWall" id=7]
transform = Transform( -1, 0, -1.43059e-07, 0, 1, 0, 1.43059e-07, 0, -1, 5, 0, -6 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=8]
transform = Transform( -1, 0, -1.43059e-07, 0, 1, 0, 1.43059e-07, 0, -1, 2, 0, -6 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataPortal" id=9]
transform = Transform( 1, 0, 1.04907e-06, 0, 1, 0, -1.04907e-06, 0, 1, 3, 1, -6 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[sub_resource type="PropDataMeshData" id=10]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 3, 2, -6 )
mesh = ExtResource( 1 )
texture = ExtResource( 2 )
[sub_resource type="PropDataTiledWall" id=11]
transform = Transform( 6.75612e-08, 0, -1, 0, 1, 0, 1, 0, 6.75612e-08, 0, 0, -6 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=12]
transform = Transform( 6.75612e-08, 0, -1, 0, 1, 0, 1, 0, 6.75612e-08, 3.57746e-08, 0, -3 )
width = 3
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataPortal" id=13]
transform = Transform( -9.73576e-07, 0, 1, 0, 1, 0, -1, 0, -9.73576e-07, 2.38498e-08, 1, -4 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[sub_resource type="PropDataMeshData" id=14]
transform = Transform( 1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 2.38498e-08, 2, -4 )
mesh = ExtResource( 1 )
texture = ExtResource( 2 )
[sub_resource type="PropDataTiledWall" id=15]
transform = Transform( -9.93477e-08, 0, 1, 0, 1, 0, -1, 0, -9.93477e-08, 5, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataTiledWall" id=16]
transform = Transform( -9.93477e-08, 0, 1, 0, 1, 0, -1, 0, -9.93477e-08, 5, 0, -3 )
width = 3
heigth = 3
data = ExtResource( 3 )
[sub_resource type="PropDataPortal" id=17]
transform = Transform( 1.00536e-06, 0, -1, 0, 1, 0, 1, 0, 1.00536e-06, 5, 1, -2 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[sub_resource type="PropDataMeshData" id=18]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 5, 2, -2 )
mesh = ExtResource( 1 )
texture = ExtResource( 2 )
[resource]
props = [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ) ]
is_room = true
room_bounds = PoolVector3Array( 5.01, -0.01, -6.01, 5.01, -0.01, 0.00999975, 5.01, 3.01, 0.00999975, 5.01, 3.01, -6.01, -0.0100001, -0.01, -6.01, -0.0100001, 3.01, -6.01, -0.0100001, -0.01, 0.00999975, -0.0100001, 0.745, 0.00999975, -0.0100001, 3.01, 0.00999975, 0.826667, 3.01, 0.00999975, 0.826667, 0.745, 0.00999975 )

134
game/test_rooms/Room5.tscn Normal file
View File

@ -0,0 +1,134 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/stone_dungeon_1_albedo.png" type="Texture" id=4]
[ext_resource path="res://modules/core_models/wall_zn.gltf" type="MeshDataResource" id=5]
[ext_resource path="res://test_rooms/test2_tiledwalldata.tres" type="TiledWallData" id=10]
[sub_resource type="SpatialMaterial" id=3]
albedo_texture = ExtResource( 4 )
[node name="Room" type="Room"]
points = PoolVector3Array( 5.01, -0.01, -6.01, 5.01, -0.01, 0.00999975, 5.01, 3.01, 0.00999975, 5.01, 3.01, -6.01, -0.0100001, -0.01, -6.01, -0.0100001, 3.01, -6.01, -0.0100001, -0.01, 0.00999975, -0.0100001, 0.745, 0.00999975, -0.0100001, 3.01, 0.00999975, 0.826667, 3.01, 0.00999975, 0.826667, 0.745, 0.00999975 )
[node name="Floor" type="TiledWall" parent="."]
transform = Transform( -1, 0, 3.17865e-08, -3.17865e-08, -5.96046e-08, -1, 2.66454e-15, -1, 5.96046e-08, 5, 0, 0 )
width = 5
heigth = 6
data = ExtResource( 10 )
[node name="Ceiling" type="TiledWall" parent="."]
transform = Transform( -1, 0, 3.17865e-08, 3.17865e-08, 5.96046e-08, 1, -1.77636e-15, 1, -5.96046e-08, 5, 3, -6 )
width = 5
heigth = 6
data = ExtResource( 10 )
[node name="wallzp" type="Spatial" parent="."]
[node name="WallZN2" type="TiledWall" parent="wallzp"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="WallZN3" type="TiledWall" parent="wallzp"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="Portal" type="Portal" parent="wallzp"]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[node name="wallsegment3" type="Spatial" parent="wallzp"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0 )
[node name="MeshDataInstance3" type="MeshDataInstance" parent="wallzp/wallsegment3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
mesh_data = ExtResource( 5 )
texture = ExtResource( 4 )
material = SubResource( 3 )
[node name="wallzp2" type="Spatial" parent="."]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 5, 0, -6 )
[node name="WallZN2" type="TiledWall" parent="wallzp2"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="WallZN3" type="TiledWall" parent="wallzp2"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="Portal" type="Portal" parent="wallzp2"]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[node name="wallsegment3" type="Spatial" parent="wallzp2"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0 )
[node name="MeshDataInstance3" type="MeshDataInstance" parent="wallzp2/wallsegment3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
mesh_data = ExtResource( 5 )
texture = ExtResource( 4 )
material = SubResource( 3 )
[node name="wallzp3" type="Spatial" parent="."]
transform = Transform( 1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 0, 0, -6 )
[node name="WallZN2" type="TiledWall" parent="wallzp3"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="WallZN3" type="TiledWall" parent="wallzp3"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 3
heigth = 3
data = ExtResource( 10 )
[node name="Portal" type="Portal" parent="wallzp3"]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[node name="wallsegment3" type="Spatial" parent="wallzp3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0 )
[node name="MeshDataInstance3" type="MeshDataInstance" parent="wallzp3/wallsegment3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
mesh_data = ExtResource( 5 )
texture = ExtResource( 4 )
material = SubResource( 3 )
[node name="wallzp4" type="Spatial" parent="."]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 5, 0, 0 )
[node name="WallZN2" type="TiledWall" parent="wallzp4"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 0, 0, 0 )
width = 2
heigth = 3
data = ExtResource( 10 )
[node name="WallZN3" type="TiledWall" parent="wallzp4"]
transform = Transform( 1, 0, 5.56363e-08, 0, 1, 0, -5.56363e-08, 0, 1, 3, 0, 0 )
width = 3
heigth = 3
data = ExtResource( 10 )
[node name="Portal" type="Portal" parent="wallzp4"]
transform = Transform( -1, 0, -9.61651e-07, 0, 1, 0, 9.61651e-07, 0, -1, 2, 1, 0 )
points = PoolVector2Array( -1, 1, -1, -1, 0, -1, 0, 1 )
[node name="wallsegment3" type="Spatial" parent="wallzp4"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0 )
[node name="MeshDataInstance3" type="MeshDataInstance" parent="wallzp4/wallsegment3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
mesh_data = ExtResource( 5 )
texture = ExtResource( 4 )
material = SubResource( 3 )