M0 scaffold: Godot 4 survival game skeleton + architecture/addon-SDK docs
This commit is contained in:
28
scenes/default_env.tres
Normal file
28
scenes/default_env.tres
Normal file
@@ -0,0 +1,28 @@
|
||||
[gd_resource type="Environment" load_steps=4 format=3]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="SkyMat_1"]
|
||||
sky_top_color = Color(0.38, 0.52, 0.68, 1)
|
||||
sky_horizon_color = Color(0.7, 0.75, 0.78, 1)
|
||||
ground_bottom_color = Color(0.2, 0.22, 0.2, 1)
|
||||
ground_horizon_color = Color(0.64, 0.68, 0.67, 1)
|
||||
|
||||
[sub_resource type="Sky" id="Sky_1"]
|
||||
sky_material = SubResource("SkyMat_1")
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_1")
|
||||
ambient_light_source = 3
|
||||
ambient_light_color = Color(0.6, 0.66, 0.72, 1)
|
||||
ambient_light_energy = 0.4
|
||||
tonemap_mode = 3
|
||||
tonemap_white = 6.0
|
||||
ssao_enabled = true
|
||||
fog_enabled = true
|
||||
fog_light_color = Color(0.72, 0.78, 0.82, 1)
|
||||
fog_density = 0.012
|
||||
fog_sky_affect = 0.4
|
||||
volumetric_fog_enabled = true
|
||||
volumetric_fog_density = 0.02
|
||||
adjustment_enabled = true
|
||||
adjustment_saturation = 1.05
|
||||
27
scenes/player.tscn
Normal file
27
scenes/player.tscn
Normal file
@@ -0,0 +1,27 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://b0player0valheim0"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/player/player.gd" id="1_player"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="Capsule_1"]
|
||||
radius = 0.4
|
||||
height = 1.8
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_1"]
|
||||
radius = 0.4
|
||||
height = 1.8
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
script = ExtResource("1_player")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)
|
||||
shape = SubResource("Capsule_1")
|
||||
|
||||
[node name="Body" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)
|
||||
visible = false
|
||||
mesh = SubResource("CapsuleMesh_1")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
||||
current = true
|
||||
50
scenes/world.tscn
Normal file
50
scenes/world.tscn
Normal file
@@ -0,0 +1,50 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://c0world0valheim00"]
|
||||
|
||||
[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"]
|
||||
|
||||
[sub_resource type="Environment" id="Env_inline"]
|
||||
background_mode = 2
|
||||
ambient_light_source = 3
|
||||
ambient_light_color = Color(0.6, 0.66, 0.72, 1)
|
||||
ambient_light_energy = 0.4
|
||||
tonemap_mode = 3
|
||||
fog_enabled = true
|
||||
fog_light_color = Color(0.72, 0.78, 0.82, 1)
|
||||
fog_density = 0.012
|
||||
|
||||
[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"]
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Env_inline")
|
||||
|
||||
[node name="Sun" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(0.86, -0.35, 0.37, 0, 0.72, 0.69, -0.51, -0.6, 0.62, 0, 40, 0)
|
||||
light_color = Color(1, 0.96, 0.86, 1)
|
||||
light_energy = 1.2
|
||||
shadow_enabled = true
|
||||
|
||||
[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")
|
||||
Reference in New Issue
Block a user