Adds the Wizardry/M&M core loop: you walk cell-by-cell with 90° turns and descend stairs between levels that actually line up. C side: - pipeline.c: after per-level 2D generation, a link_stairs() pass replaces the randomly-placed down/up stairs with aligned pairs (room cells preferred). Bottom level loses its down-stair; top level keeps the up-stair as the entry point. - dungeon_to_dict.cpp: expose sizeof(cell3d_t) as "cell_stride" so GDScript can index raw cell bytes without hardcoding layout. Godot side: - scripts/blobber_party.gd: reads cell3d_t bytes directly for wall queries, tweens position/rotation on step/turn, swaps level when stair cell is activated. - scripts/dungeon_builder.gd: now hands the generated Dictionary to a party node via `party_path` and groups mesh instances under a "Meshes" child for clean regeneration. - scenes/demo_blobber.tscn: FlyCamera replaced with a Party node (script-driven) holding a child Camera3D. num_levels=3 by default. Still deferred to later PRs: the full port/retirement of src/gen/, and a standalone plan.c/h module (linkage is currently inlined in pipeline.c with just StairPair-equivalent data). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
35 lines
1.2 KiB
Text
35 lines
1.2 KiB
Text
[gd_scene format=3 uid="uid://c8blbrbrbr001"]
|
|
|
|
[ext_resource type="Script" uid="uid://b2r6hnyvt7ef7" path="res://scripts/dungeon_builder.gd" id="1_builder"]
|
|
[ext_resource type="Script" path="res://scripts/blobber_party.gd" id="2_party"]
|
|
|
|
[sub_resource type="Environment" id="Environment_1"]
|
|
background_mode = 1
|
|
background_color = Color(0.08, 0.08, 0.1, 1)
|
|
ambient_light_source = 2
|
|
ambient_light_color = Color(0.55, 0.55, 0.6, 1)
|
|
ambient_light_energy = 0.5
|
|
|
|
[node name="DemoBlobber" type="Node3D" unique_id=201275322]
|
|
|
|
[node name="Dungeon" type="Node3D" parent="." unique_id=2089249369]
|
|
script = ExtResource("1_builder")
|
|
seed_value = 43
|
|
num_levels = 3
|
|
depth = 20
|
|
party_path = NodePath("../Party")
|
|
|
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1913401313]
|
|
transform = Transform3D(0.86602527, -0.35310844, 0.35399818, 0, 0.70799595, 0.70621645, -0.5000003, -0.6116013, 0.6131424, 80, 40, 80)
|
|
shadow_enabled = true
|
|
|
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1337946831]
|
|
environment = SubResource("Environment_1")
|
|
|
|
[node name="Party" type="Node3D" parent="." unique_id=987300286]
|
|
script = ExtResource("2_party")
|
|
|
|
[node name="Camera3D" type="Camera3D" parent="Party"]
|
|
fov = 75.0
|
|
near = 0.1
|
|
far = 500.0
|