Files
Emberwild/scenes/world.tscn
Paul Bailey 12f7fd677d M0.5: detailed scenery, mountain/sea-cliff boundary, Godot 4.7
Scenery (all procedural, seeded, no imported assets):
- Terrain shader: grass/dry grass/dirt/sand/rock strata/snow + detail normals
- 5 tree types, faceted mossy rocks, cliff outcrops, sea stacks, bushes,
  logs and stumps, batched as MultiMesh per 48 m cell
- Wind-animated grass and flowers streamed in tiles around the player
- Lake (depth-shaded water with shore foam), ocean to the horizon,
  cloud sky shader, volumetric fog, glow, softer shadows
- Swimming: float at the surface, swim-jump to climb out

World bounds:
- Steep mountain rim with an invisible wall partway up; one side opens to
  a sheer sea cliff with the wall 1 m inside the edge; whole chunk is an
  island so the mesh edge is never visible
- Respawn safety net if the player leaves the walkable area or the map
- Fix: the cliff edge now tracks the wall in the headlands (it used to
  drop away inside the wall, leaving a pit with lake water hanging over it)

Tests: tests/test_boundary.gd (24-direction escape attempt) and
tests/test_terrain_edges.gd (no ground below waterline near the wall).

Upgrades the project to Godot 4.7 (project.godot rewritten by the 4.7
importer, .uid files added) and documents it in the setup guide.
2026-11-03 23:49:39 +00:00

48 lines
1.6 KiB
Plaintext

[gd_scene load_steps=6 format=3 uid="uid://c0world0valheim00"]
[ext_resource type="Script" path="res://scripts/world/world.gd" id="0_world"]
[ext_resource type="Script" path="res://scripts/world/terrain.gd" id="1_terrain"]
[ext_resource type="Script" path="res://scripts/world/props.gd" id="2_props"]
[ext_resource type="PackedScene" path="res://scenes/player.tscn" id="3_player"]
[ext_resource type="Environment" path="res://scenes/default_env.tres" id="4_env"]
[sub_resource type="LabelSettings" id="Label_1"]
font_size = 16
outline_size = 4
outline_color = Color(0, 0, 0, 0.7)
[node name="World" type="Node3D"]
script = ExtResource("0_world")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = ExtResource("4_env")
[node name="Sun" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.819, -0.401, 0.41, 0, 0.715, 0.699, -0.574, -0.573, 0.585, 0, 40, 0)
light_color = Color(1, 0.95, 0.83, 1)
light_energy = 1.8
shadow_enabled = true
shadow_blur = 1.5
directional_shadow_mode = 2
directional_shadow_blend_splits = true
directional_shadow_max_distance = 160.0
[node name="Terrain" type="Node3D" parent="."]
script = ExtResource("1_terrain")
[node name="Props" type="Node3D" parent="."]
script = ExtResource("2_props")
[node name="Player" parent="." instance=ExtResource("3_player")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 12, 0)
[node name="HUD" type="CanvasLayer" parent="."]
[node name="Hint" type="Label" parent="HUD"]
offset_left = 16.0
offset_top = 12.0
offset_right = 600.0
offset_bottom = 60.0
text = "WASD move · Mouse look · Shift sprint · Space jump · ESC free cursor"
label_settings = SubResource("Label_1")