Files
settled-reach/client/scenes/main.tscn
T
jpmschweitzerandClaude Opus 4.6 2659de0c28 feat(client): add fog entity visualization and wire Sprint 7 UI (#431, #434)
Fog entity cognitive delay rendering (D-059/D-060): sonar-style sound
pings (3 concentric rings, 1.5s fade), unrecognized grey blobs with
breathing pulse, D-033 color transition at 50% recognition progress,
±0.5 tile position drift. FogEntities node at z:950 between fog
shader and InsertOverlay.

Protocol v7 bump to match server PR #23 (pending_recognitions field).
Wires dialogue box and fog entities into game loop with mock test data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 01:19:24 +01:00

146 lines
6.7 KiB
Plaintext

[gd_scene load_steps=17 format=3 uid="uid://bswrmh7w8dbgm"]
[ext_resource type="Script" path="res://scripts/main.gd" id="1_main"]
[ext_resource type="Script" path="res://scripts/rendering/world_renderer.gd" id="2_world"]
[ext_resource type="Script" path="res://scripts/rendering/entity_renderer.gd" id="3_entity"]
[ext_resource type="Script" path="res://scripts/rendering/fog_shader.gd" id="4_fog"]
[ext_resource type="Script" path="res://scripts/rendering/tile_renderer.gd" id="5_tile"]
[ext_resource type="PackedScene" path="res://ui/hud.tscn" id="6_hud"]
[ext_resource type="PackedScene" path="res://ui/minimap.tscn" id="7_minimap"]
[ext_resource type="PackedScene" path="res://ui/monologue_display.tscn" id="8_monologue"]
[ext_resource type="PackedScene" path="res://ui/interaction_prompt.tscn" id="9_prompt"]
[ext_resource type="Script" path="res://scripts/rendering/cursor_renderer.gd" id="10_cursor"]
[ext_resource type="PackedScene" path="res://ui/interaction_list.tscn" id="11_ilist"]
[ext_resource type="PackedScene" path="res://ui/inventory_grid.tscn" id="12_inv"]
[ext_resource type="PackedScene" path="res://ui/stance_indicator.tscn" id="13_stance"]
[ext_resource type="PackedScene" path="res://ui/world_radial.tscn" id="14_radial"]
[ext_resource type="PackedScene" path="res://ui/dialogue_box.tscn" id="15_dialogue"]
[ext_resource type="Script" path="res://scripts/rendering/fog_entities.gd" id="16_fogent"]
[node name="Game" type="Node2D"]
script = ExtResource("1_main")
; D-049 Z-level rendering pipeline (z-layer-gap-analysis.md)
;
; World scope (z:-200 to z:900, inside FogGroup CanvasGroup):
; z:0 FloorTiles — ground plane
; z:10 FloorObjects — cosmetic floor detail, ground shadows
; z:100 YSortGroup — y-sorted: furniture, entities, wall faces (all z:0 relative)
; z:200 [future] — airborne (projectiles, low-flying objects)
; z:300 Overhead — ceiling edges, semi-transparent occlusion
; z:350 [future] — high airborne (above ceiling, scale > 1.0)
; z:400 [future] — upper floor content (rare with fixed camera)
; z:900 FogOverlay — OUTSIDE FogGroup, fog shader
;
; Y-sort contract: ALL children of YSortGroup that participate in positional
; occlusion MUST have z_index = 0. z_index is PRIMARY sort, y is SECONDARY.
; Entities node is AFTER Furniture node — D-044 entity-wins-ties on same y.
[node name="World" type="Node2D" parent="."]
script = ExtResource("2_world")
; --- World content inside CanvasGroup for fog compositing ---
; CanvasGroup captures everything beneath it into one texture.
; FogOverlay (outside) draws the fog shader over this composited texture.
[node name="FogGroup" type="CanvasGroup" parent="World"]
; z:0 — Floor tiles: zone identity, movement surface
[node name="FloorTiles" type="TileMapLayer" parent="World/FogGroup"]
z_index = 0
script = ExtResource("5_tile")
; z:10 — Floor objects: cosmetic detail, walked over, ground shadows from airborne
; (placeholder — populated when floor object art is added)
[node name="FloorObjects" type="Node2D" parent="World/FogGroup"]
z_index = 10
; z:100 — Y-sorted group: furniture + entities + wall faces interleave by y-position
; ALL children MUST use z_index = 0 (y-sort contract, Godot #62715)
[node name="YSortGroup" type="Node2D" parent="World/FogGroup"]
y_sort_enabled = true
z_index = 100
; Furniture (z:0 relative) — tables, chairs, placed objects
; Placeholder — before Entities in tree order so entities win visual ties (D-044)
[node name="Furniture" type="Node2D" parent="World/FogGroup/YSortGroup"]
y_sort_enabled = true
z_index = 0
; Entities (z:0 relative) — D-033 colored sprites, y-sorted with furniture
; MUST be z_index = 0 for correct y-sort interleaving
[node name="Entities" type="Node2D" parent="World/FogGroup/YSortGroup"]
y_sort_enabled = true
z_index = 0
script = ExtResource("3_entity")
; z:300 — Overhead: ceiling edges, upper floor structure, semi-transparent occlusion
; (placeholder — populated when overhead art is added)
[node name="Overhead" type="Node2D" parent="World/FogGroup"]
z_index = 300
; --- z:900 — Fog of perception (D-059 shader-based) ---
; OUTSIDE FogGroup. ColorRect child with fragment shader composites
; 5-layer fog over the world. fog_shader.gd manages uniforms.
[node name="FogOverlay" type="Node2D" parent="World"]
z_index = 900
script = ExtResource("4_fog")
; --- z:950 — Fog entities (D-059/D-060 cognitive delay visualization) ---
; Between fog (z:900) and InsertOverlay (CanvasLayer 10).
; Sound pings, grey blobs, recognized entity glow + silhouette.
[node name="FogEntities" type="Node2D" parent="World"]
z_index = 950
script = ExtResource("16_fogent")
; --- Camera ---
[node name="Camera2D" type="Camera2D" parent="."]
position_smoothing_enabled = true
position_smoothing_speed = 6.0
zoom = Vector2(2, 2)
; --- Insert overlay (CanvasLayer 10) ---
; Bloom-rendered, NOT affected by fog or camera transform.
; World-anchored elements convert world→screen coords in scripts.
[node name="InsertOverlay" type="CanvasLayer" parent="."]
layer = 10
; InteractionPrompt — v0.1 fallback single-line "E - Talk" display
[node name="InteractionPrompt" parent="InsertOverlay" instance=ExtResource("9_prompt")]
; D-057: Entity interaction vertical list — multi-verb, insert-styled
[node name="InteractionList" parent="InsertOverlay" instance=ExtResource("11_ilist")]
; D-058: World radial menu — right-click, 2 spokes (Observe + Insert)
[node name="WorldRadial" parent="InsertOverlay" instance=ExtResource("14_radial")]
; D-061: Dialogue box — bottom screen, max 20% height, diegetic insert UI
[node name="DialogueBox" parent="InsertOverlay" instance=ExtResource("15_dialogue")]
; --- UI layer (CanvasLayer 20) ---
; HUD, monologue, cursor — always visible, not affected by fog or camera.
[node name="UILayer" type="CanvasLayer" parent="."]
layer = 20
[node name="HUD" parent="UILayer" instance=ExtResource("6_hud")]
[node name="Minimap" parent="UILayer" instance=ExtResource("7_minimap")]
[node name="MonologueDisplay" parent="UILayer" instance=ExtResource("8_monologue")]
; D-053: Stance indicator — top-right, color-coded
[node name="StanceIndicator" parent="UILayer" instance=ExtResource("13_stance")]
; D-065: Inventory grid — 3x3, bottom-right, 40x40px, 1-9 hotkeys
[node name="InventoryGrid" parent="UILayer" instance=ExtResource("12_inv")]
; D-056: Cursor state machine — insert-styled geometric cursor, topmost in UILayer
[node name="CursorRenderer" type="Node2D" parent="UILayer"]
script = ExtResource("10_cursor")
; --- Modal layer (CanvasLayer 30) ---
; Full-screen overlays: pause menu, inventory modal, death screen.
; Empty for Sprint 6 — exists so the layer is reserved in the tree.
[node name="ModalLayer" type="CanvasLayer" parent="."]
layer = 30