first iteration with authorative movement
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
[gd_scene format=3 uid="uid://b6nq7wjyrroi0"]
|
||||
|
||||
[node name="EmptyNode" type="Node"]
|
||||
@@ -0,0 +1,157 @@
|
||||
[gd_scene load_steps=18 format=3 uid="uid://cw0ho53ruh87m"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_e1dyx"]
|
||||
size = Vector3(16, 0.1, 20)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_xfekw"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_cnq3u"]
|
||||
size = Vector3(16, 0.1, 16)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_dwa2s"]
|
||||
size = Vector3(4, 0.1, 4)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_lt54m"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_fgmeq"]
|
||||
size = Vector3(9.479, 0.1, 4)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_thq07"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xn166"]
|
||||
size = Vector3(16, 0.1, 20)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_intbb"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_e0hgo"]
|
||||
size = Vector3(1, 10, 20)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_qljsj"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_0reu4"]
|
||||
size = Vector3(1, 10, 20)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_8hngc"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_yaygu"]
|
||||
size = Vector3(16, 10, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_hwi1p"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ktywj"]
|
||||
size = Vector3(16, 10, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_lm401"]
|
||||
|
||||
[node name="House" type="Node3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0137916, -4.76837e-07, 0.0149183)
|
||||
|
||||
[node name="FirstFloor" type="StaticBody3D" parent="."]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="FirstFloor"]
|
||||
shape = SubResource("BoxShape3D_e1dyx")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="FirstFloor"]
|
||||
transform = Transform3D(16, 0, 0, 0, 0.1, 0, 0, 0, 20, 0, 0, 0)
|
||||
mesh = SubResource("BoxMesh_xfekw")
|
||||
|
||||
[node name="SecondFloor" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="SecondFloor"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2)
|
||||
shape = SubResource("BoxShape3D_cnq3u")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="SecondFloor"]
|
||||
transform = Transform3D(16, 0, 0, 0, 0.1, 0, 0, 0, 16, 0, 0, -2)
|
||||
mesh = SubResource("BoxMesh_xfekw")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="SecondFloor"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 8)
|
||||
shape = SubResource("BoxShape3D_dwa2s")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="SecondFloor"]
|
||||
transform = Transform3D(4, 0, 0, 0, 0.1, 0, 0, 0, 4, 6, 0, 8)
|
||||
mesh = SubResource("BoxMesh_lt54m")
|
||||
|
||||
[node name="Stairs" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 8)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Stairs"]
|
||||
transform = Transform3D(0.849893, -0.526956, 0, 0.526956, 0.849893, 0, 0, 0, 1, 0, 2.51, 0)
|
||||
shape = SubResource("BoxShape3D_fgmeq")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Stairs"]
|
||||
transform = Transform3D(8.05613, -0.0526956, 0, 4.99501, 0.0849893, 0, 0, 0, 4, 0, 2.51, 0)
|
||||
mesh = SubResource("BoxMesh_thq07")
|
||||
|
||||
[node name="Ceiling" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0)
|
||||
visible = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ceiling"]
|
||||
shape = SubResource("BoxShape3D_xn166")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ceiling"]
|
||||
transform = Transform3D(16, 0, 0, 0, 0.1, 0, 0, 0, 20, 0, 0, 0)
|
||||
mesh = SubResource("BoxMesh_intbb")
|
||||
|
||||
[node name="Wall1" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8, 0, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Wall1"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 0)
|
||||
shape = SubResource("BoxShape3D_e0hgo")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Wall1"]
|
||||
transform = Transform3D(1, 0, 0, 0, 10, 0, 0, 0, 20, 0, 5, 0)
|
||||
mesh = SubResource("BoxMesh_qljsj")
|
||||
|
||||
[node name="Wall2" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8, 0, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Wall2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 0)
|
||||
shape = SubResource("BoxShape3D_0reu4")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Wall2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 10, 0, 0, 0, 20, 0, 5, 0)
|
||||
mesh = SubResource("BoxMesh_8hngc")
|
||||
|
||||
[node name="Wall3" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -10)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Wall3"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 0)
|
||||
shape = SubResource("BoxShape3D_yaygu")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Wall3"]
|
||||
transform = Transform3D(16, 0, 0, 0, 10, 0, 0, 0, 1, 0, 5, 0)
|
||||
mesh = SubResource("BoxMesh_hwi1p")
|
||||
|
||||
[node name="Wall4" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Wall4"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 0)
|
||||
shape = SubResource("BoxShape3D_ktywj")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Wall4"]
|
||||
transform = Transform3D(16, 0, 0, 0, 10, 0, 0, 0, 1, 0, 5, 0)
|
||||
mesh = SubResource("BoxMesh_lm401")
|
||||
|
||||
[node name="Lights" type="Node3D" parent="."]
|
||||
|
||||
[node name="FirstFloorLight" type="OmniLight3D" parent="Lights"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0)
|
||||
light_energy = 6.0
|
||||
shadow_enabled = true
|
||||
omni_range = 40.0
|
||||
omni_attenuation = 1.5
|
||||
|
||||
[node name="SecondFloorLight" type="OmniLight3D" parent="Lights"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9, 0)
|
||||
visible = false
|
||||
light_energy = 0.3
|
||||
shadow_enabled = true
|
||||
omni_range = 40.0
|
||||
@@ -0,0 +1,63 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://d22gcvp7p2sfr"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/in_game.gd" id="1_0lma2"]
|
||||
[ext_resource type="PlaneMesh" uid="uid://dwpvym2kc4gd8" path="res://meshes/ground.tres" id="1_7j0qh"]
|
||||
[ext_resource type="Material" uid="uid://chp3rogcgumau" path="res://materials/ground.tres" id="2_f8uto"]
|
||||
[ext_resource type="PackedScene" uid="uid://cw0ho53ruh87m" path="res://scenes/house.tscn" id="4_38bom"]
|
||||
|
||||
[sub_resource type="Environment" id="Environment_2c67a"]
|
||||
background_mode = 1
|
||||
ambient_light_source = 2
|
||||
ambient_light_color = Color(1, 1, 1, 1)
|
||||
ambient_light_energy = 0.01
|
||||
sdfgi_read_sky_light = false
|
||||
glow_enabled = true
|
||||
glow_normalized = true
|
||||
|
||||
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_1l61b"]
|
||||
|
||||
[node name="InGame" type="Node3D"]
|
||||
script = ExtResource("1_0lma2")
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_2c67a")
|
||||
|
||||
[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="."]
|
||||
_spawnable_scenes = PackedStringArray("res://scenes/runner.tscn")
|
||||
spawn_path = NodePath("../RunnersNode")
|
||||
|
||||
[node name="GroundStaticBody3D" type="StaticBody3D" parent="."]
|
||||
|
||||
[node name="GroundCollisionShape3D" type="CollisionShape3D" parent="GroundStaticBody3D"]
|
||||
shape = SubResource("WorldBoundaryShape3D_1l61b")
|
||||
|
||||
[node name="GroundMeshInstance3D" type="MeshInstance3D" parent="GroundStaticBody3D"]
|
||||
mesh = ExtResource("1_7j0qh")
|
||||
surface_material_override/0 = ExtResource("2_f8uto")
|
||||
|
||||
[node name="House" parent="." instance=ExtResource("4_38bom")]
|
||||
|
||||
[node name="RunnersNode" type="Node3D" parent="."]
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Control" type="Control" parent="CanvasLayer"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="CanvasLayer/Control"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_right = 200.0
|
||||
offset_bottom = 50.0
|
||||
|
||||
[node name="PingTimer" type="Timer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
wait_time = 0.5
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="PingTimer" to="." method="_on_ping_timer_timeout"]
|
||||
@@ -0,0 +1,67 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://qiew7wf7r8c4"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/main_menu.gd" id="1_ivhyr"]
|
||||
|
||||
[node name="MainMenu" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_ivhyr")
|
||||
|
||||
[node name="MainMenuPanel" type="Panel" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="MainMenuPanel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.156863, 0.156863, 0.305882, 1)
|
||||
|
||||
[node name="MainMenuCenterContainer" type="CenterContainer" parent="MainMenuPanel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="MainMenuVBoxContainer" type="VBoxContainer" parent="MainMenuPanel/MainMenuCenterContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="IpAddressRichTextLabel" type="RichTextLabel" parent="MainMenuPanel/MainMenuCenterContainer/MainMenuVBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 25)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
bbcode_enabled = true
|
||||
text = "[center]Server Address[/center]"
|
||||
scroll_active = false
|
||||
|
||||
[node name="IpAddressTextEdit" type="TextEdit" parent="MainMenuPanel/MainMenuCenterContainer/MainMenuVBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
placeholder_text = "localhost (default)"
|
||||
|
||||
[node name="JoinButtonSpacer" type="Control" parent="MainMenuPanel/MainMenuCenterContainer/MainMenuVBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 15)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="JoinButton" type="Button" parent="MainMenuPanel/MainMenuCenterContainer/MainMenuVBoxContainer"]
|
||||
custom_minimum_size = Vector2(200, 40)
|
||||
layout_mode = 2
|
||||
text = "Join"
|
||||
text_overrun_behavior = 3
|
||||
|
||||
[connection signal="pressed" from="MainMenuPanel/MainMenuCenterContainer/MainMenuVBoxContainer/JoinButton" to="." method="_on_join_button_pressed"]
|
||||
@@ -0,0 +1,85 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://8esyynmieyog"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/runner.gd" id="1_d63rt"]
|
||||
[ext_resource type="Script" path="res://scripts/runner_input.gd" id="2_xmliy"]
|
||||
[ext_resource type="Material" uid="uid://ccrb46njti2ke" path="res://materials/runner.tres" id="3_6c0ro"]
|
||||
[ext_resource type="Script" path="res://scripts/state_machine.gd" id="4_40cmc"]
|
||||
[ext_resource type="Script" path="res://scripts/states/idle.gd" id="5_hq6tn"]
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_ukf45"]
|
||||
properties/0/path = NodePath(".:player_id")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 2
|
||||
properties/1/path = NodePath(".:server_position")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 2
|
||||
properties/2/path = NodePath(".:server_rotation")
|
||||
properties/2/spawn = true
|
||||
properties/2/replication_mode = 2
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_1agtp"]
|
||||
properties/0/path = NodePath("RunnerInput:move_direction")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 2
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_wsx1k"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_j6tb3"]
|
||||
radius = 0.3
|
||||
height = 1.8
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_di3a0"]
|
||||
radius = 0.3
|
||||
height = 1.8
|
||||
|
||||
[sub_resource type="PrismMesh" id="PrismMesh_fcj1v"]
|
||||
|
||||
[node name="Runner" type="CharacterBody3D"]
|
||||
script = ExtResource("1_d63rt")
|
||||
|
||||
[node name="RunnerSync" type="MultiplayerSynchronizer" parent="."]
|
||||
replication_config = SubResource("SceneReplicationConfig_ukf45")
|
||||
|
||||
[node name="RunnerInput" type="MultiplayerSynchronizer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
replication_config = SubResource("SceneReplicationConfig_1agtp")
|
||||
script = ExtResource("2_xmliy")
|
||||
|
||||
[node name="RunnerCamera" type="Camera3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="CameraPivot" type="Node3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
|
||||
|
||||
[node name="RunnerCameraSpringArm3D" type="SpringArm3D" parent="CameraPivot"]
|
||||
shape = SubResource("SphereShape3D_wsx1k")
|
||||
spring_length = 3.5
|
||||
|
||||
[node name="RunnerCameraTarget" type="Node3D" parent="CameraPivot/RunnerCameraSpringArm3D"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
shape = SubResource("CapsuleShape3D_j6tb3")
|
||||
|
||||
[node name="RunnerSkin" type="Node3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="RunnerSkin"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
mesh = SubResource("CapsuleMesh_di3a0")
|
||||
skeleton = NodePath("../..")
|
||||
surface_material_override/0 = ExtResource("3_6c0ro")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="RunnerSkin/MeshInstance3D"]
|
||||
transform = Transform3D(0.35, 0, 0, 0, -1.09278e-08, 0.1, 0, -0.25, -4.37114e-09, 0, 0.65, -0.3)
|
||||
mesh = SubResource("PrismMesh_fcj1v")
|
||||
surface_material_override/0 = ExtResource("3_6c0ro")
|
||||
|
||||
[node name="StateMachine" type="Node" parent="."]
|
||||
script = ExtResource("4_40cmc")
|
||||
|
||||
[node name="Idle" type="Node" parent="StateMachine"]
|
||||
script = ExtResource("5_hq6tn")
|
||||
Reference in New Issue
Block a user