OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-tps / scenes / maps / map_dc_diffusion.tscn

47 lines · tscn ref:
[gd_scene load_steps=5 format=3 uid="uid://mapdcdiffusion1"]

[ext_resource type="Script" path="res://scenes/maps/map_dc_diffusion.gd" id="1"]
[ext_resource type="PackedScene" uid="uid://teleporter01" path="res://scenes/teleporter/teleporter.tscn" id="2"]
[ext_resource type="Shader" path="res://scenes/maps/dc_erosion_color.gdshader" id="3"]

; DECLARED HERE, NOT load()ed FROM THE SCRIPT. export_filter is "selected_scenes",
; which exports a scene and its DEPENDENCIES — and a runtime load() is not one. The
; first version fetched this shader in _setup_terrain() and the exported build said
;   ERROR: Cannot load shader: res://scenes/maps/dc_erosion_color.gdshader
; because the file was never in the PCK. As an ext_resource it is a dependency and
; ships automatically, with no export_presets.cfg filter to keep in sync.
[sub_resource type="ShaderMaterial" id="erosion_mat"]
shader = ExtResource("3")
shader_parameter/terrain_params = Vector3(-1000, 9000, 0.465)

[node name="MapDCDiffusion" type="Node3D"]
script = ExtResource("1")

; DCTerrain properties live IN THE SCENE, not in _ready(). Every DCTerrain setter is
; DC_SET_CONFIG and calls rebuild() on change, so writing them from a script fires
; one rebuild each and the mesher restarts before it can converge — the failure
; map_dc_world.tscn documents. `generator` is the exception, being an object.
[node name="DCTerrain" type="DCTerrain" parent="."]
use_gpu = true
use_noise = true
voxel_size = 1.0
octree_depth = 16
debug_lod_colors = false
custom_material = SubResource("erosion_mat")
; Per-frame terrain report: traverse / dispatch / pending / upload / seams /
; collisions, in ms and counts (dc_terrain.cpp:1238). Left ON in this map while
; the convergence question is open -- it is the only instrument that separates
; "splitting forever" from "starved on dispatch" from "meshing but never
; uploading", and every diagnosis attempted without it so far has been an
; offline proxy for a system nobody had observed.
debug_logging = true

[node name="SpawnPoint" type="Marker3D" parent="." groups=["spawn_points"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

[node name="TeleporterToHome" parent="." instance=ExtResource("2")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 0)
destination = Vector3(0, 2, 0)
target_map = "res://scenes/maps/map_test.tscn"
label_text = "Home"