summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.import/hitsound.wav-bb4c90e5fac0abe837860e3914ab25b5.md53
-rw-r--r--.import/hitsound.wav-bb4c90e5fac0abe837860e3914ab25b5.samplebin0 -> 366945 bytes
-rw-r--r--.import/killsound.wav-3a78d4cfb6527b83ad43577928e2c897.md53
-rw-r--r--.import/killsound.wav-3a78d4cfb6527b83ad43577928e2c897.samplebin0 -> 328033 bytes
-rw-r--r--.import/killsound.wav-63de2187a645827ded4cb280947ce0dc.md53
-rw-r--r--.import/killsound.wav-63de2187a645827ded4cb280947ce0dc.samplebin0 -> 328033 bytes
-rw-r--r--default_env.tres2
-rw-r--r--maps/Main.tscn8
-rw-r--r--materials/Material_002.materialbin0 -> 716517 bytes
-rw-r--r--materials/RocketMaterial.materialbin0 -> 128982 bytes
-rw-r--r--materials/housetexture.material (renamed from work/housetexture.material)bin3147689 -> 3147689 bytes
-rw-r--r--materials/sandyground.material (renamed from work/sandyground.material)bin756248 -> 756248 bytes
-rw-r--r--particles/RocketTrail.tscn1
-rw-r--r--project.godot2
-rw-r--r--scenes/ClientUI.tscn45
-rw-r--r--scenes/GameBase.tscn2
-rw-r--r--scenes/ballistics/Rocket.gd21
-rw-r--r--scenes/ballistics/Rocket.tscn30
-rw-r--r--scenes/characters/PlayerAreaDetect.gd9
-rw-r--r--scenes/characters/PlayerRigid.tscn22
-rw-r--r--scenes/environment/CaptureFlag.tscn2
-rw-r--r--scenes/environment/Water.tscn2
-rw-r--r--scenes/environment/dockscene.tscn2
-rw-r--r--scenes/environment/housescene.tscn2
-rw-r--r--scenes/environment/islandscene.tscn2
-rw-r--r--scenes/weapons/rockets.gd11
-rw-r--r--scripts/GameBase.gd22
-rw-r--r--scripts/Server.gd15
-rw-r--r--scripts/ballistics/Cannonball.gd2
-rw-r--r--scripts/ballistics/NetworkedProjectile.gd9
-rw-r--r--scripts/boats/Gunboat.gd5
-rw-r--r--scripts/characters/player_controller_new.gd81
-rw-r--r--scripts/machines/Cannon.gd7
-rw-r--r--sounds/hitsound.wavbin0 -> 366660 bytes
-rw-r--r--sounds/hitsound.wav.import23
-rw-r--r--sounds/killsound.wavbin0 -> 327748 bytes
-rw-r--r--sounds/killsound.wav.import23
-rw-r--r--theming/FreeMono.otf (renamed from textures/FreeMono.otf)bin430884 -> 430884 bytes
-rw-r--r--theming/menu_font.tres6
-rw-r--r--ui/HUD.gd6
-rw-r--r--ui/HUD.tscn25
-rw-r--r--ui/MainMenu.gd61
-rw-r--r--ui/MainMenu.tscn44
-rw-r--r--ui/clientmenu/ClientUI.gd (renamed from scripts/ClientUI.gd)7
-rw-r--r--ui/clientmenu/ClientUI.tscn45
-rw-r--r--ui/servermenu/CmdPrompt.gd (renamed from scripts/CmdPrompt.gd)0
-rw-r--r--ui/servermenu/Console.gd (renamed from scripts/Console.gd)0
-rw-r--r--ui/servermenu/ServerUI.gd (renamed from scripts/ServerUI.gd)5
-rw-r--r--ui/servermenu/ServerUI.tscn (renamed from scenes/ServerUI.tscn)78
-rw-r--r--work/Material_002.materialbin716370 -> 0 bytes
-rw-r--r--work/RocketMaterial.materialbin128983 -> 0 bytes
-rw-r--r--work/progress_chart.odsbin14841 -> 17545 bytes
52 files changed, 450 insertions, 186 deletions
diff --git a/.import/hitsound.wav-bb4c90e5fac0abe837860e3914ab25b5.md5 b/.import/hitsound.wav-bb4c90e5fac0abe837860e3914ab25b5.md5
new file mode 100644
index 0000000..683fdd6
--- /dev/null
+++ b/.import/hitsound.wav-bb4c90e5fac0abe837860e3914ab25b5.md5
@@ -0,0 +1,3 @@
+source_md5="1f4945c30a411570f5343287c500f145"
+dest_md5="f5c2fcdcb2e19e22f4b9c6a3a2dbc61e"
+
diff --git a/.import/hitsound.wav-bb4c90e5fac0abe837860e3914ab25b5.sample b/.import/hitsound.wav-bb4c90e5fac0abe837860e3914ab25b5.sample
new file mode 100644
index 0000000..9fe442c
--- /dev/null
+++ b/.import/hitsound.wav-bb4c90e5fac0abe837860e3914ab25b5.sample
Binary files differ
diff --git a/.import/killsound.wav-3a78d4cfb6527b83ad43577928e2c897.md5 b/.import/killsound.wav-3a78d4cfb6527b83ad43577928e2c897.md5
new file mode 100644
index 0000000..5520323
--- /dev/null
+++ b/.import/killsound.wav-3a78d4cfb6527b83ad43577928e2c897.md5
@@ -0,0 +1,3 @@
+source_md5="81166c238efef6ec2b4831475acc2325"
+dest_md5="bf94dd600c865d9e9e891b281c9a858d"
+
diff --git a/.import/killsound.wav-3a78d4cfb6527b83ad43577928e2c897.sample b/.import/killsound.wav-3a78d4cfb6527b83ad43577928e2c897.sample
new file mode 100644
index 0000000..52ea347
--- /dev/null
+++ b/.import/killsound.wav-3a78d4cfb6527b83ad43577928e2c897.sample
Binary files differ
diff --git a/.import/killsound.wav-63de2187a645827ded4cb280947ce0dc.md5 b/.import/killsound.wav-63de2187a645827ded4cb280947ce0dc.md5
new file mode 100644
index 0000000..5520323
--- /dev/null
+++ b/.import/killsound.wav-63de2187a645827ded4cb280947ce0dc.md5
@@ -0,0 +1,3 @@
+source_md5="81166c238efef6ec2b4831475acc2325"
+dest_md5="bf94dd600c865d9e9e891b281c9a858d"
+
diff --git a/.import/killsound.wav-63de2187a645827ded4cb280947ce0dc.sample b/.import/killsound.wav-63de2187a645827ded4cb280947ce0dc.sample
new file mode 100644
index 0000000..52ea347
--- /dev/null
+++ b/.import/killsound.wav-63de2187a645827ded4cb280947ce0dc.sample
Binary files differ
diff --git a/default_env.tres b/default_env.tres
index 20207a4..55082ac 100644
--- a/default_env.tres
+++ b/default_env.tres
@@ -1,6 +1,8 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
+ground_bottom_color = Color( 0.00392157, 0.0862745, 0.172549, 1 )
+ground_horizon_color = Color( 0.00392157, 0.733333, 0.901961, 1 )
[resource]
background_mode = 2
diff --git a/maps/Main.tscn b/maps/Main.tscn
index 04ac81e..5926205 100644
--- a/maps/Main.tscn
+++ b/maps/Main.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=18 format=2]
+[gd_scene load_steps=17 format=2]
[ext_resource path="res://scripts/World.gd" type="Script" id=1]
[ext_resource path="res://scenes/machines/Cannon.tscn" type="PackedScene" id=2]
@@ -11,7 +11,6 @@
[ext_resource path="res://scenes/environment/housescene.tscn" type="PackedScene" id=9]
[ext_resource path="res://scenes/boats/Gunboat.tscn" type="PackedScene" id=10]
[ext_resource path="res://scenes/environment/CaptureFlag.tscn" type="PackedScene" id=11]
-[ext_resource path="res://scenes/ballistics/Rocket.tscn" type="PackedScene" id=12]
[sub_resource type="NavigationMesh" id=14]
vertices = PoolVector3Array( -6.71966, 2.08805, -14.1154, -5.71966, 2.08805, -13.6154, -5.46966, 2.08805, -14.1154, -6.96966, 1.58805, -15.1154, -8.46966, 0.588049, -15.1154, -8.46966, 0.588049, -14.6154, -6.96966, 1.58805, -15.1154, -7.46966, 0.588049, -16.8654, -4.71966, -0.411951, -20.3654, -5.46966, 0.588049, -18.3654, -5.46966, 2.08805, -14.1154, 2.53034, 2.33805, -14.1154, 2.53034, -0.161951, -22.1154, -0.219656, -0.161951, -22.3654, -1.34466, 0.0880492, -21.8654, -0.4895, 1.33805, -15.8476, -3.45952, 1.83805, -15.8695, -1.95461, 0.588049, -18.8464, -0.219656, -0.161951, -22.3654, -2.46966, -0.411951, -22.6154, -4.71966, -0.411951, -20.3654, -1.34466, 0.0880492, -21.8654, -4.71966, -0.411951, -20.3654, -5.46966, -0.161951, -19.3654, -5.46966, 0.588049, -18.3654, -0.219656, -0.161951, -22.3654, -1.71966, -0.911951, -25.3654, -2.46966, -0.411951, -22.6154, -7.46966, 0.588049, -16.8654, -6.96966, 1.58805, -15.1154, -5.46966, 2.08805, -14.1154, -5.46966, 0.588049, -18.3654, 8.03034, -0.161951, -18.6154, 9.53034, -0.911951, -18.6154, 8.03034, -0.161951, -18.8654, 5.28034, 2.08805, -14.1154, 5.53034, 2.08805, -13.6154, 8.78034, 0.838049, -16.8654, 8.03034, 0.838049, -17.3654, 5.28034, 2.08805, -14.1154, 8.03034, 0.838049, -17.3654, 8.03034, -0.161951, -18.6154, 6.03034, -0.411951, -23.1154, 2.53034, -0.161951, -22.1154, 2.53034, 2.33805, -14.1154, 5.51542, 1.08805, -17.3745, 5.52537, -0.161951, -20.3684, 4.04036, -0.161951, -20.3794, 4.03041, 1.33805, -17.3854, 8.03034, -0.161951, -18.6154, 8.03034, -0.161951, -18.8654, 6.03034, -0.411951, -23.1154, 12.7803, 0.588049, -14.6154, 13.5303, 0.0880492, -14.8654, 13.7803, -0.411951, -15.3654, 12.0303, -0.161951, -16.3654, 11.7803, 0.588049, -15.3654, 20.2803, -0.161951, -2.61539, 20.0303, -0.161951, -2.86539, 19.0303, 0.588049, -2.86539, 19.0303, 0.838049, -0.865385, 20.0303, -0.161951, -1.11539, 14.0303, 1.58805, 9.88461, 15.7803, 1.08805, 9.38461, 16.7803, 1.08805, 8.13461, 9.28034, 2.83805, 3.88461, 12.5303, 1.83805, 9.88461, 11.7803, 2.58805, 5.30128, 15.0303, 1.08805, -11.1154, 12.7803, 0.838049, -13.8654, 10.7803, 0.838049, -15.3654, 5.53034, 2.08805, -13.6154, 5.53034, 3.58805, -8.86539, 9.60177, 2.83805, -9.82967, 5.53034, 2.83805, -10.0529, 12.7803, 0.838049, -13.8654, 12.7803, 0.588049, -14.6154, 11.7803, 0.588049, -15.3654, 10.7803, 0.838049, -15.3654, 18.7803, 0.838049, 2.38461, 19.2803, 0.588049, 1.88461, 19.0303, 0.838049, -0.865385, 19.0303, 0.838049, -0.865385, 19.0303, 0.588049, -2.86539, 18.0303, 0.838049, -5.36539, 18.7803, 0.838049, 2.38461, 18.4053, 1.08805, -1.49039, 19.0303, 0.588049, -3.61539, 18.7803, 0.588049, -5.11539, 18.0303, 0.838049, -5.36539, 19.0303, 0.588049, -2.86539, 18.2803, 0.588049, -6.86539, 17.7803, 0.588049, -7.86539, 16.7803, 0.838049, -8.36539, 18.0303, 0.838049, -5.36539, 15.0303, 1.08805, -11.1154, 15.0303, 0.838049, -11.6154, 14.0303, 0.588049, -13.1154, 12.7803, 0.838049, -13.8654, 16.7803, 0.838049, -8.36539, 16.7803, 0.838049, -9.11539, 16.0303, 0.588049, -10.6154, 15.0303, 1.08805, -11.1154, 16.7803, 1.08805, 8.13461, 18.0303, 0.838049, 5.38461, 18.7803, 0.838049, 2.38461, 8.53034, 3.08805, 3.13461, 9.28034, 2.83805, 3.88461, 11.7803, 2.58805, 5.30128, 15.8518, 1.83805, 2.5989, 10.7803, 0.838049, -15.3654, 10.7803, 0.338049, -16.6154, 8.78034, 0.838049, -16.8654, 5.53034, 2.08805, -13.6154, 7.78034, 3.08805, 3.13461, 8.53034, 3.08805, 3.13461, 18.7803, 0.838049, 2.38461, 18.0303, 0.838049, -5.36539, 15.0303, 1.08805, -11.1154, 5.53034, 3.58805, -8.86539, 5.78034, 4.08805, -7.53205, 6.53034, 4.33805, -3.53205, 7.28034, 3.08805, 0.467949, 15.8518, 1.83805, 2.5989, 18.4053, 1.08805, -1.49039, 9.60177, 2.83805, -9.82967, 10.0455, 3.83805, -5.38657, 8.53065, 4.08805, -2.36571, 11.5507, 2.58805, -2.34373, 10.0257, 3.33805, -0.888798, 13.0055, 2.08805, -6.88051, 11.5104, 3.08805, -8.35742, 14.5506, 2.08805, -5.3536, 13.0155, 2.33805, -5.36459, 10.0208, 2.83805, 0.638111, 16.7803, 1.08805, 8.13461, 18.0303, 0.338049, 7.63461, 18.0303, 0.838049, 5.38461, 18.0303, 0.838049, 5.38461, 18.7803, 0.588049, 4.88461, 18.7803, 0.838049, 2.38461, 18.0303, 0.838049, -5.36539, 16.7803, 0.838049, -8.36539, 15.0303, 1.08805, -11.1154, 20.0303, -0.161951, -3.61539, 20.0303, -0.161951, -2.86539, 20.2803, -0.161951, -2.61539, 22.0303, -0.911951, -4.61539, 18.2803, 0.0880492, -8.11539, 17.7803, 0.588049, -7.86539, 18.2803, 0.588049, -6.86539, 19.2803, -0.161951, -6.61539, 13.7803, -0.411951, -15.3654, 13.5303, 0.0880492, -14.8654, 14.5303, -0.161951, -14.1154, 16.2803, -0.911951, -14.6154, 14.0303, 0.588049, -13.1154, 15.0303, 0.838049, -11.6154, 15.2803, 0.588049, -12.1154, 14.5303, 0.338049, -13.3654, 16.2803, -0.911951, -14.6154, 16.0303, 0.0880492, -12.1154, 16.5303, -0.161951, -11.6154, 16.5303, 0.338049, -10.8654, 16.0303, 0.588049, -10.6154, 16.7803, 0.838049, -9.11539, 19.2803, 0.0880492, -5.36539, 18.7803, 0.588049, -5.11539, 19.0303, 0.588049, -3.61539, 20.0303, -0.161951, -3.61539, 16.5303, -0.161951, -11.6154, 17.7803, -0.161951, -9.36539, 18.2803, -0.161951, -8.86539, 20.0303, -0.911951, -10.1154, 16.2803, -0.911951, -14.6154, 18.2803, -0.161951, -8.86539, 18.2803, 0.0880492, -8.11539, 19.2803, -0.161951, -6.61539, 22.0303, -0.911951, -5.36539, 20.0303, -0.911951, -10.1154, 20.0303, -0.161951, -3.61539, 22.0303, -0.911951, -4.61539, 22.0303, -0.911951, -5.36539, 19.2803, -0.161951, -6.61539, 19.2803, 0.0880492, -5.36539, 14.5303, 0.338049, -13.3654, 15.2803, 0.588049, -12.1154, 16.0303, 0.0880492, -12.1154, 16.2803, -0.911951, -14.6154, 14.5303, -0.161951, -14.1154, 16.5303, 0.338049, -10.8654, 16.7803, 0.838049, -9.11539, 17.7803, -0.161951, -9.36539, 16.5303, -0.161951, -11.6154, -29.9697, -1.66195, -15.1154, -28.7197, -0.661951, -6.86539, -28.4697, -1.66195, -14.3654, -29.9697, -1.66195, -15.1154, -28.4697, -1.66195, -14.3654, -26.9697, -1.91195, -14.6154, -11.4697, -0.161951, -11.3654, -10.4697, -0.161951, -11.6154, -10.4697, -0.411951, -12.3654, -12.2197, -0.911951, -12.8654, -20.9697, -0.661951, -5.86539, -17.7197, -2.41195, -13.6154, -24.4697, -2.16195, -14.3654, -24.2197, -0.411951, -2.86539, -18.2613, -2.41195, -12.3237, -19.0697, -2.66195, -13.7654, -24.2822, -0.411951, -5.74039, -20.7197, 1.08805, -2.86539, -20.4697, 0.588049, -4.61539, -21.2197, 0.0880492, -4.86539, -24.2197, -0.411951, -2.86539, -23.053, -0.411951, -2.86539, -22.2197, -0.411951, -4.19872, -11.4697, 0.0880492, -10.8654, -11.4697, -0.161951, -11.3654, -12.2197, -0.911951, -12.8654, -14.7197, -2.16195, -14.6154, -17.7197, -2.41195, -13.6154, -15.9697, -0.911951, -9.11539, -20.9697, -0.661951, -5.86539, -17.7197, -1.16195, -7.36539, -15.9697, -0.911951, -9.11539, -17.7197, -2.41195, -13.6154, -18.2613, -2.41195, -12.3237, -24.2197, -0.411951, -2.86539, -21.2197, 0.0880492, -4.86539, -20.9697, -0.661951, -5.86539, -22.2197, -0.411951, -4.19872, -21.9697, 0.338049, 2.63461, -21.4697, 0.588049, 3.38461, -20.9697, 0.588049, 3.38461, -19.9697, 1.08805, 3.13461, -20.2197, 1.33805, 1.38461, -20.4697, 0.588049, -4.61539, -20.7197, 1.08805, -2.86539, -20.2197, 1.33805, -2.86539, -16.2197, 1.58805, -5.36539, -17.7197, 1.33805, 4.13461, -16.9697, 0.588049, 5.63461, -16.7197, 0.338049, 5.63461, -16.9697, 1.58805, 3.38461, -16.2197, 1.58805, -5.36539, -20.2197, 1.33805, -2.86539, -20.2197, 1.58805, -1.86539, -15.9697, 2.08805, 3.13461, -14.4697, 2.08805, 4.88461, -15.4697, 2.33805, -0.972528, -16.2197, 1.58805, -5.36539, -14.4697, 2.08805, 4.88461, -13.4697, 1.83805, 8.63461, 0.780344, 2.83805, 8.38461, 0.780344, 2.58805, 7.13461, -3.71966, 3.58805, -7.86539, -6.49743, 2.83805, -7.30983, -9.27521, 2.83805, -6.75427, -15.4697, 2.33805, -0.972528, -10.6197, 1.83805, 8.58462, -3.49466, 3.08805, 8.45962, -0.037838, 3.33805, 4.40734, -1.6742, 3.33805, -1.0472, -2.90147, 3.83805, -5.13811, -9.46456, 3.83805, -3.85249, -1.97882, 2.58805, 6.61772, -6.48386, 3.08805, 6.63476, -1.98902, 3.33805, 3.64193, -3.49393, 2.58805, 5.11884, -4.95904, 3.33805, 3.61996, -4.95952, 3.33805, -3.86953, -0.493813, 2.33805, 6.62871, -7.98926, 3.08805, 0.622189, -9.48398, 2.83805, 5.12489, -7.94945, 3.83805, -2.3536, -10.9496, 3.08805, -3.86348, -10.9695, 3.33805, -2.37558, -4.95461, 3.58805, -5.34644, -13.9696, 2.58805, -3.88545, -9.71966, 2.33805, -9.86539, -10.4697, 2.33805, -9.86539, -11.7197, 2.08805, -8.61539, -5.71966, 3.08805, -8.11539, -19.9697, 1.08805, 3.13461, -17.7197, 1.33805, 4.13461, -16.9697, 1.58805, 3.38461, -20.2197, 1.33805, 1.38461, -25.7197, -0.661951, 1.38461, -23.2197, -0.411951, 2.88461, -21.9697, 0.338049, 2.63461, -11.7197, 2.08805, -8.61539, -15.2197, 1.58805, -8.11539, -16.2197, 1.58805, -5.36539, -3.71966, 3.58805, -7.86539, -5.71966, 3.08805, -8.11539, -9.27521, 2.83805, -6.75427, -6.49743, 2.83805, -7.30983, -5.71966, 2.08805, -13.6154, -6.71966, 2.08805, -14.1154, -9.71966, 2.33805, -9.86539, -5.71966, 3.08805, -8.11539, -5.71966, 3.08805, -10.8654, -20.2197, 1.58805, 0.384615, -20.2197, 1.33805, 1.38461, -19.9697, 1.08805, 3.13461, -19.9697, 1.08805, 3.13461, -16.9697, 1.58805, 3.38461, -15.9697, 2.08805, 3.13461, -20.2197, 1.58805, -1.86539, -20.2197, 1.58805, 0.384615, -18.4947, 1.33805, 2.10962, -27.4697, 1.58805, -6.11539, -28.2197, 1.58805, -5.86539, -28.2197, 1.58805, -3.61539, -27.4697, 1.58805, -3.36539, -27.4697, 1.58805, -6.11539, -27.4697, 1.58805, -3.36539, -25.2197, 1.58805, -2.11539, -20.2197, 1.58805, 0.384615, -20.2197, 1.58805, -1.86539, -25.2197, 1.58805, -2.11539, -27.4697, 1.58805, 0.384615, -25.2197, 1.58805, -13.6154, -27.4697, 1.58805, -13.6154, -27.4697, 1.58805, -6.11539, -25.2197, 1.58805, -2.11539, -27.4697, 1.58805, -3.36539, -27.4697, 1.58805, 0.384615, -25.2197, 1.58805, -2.11539, -3.46966, 3.83805, -8.36539, -0.469656, 3.83805, -8.36539, -0.469656, 3.83805, -8.86539, -3.46966, 3.83805, -8.86539, 5.53034, 3.58805, -8.86539, 4.53034, 3.83805, -8.61539, 3.78034, 3.58805, -7.86539, 5.28034, 3.08805, 5.13461, 7.78034, 3.08805, 3.13461, 7.28034, 3.08805, 0.467949, 6.53034, 4.33805, -3.53205, 5.78034, 4.08805, -7.53205, 4.11368, 4.33805, -4.9765, 4.61368, 3.33805, -0.643164, -4.71966, 3.83805, -13.1154, -4.71966, 3.83805, -8.86539, -3.46966, 3.83805, -8.86539, -4.71966, 3.83805, -13.1154, -3.46966, 3.83805, -8.86539, -0.469656, 3.83805, -8.86539, 4.53034, 3.83805, -13.1154, -4.71966, 3.83805, -13.1154, -0.469656, 3.83805, -8.86539, 4.03034, 3.83805, -8.86539, 4.53034, 3.83805, -8.61539, 4.03034, 3.83805, -8.86539, 3.78034, 3.58805, -7.86539, 4.53034, 3.83805, -8.61539, 4.53034, 3.83805, -13.1154, 4.03034, 3.83805, -8.86539, -27.2197, -0.411951, -6.86539, -25.4697, -0.411951, -6.86539, -25.4697, -0.411951, -7.86539, -27.2197, -0.411951, -8.61539, -0.469656, 3.33805, -7.86539, -0.469656, 3.83805, -8.36539, -3.46966, 3.83805, -8.36539, -0.469656, 3.33805, -7.86539, -3.46966, 3.83805, -8.36539, -3.71966, 3.58805, -7.86539, 0.780344, 2.58805, 7.13461, 1.03034, 2.83805, 6.63461, 0.730345, 3.33805, 3.73462, -0.0196552, 3.58805, -3.51538, -2.90147, 3.83805, -5.13811, -1.6742, 3.33805, -1.0472, -0.037838, 3.33805, 4.40734, 1.03034, 2.83805, 6.63461, 2.53034, 3.08805, 6.63461, 5.28034, 3.08805, 5.13461, 3.78034, 3.58805, -7.86539, -0.469656, 3.33805, -7.86539, -0.0196552, 3.58805, -3.51538, 0.730345, 3.33805, 3.73462, 4.61368, 3.33805, -0.643164, 4.11368, 4.33805, -4.9765, 2.36368, 3.08805, -7.86539, 1.00534, 3.08805, -6.89038, 1.04539, 3.33805, -3.84644, -27.2197, -0.411951, -5.61539, -27.2197, -0.411951, -3.86539, -26.2197, -0.161951, -3.86539, -26.2197, -0.411951, -5.61539, -23.4697, -0.161951, -0.615385, -23.4697, -0.161951, -1.61539, -24.2197, -0.161951, -1.61539, -24.4697, -0.161951, -0.365385, -23.7197, -0.161951, 0.134615, -26.2197, -0.411951, 0.134615, -23.7197, -0.161951, 0.134615, -24.4697, -0.161951, -0.365385, -26.2197, -0.411951, -0.365385, -13.7197, 1.58805, 9.63461, -14.4697, 1.08805, 9.63461, -13.9697, 1.58805, 10.3846, -20.9697, 0.338049, 4.13461, -20.9697, 0.588049, 3.38461, -21.4697, 0.588049, 3.38461, 13.5303, 1.58805, 10.3846, 14.0303, 1.58805, 9.88461, 12.5303, 1.83805, 9.88461, 12.5303, 1.33805, 11.1346, -14.7197, 0.338049, 13.3846, -16.2197, -0.911951, 11.6346, -16.9697, -0.161951, 13.1346, -12.4697, 0.0880492, 17.1346, 13.5303, 0.338049, 12.1346, 13.5303, 1.58805, 10.3846, 12.5303, 1.33805, 11.1346, 12.0303, 1.08805, 11.6346, 10.2803, 1.08805, 14.3846, -16.7197, 0.338049, 5.63461, -16.9697, 0.588049, 5.63461, -16.7197, -0.411951, 7.13461, -15.9697, -0.161951, 7.88461, -13.7197, 0.838049, 13.3846, -14.7197, 0.338049, 13.3846, -12.4697, 0.0880492, 17.1346, -0.219656, 0.838049, 18.8846, 4.53034, 1.83805, 15.1346, 0.780344, 2.83805, 8.38461, -13.4697, 1.83805, 8.63461, -12.4697, 0.0880492, 17.1346, -6.71966, 0.0880492, 19.6346, 2.03034, 2.83805, 10.6346, -3.49466, 3.08805, 8.45962, -10.6197, 1.83805, 8.58462, -6.49417, 1.58805, 15.6491, -10.9795, 1.83805, 11.1585, -7.99442, 1.33805, 12.6294, -9.46432, 1.58805, 14.1173, -6.4943, 1.33805, 14.1392, -1.98926, 2.33805, 14.1222, -4.9895, 2.58805, 11.1524, -6.47451, 1.83805, 11.1415, -6.45461, 2.58805, 9.65356, -7.95952, 1.58805, 11.1305, -9.47463, 2.08805, 9.63159, -10.9492, 0.588049, 15.6161, -10.9493, 1.33805, 14.1563, -15.9697, -0.161951, 7.88461, -16.7197, -0.411951, 7.13461, -17.7197, -0.911951, 7.38461, -19.7197, -1.41195, 8.63461, -16.9697, -0.161951, 13.1346, -16.2197, -0.911951, 11.6346, -18.3447, -1.41195, 10.8846, -16.9596, -1.16195, 9.6206, 8.78034, 0.838049, 16.1346, 10.5303, 0.338049, 15.3846, 10.2803, 1.08805, 14.3846, -0.219656, 0.838049, 18.8846, 1.78034, 0.588049, 19.3846, 2.28034, 0.838049, 18.8846, 6.03034, 0.838049, 17.8846, 7.78034, 0.588049, 17.8846, 8.78034, 0.838049, 16.1346, -13.4697, 1.83805, 8.63461, -13.7197, 1.58805, 9.63461, -13.7197, 0.838049, 13.3846, -12.4697, 0.0880492, 17.1346, -13.7197, 1.58805, 9.63461, -13.9697, 1.58805, 10.3846, -13.7197, 0.838049, 13.3846, 2.28034, 0.838049, 18.8846, 4.78034, 0.588049, 18.8846, 6.03034, 0.838049, 17.8846, 8.78034, 0.838049, 16.1346, 10.2803, 1.08805, 14.3846, 12.0303, 1.08805, 11.6346, 5.53034, 1.83805, 15.1346, 6.03034, 0.838049, 17.8846, 9.43035, 1.58805, 13.0346, -20.9697, 0.338049, 4.13461, -21.4697, 0.588049, 3.38461, -19.7197, -1.41195, 8.63461, -20.5947, -0.161951, 6.00961, -17.7197, -0.911951, 7.38461, -20.9697, 0.338049, 4.13461, -19.7197, -1.41195, 8.63461, -18.5322, -0.911951, 6.57211, 4.53034, 1.83805, 15.1346, -0.219656, 0.838049, 18.8846, 2.28034, 0.838049, 18.8846, 6.03034, 0.838049, 17.8846, 5.53034, 1.83805, 15.1346, -6.71966, 0.0880492, 19.6346, -0.969656, 0.588049, 19.3846, -0.219656, 0.838049, 18.8846, 4.53034, 6.58805, 14.3846, 12.0303, 6.33805, 10.6346, 8.53034, 6.58805, 4.13461, 1.28034, 6.33805, 7.88461, 3.23034, 9.08805, 11.7846, 10.6303, 8.83805, 8.03462, 8.53041, 8.83805, 8.11455, 7.03544, 9.08805, 9.64751, 8.54552, 7.08805, 11.1134, 8.52045, 8.33805, 9.6585, 5.03034, 2.08805, 13.3846, 11.0303, 1.83805, 10.3846, 8.28034, 2.83805, 5.38461, 2.53034, 2.83805, 8.38461, 7.43035, 1.58805, 12.1846, 5.50534, 2.33805, 8.10961, 8.53041, 2.33805, 9.61455 )
@@ -42,7 +41,7 @@ directional_shadow_depth_range = 1
directional_shadow_max_distance = 8192.0
[node name="Water" parent="." instance=ExtResource( 7 )]
-transform = Transform( 10000, 0, 0, 0, 10, 0, 0, 0, 10000, 0, 0, 0 )
+transform = Transform( 10000, 0, 0, 0, 100, 0, 0, 0, 10000, 0, 0, 0 )
[node name="WORLDGEO" type="Spatial" parent="."]
@@ -75,9 +74,6 @@ transform = Transform( -0.854422, 0, 0.519579, 0, 1, 0, -0.519579, 0, -0.854422,
[node name="BALLISTICS" type="Spatial" parent="."]
-[node name="Rocket" parent="BALLISTICS" instance=ExtResource( 12 )]
-transform = Transform( 0.94234, 0.170459, -0.287989, -0.188378, 0.981456, -0.0354802, 0.276601, 0.0876853, 0.956976, -7.34035, 6.44401, -4.26093 )
-
[node name="PLAYERS" type="Spatial" parent="."]
[node name="Player" parent="PLAYERS" instance=ExtResource( 5 )]
diff --git a/materials/Material_002.material b/materials/Material_002.material
new file mode 100644
index 0000000..db360d3
--- /dev/null
+++ b/materials/Material_002.material
Binary files differ
diff --git a/materials/RocketMaterial.material b/materials/RocketMaterial.material
new file mode 100644
index 0000000..3e9c013
--- /dev/null
+++ b/materials/RocketMaterial.material
Binary files differ
diff --git a/work/housetexture.material b/materials/housetexture.material
index 188f3c5..188f3c5 100644
--- a/work/housetexture.material
+++ b/materials/housetexture.material
Binary files differ
diff --git a/work/sandyground.material b/materials/sandyground.material
index 4e7d497..4e7d497 100644
--- a/work/sandyground.material
+++ b/materials/sandyground.material
Binary files differ
diff --git a/particles/RocketTrail.tscn b/particles/RocketTrail.tscn
index 5dbb877..5da672a 100644
--- a/particles/RocketTrail.tscn
+++ b/particles/RocketTrail.tscn
@@ -25,6 +25,7 @@ color_ramp = SubResource( 7 )
flags_unshaded = true
flags_do_not_receive_shadows = true
vertex_color_use_as_albedo = true
+params_cull_mode = 2
params_billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
diff --git a/project.godot b/project.godot
index f38fdaa..738d81b 100644
--- a/project.godot
+++ b/project.godot
@@ -11,7 +11,7 @@ config_version=4
[application]
config/name="boats"
-run/main_scene="res://scenes/ClientUI.tscn"
+run/main_scene="res://ui/MainMenu.tscn"
config/icon="res://icon.png"
[display]
diff --git a/scenes/ClientUI.tscn b/scenes/ClientUI.tscn
deleted file mode 100644
index 50b0a77..0000000
--- a/scenes/ClientUI.tscn
+++ /dev/null
@@ -1,45 +0,0 @@
-[gd_scene load_steps=2 format=2]
-
-[ext_resource path="res://scripts/ClientUI.gd" type="Script" id=1]
-
-[node name="ClientUI" type="Node2D"]
-script = ExtResource( 1 )
-
-[node name="IP" type="LineEdit" parent="."]
-margin_left = 23.0
-margin_top = 25.0
-margin_right = 119.0
-margin_bottom = 49.0
-text = "127.0.0.1"
-
-[node name="Port" type="SpinBox" parent="."]
-margin_left = 132.0
-margin_top = 25.0
-margin_right = 206.0
-margin_bottom = 49.0
-max_value = 65536.0
-value = 25565.0
-
-[node name="Name" type="LineEdit" parent="."]
-margin_left = 23.0
-margin_top = 69.0
-margin_right = 206.0
-margin_bottom = 93.0
-text = "PlayerName"
-
-[node name="ConnectButton" type="Button" parent="."]
-margin_left = 23.0
-margin_top = 113.0
-margin_right = 209.0
-margin_bottom = 138.0
-text = "Connect"
-
-[node name="LocalButton" type="Button" parent="."]
-margin_left = 23.0
-margin_top = 251.0
-margin_right = 209.0
-margin_bottom = 271.0
-text = "Host Local Game"
-
-[connection signal="pressed" from="ConnectButton" to="." method="_connect_btn"]
-[connection signal="pressed" from="LocalButton" to="." method="_run_local_server"]
diff --git a/scenes/GameBase.tscn b/scenes/GameBase.tscn
index 6725a55..eaa6c86 100644
--- a/scenes/GameBase.tscn
+++ b/scenes/GameBase.tscn
@@ -8,7 +8,7 @@
script = ExtResource( 3 )
[node name="Water" parent="." instance=ExtResource( 1 )]
-transform = Transform( 6000, 0, 0, 0, 15, 0, 0, 0, 6000, 0, 0, 0 )
+transform = Transform( 6000, 0, 0, 0, 100, 0, 0, 0, 6000, 0, 0, 0 )
[node name="WORLDGEO" type="Spatial" parent="."]
diff --git a/scenes/ballistics/Rocket.gd b/scenes/ballistics/Rocket.gd
index d21b9f6..171a49e 100644
--- a/scenes/ballistics/Rocket.gd
+++ b/scenes/ballistics/Rocket.gd
@@ -12,7 +12,7 @@ func _ready():
$RocketTrail.emitting = true
func get_init_info():
- return {"linear_velocity" : linear_velocity, "angular_velocity" : angular_velocity, "life" : life, "shooter" : shooter}
+ return {"linear_velocity" : linear_velocity, "angular_velocity" : angular_velocity, "life" : life, "shooter" : shooter, "shooter_id" : shooter_id}
remote func update_phys_transform(t, lv, av):
transform = t
@@ -24,10 +24,10 @@ func _physics_process(delta):
add_central_force(global_transform.basis.x*strength)
life += delta
else:
- explode()
+ rpc("explode")
$RocketTrail.emitting = false
-func explode():
+remotesync func explode():
if cannot_explode:
return
cannot_explode = true
@@ -41,15 +41,12 @@ func explode():
world.add_child(expl)
expl.init(global_transform.origin, Vector3.ZERO)
-
- for body in $BlastArea.get_overlapping_bodies():
- if body.has_method("damage") and body.is_network_master():
- body.rpc("damage", 50, "explosive", shooter, "using 'rocket'")
- print((5000*(global_transform.origin - body.global_transform.origin).normalized()))
- body.apply_central_impulse((5000*(global_transform.origin - body.global_transform.origin).normalized()))
- body.rpc("apply_central_impulse", (5000*(global_transform.origin - body.global_transform.origin).normalized()))
-
+ if is_network_master():
+ for body in $BlastArea.get_overlapping_bodies():
+ if body.has_method("damage"):
+ body.rpc("damage", 20, "explosive", [shooter_id, shooter], "using 'rocket'")
+ body.rpc_id(body.get_network_master(), "net_apply_impulse", (500*(body.global_transform.origin - global_transform.origin).normalized()))
$AnimationPlayer.play("explode")
func _on_collision(body):
- explode()
+ rpc("explode")
diff --git a/scenes/ballistics/Rocket.tscn b/scenes/ballistics/Rocket.tscn
index 03e807e..4b8e05d 100644
--- a/scenes/ballistics/Rocket.tscn
+++ b/scenes/ballistics/Rocket.tscn
@@ -1,6 +1,6 @@
-[gd_scene load_steps=14 format=2]
+[gd_scene load_steps=9 format=2]
-[ext_resource path="res://work/RocketMaterial.material" type="Material" id=1]
+[ext_resource path="res://materials/RocketMaterial.material" type="Material" id=1]
[ext_resource path="res://particles/RocketTrail.tscn" type="PackedScene" id=2]
[ext_resource path="res://scenes/ballistics/Rocket.gd" type="Script" id=3]
[ext_resource path="res://sounds/explode.wav" type="AudioStream" id=4]
@@ -23,27 +23,6 @@ surfaces/0 = {
[sub_resource type="BoxShape" id=2]
extents = Vector3( 0.111378, 0.254987, 0.104516 )
-[sub_resource type="Gradient" id=6]
-offsets = PoolRealArray( 0, 0.180645, 0.554839, 1 )
-colors = PoolColorArray( 1, 0.140625, 0, 1, 1, 0.906855, 0.148387, 1, 1, 1, 1, 1, 0, 0, 0, 1 )
-
-[sub_resource type="GradientTexture" id=7]
-gradient = SubResource( 6 )
-
-[sub_resource type="Curve" id=4]
-_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.140449, 0.409091 ), 0.0, 0.0, 0, 0 ]
-
-[sub_resource type="CurveTexture" id=5]
-curve = SubResource( 4 )
-
-[sub_resource type="ParticlesMaterial" id=8]
-spread = 2.23
-gravity = Vector3( 0, 1, 0 )
-initial_velocity = 19.8
-damping = 13.78
-scale_curve = SubResource( 5 )
-color_ramp = SubResource( 7 )
-
[sub_resource type="Animation" id=3]
resource_name = "explode"
tracks/0/type = "method"
@@ -57,7 +36,7 @@ tracks/0/keys = {
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
-"method": "queue_free"
+"method": "net_remove"
} ]
}
tracks/1/type = "method"
@@ -95,8 +74,7 @@ shape = SubResource( 2 )
[node name="RocketTrail" parent="." instance=ExtResource( 2 )]
transform = Transform( -1, 8.74228e-08, 0, -8.74228e-08, -1, 0, 0, 0, 1, 0.0857886, 0, 0 )
-emitting = false
-process_material = SubResource( 8 )
+visibility_aabb = AABB( -78.3554, -22.7817, -31.4143, 156.711, 45.5634, 62.8285 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/explode = SubResource( 3 )
diff --git a/scenes/characters/PlayerAreaDetect.gd b/scenes/characters/PlayerAreaDetect.gd
new file mode 100644
index 0000000..7bcf48b
--- /dev/null
+++ b/scenes/characters/PlayerAreaDetect.gd
@@ -0,0 +1,9 @@
+extends Area
+
+func _on_AreaDetect_area_entered(area):
+ if area.name == "WaterArea":
+ get_parent().enter_water()
+
+func _on_AreaDetect_area_exited(area):
+ if area.name == "WaterArea":
+ get_parent().exit_water()
diff --git a/scenes/characters/PlayerRigid.tscn b/scenes/characters/PlayerRigid.tscn
index 54e93e8..1394258 100644
--- a/scenes/characters/PlayerRigid.tscn
+++ b/scenes/characters/PlayerRigid.tscn
@@ -1,7 +1,8 @@
-[gd_scene load_steps=8 format=2]
+[gd_scene load_steps=9 format=2]
[ext_resource path="res://scripts/characters/player_controller_new.gd" type="Script" id=1]
-[ext_resource path="res://textures/FreeMono.otf" type="DynamicFontData" id=2]
+[ext_resource path="res://theming/FreeMono.otf" type="DynamicFontData" id=2]
+[ext_resource path="res://scenes/characters/PlayerAreaDetect.gd" type="Script" id=3]
[sub_resource type="PhysicsMaterial" id=3]
friction = 2.0
@@ -22,7 +23,7 @@ outline_size = 3
use_filter = true
font_data = ExtResource( 2 )
-[node name="Player" type="RigidBody" groups=["playable", "player"]]
+[node name="Soldier" type="RigidBody" groups=["playable", "player"]]
collision_layer = 32769
collision_mask = 32769
mode = 2
@@ -56,12 +57,6 @@ cast_to = Vector3( 0, 0, -2.5 )
collision_mask = 131075
collide_with_areas = true
-[node name="LongRay" type="RayCast" parent="Head/Camera"]
-enabled = true
-cast_to = Vector3( 0, 0, -500 )
-collision_mask = 131075
-collide_with_areas = true
-
[node name="MeleeRay" type="RayCast" parent="Head/Camera"]
enabled = true
cast_to = Vector3( 0, 0, -2.5 )
@@ -109,3 +104,12 @@ path_max_distance = 1.0
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.09891, 0 )
billboard = 1
font = SubResource( 5 )
+
+[node name="AreaDetect" type="Area" parent="."]
+script = ExtResource( 3 )
+
+[node name="Collision" type="CollisionShape" parent="AreaDetect"]
+shape = SubResource( 1 )
+
+[connection signal="area_entered" from="AreaDetect" to="AreaDetect" method="_on_AreaDetect_area_entered"]
+[connection signal="area_exited" from="AreaDetect" to="AreaDetect" method="_on_AreaDetect_area_exited"]
diff --git a/scenes/environment/CaptureFlag.tscn b/scenes/environment/CaptureFlag.tscn
index 57eedf4..1347f64 100644
--- a/scenes/environment/CaptureFlag.tscn
+++ b/scenes/environment/CaptureFlag.tscn
@@ -1,7 +1,7 @@
[gd_scene load_steps=17 format=2]
[ext_resource path="res://textures/conc_slabs01_c.png" type="Texture" id=1]
-[ext_resource path="res://textures/FreeMono.otf" type="DynamicFontData" id=2]
+[ext_resource path="res://theming/FreeMono.otf" type="DynamicFontData" id=2]
[ext_resource path="res://scenes/environment/CaptureFlag.gd" type="Script" id=3]
[ext_resource path="res://sounds/capture.wav" type="AudioStream" id=4]
diff --git a/scenes/environment/Water.tscn b/scenes/environment/Water.tscn
index 3bae192..04410b1 100644
--- a/scenes/environment/Water.tscn
+++ b/scenes/environment/Water.tscn
@@ -8,7 +8,7 @@ size = Vector2( 2, 2 )
[sub_resource type="Shader" id=2]
code = "shader_type spatial;
-render_mode world_vertex_coords;
+render_mode world_vertex_coords, cull_disabled;
uniform int ShaderID = 4;
diff --git a/scenes/environment/dockscene.tscn b/scenes/environment/dockscene.tscn
index 012209d..6bf7f31 100644
--- a/scenes/environment/dockscene.tscn
+++ b/scenes/environment/dockscene.tscn
@@ -1,6 +1,6 @@
[gd_scene load_steps=6 format=2]
-[ext_resource path="res://work/Material_002.material" type="Material" id=1]
+[ext_resource path="res://materials/Material_002.material" type="Material" id=1]
[sub_resource type="ArrayMesh" id=1]
resource_name = "dockscene_Cube002"
diff --git a/scenes/environment/housescene.tscn b/scenes/environment/housescene.tscn
index 2b0c4f2..5a60d0d 100644
--- a/scenes/environment/housescene.tscn
+++ b/scenes/environment/housescene.tscn
@@ -1,6 +1,6 @@
[gd_scene load_steps=5 format=2]
-[ext_resource path="res://work/housetexture.material" type="Material" id=1]
+[ext_resource path="res://materials/housetexture.material" type="Material" id=1]
[sub_resource type="ArrayMesh" id=1]
resource_name = "housescene_Cube003"
diff --git a/scenes/environment/islandscene.tscn b/scenes/environment/islandscene.tscn
index 66da09f..6226569 100644
--- a/scenes/environment/islandscene.tscn
+++ b/scenes/environment/islandscene.tscn
@@ -1,6 +1,6 @@
[gd_scene load_steps=4 format=2]
-[ext_resource path="res://work/sandyground.material" type="Material" id=1]
+[ext_resource path="res://materials/sandyground.material" type="Material" id=1]
[sub_resource type="ArrayMesh" id=1]
resource_name = "islandscene_Icosphere"
diff --git a/scenes/weapons/rockets.gd b/scenes/weapons/rockets.gd
index e765a93..fedeebd 100644
--- a/scenes/weapons/rockets.gd
+++ b/scenes/weapons/rockets.gd
@@ -4,7 +4,7 @@ var weapon_name = "ROCKETS"
var player
onready var world = get_tree().get_root().get_node("GAMEWORLD")
-var ammo_full : int = 5
+var ammo_full : int = 50
var ammo : int
var reload_time :float= 1.0
@@ -22,19 +22,16 @@ func attack1():
if cooldown_time <= 0.0 and ammo >= 1:
ammo -= 1
cooldown_time = reload_time
- rpc("add_rocket_to_scene", -1*player.cam.global_transform.basis.z)
+ rpc("add_rocket_to_scene", -1*player.cam.global_transform.basis.z, get_tree().get_network_unique_id())
-remotesync func add_rocket_to_scene(dir):
- print(dir)
+remotesync func add_rocket_to_scene(dir, id):
var rocket = preload("res://scenes/ballistics/Rocket.tscn").instance()
world.get_node("BALLISTICS").add_child(rocket, true)
rocket.shooter = player.name + " (" + world.players_info[player.get_network_master()][0] + ")"
- #rocket.set_network_master(player.get_network_master())
- #if get_tree().get_network_unique_id() == player.get_network_master():
+ rocket.shooter_id = id
rocket.global_transform.origin = player.cam.global_transform.origin
rocket.global_transform.basis.x = dir
rocket.add_collision_exception_with(player)
-
func attack2():
pass
diff --git a/scripts/GameBase.gd b/scripts/GameBase.gd
index 019aa14..571ba84 100644
--- a/scripts/GameBase.gd
+++ b/scripts/GameBase.gd
@@ -16,6 +16,7 @@ var is_chatting = false
var winddir = Vector3(1,0,0)
func _process(delta):
+ $HUD/Health.text = str(player_char.health) if player_char != null else ""
if is_local:
local_server_tree.idle(delta)
@@ -67,6 +68,12 @@ remote func game_update_chars():
remote func game_chat_msg(msg):
$HUD.ui_chat_msg(msg)
+remotesync func game_hitsound():
+ $HUD.ui_play_hitsound()
+
+remotesync func game_killsound():
+ $HUD.ui_play_killsound()
+
func select_character(dest):
print(dest)
if player_char == null:
@@ -78,7 +85,20 @@ func client_disconnect():
if player_char != null:
player_char.deselect_character()
client.close_connection()
- get_tree().quit()
+ if is_local:
+ local_server_tree.free()
+ back_to_main()
+
+func _connection_lost():
+ if is_local:
+ local_server_tree.free()
+ back_to_main()
+
+func back_to_main():
+ var main_menu = load("res://ui/MainMenu.tscn").instance()
+ get_tree().get_root().add_child(main_menu)
+ get_tree().get_root().remove_child(self)
+ queue_free()
func join_team(team):
if player_char != null:
diff --git a/scripts/Server.gd b/scripts/Server.gd
index 531f30e..2814b7b 100644
--- a/scripts/Server.gd
+++ b/scripts/Server.gd
@@ -21,7 +21,7 @@ func _ready():
get_tree().connect("network_peer_connected", self, "_client_connect")
get_tree().connect("network_peer_disconnected", self, "_client_disconnect")
-func start_server(_server_name: String, _motd: String, max_players: int, map_path: String, ip: String, port: int, tree, output_obj, output_f):
+func start_server(_server_name: String, _motd: String, max_players: int, map_path: String, _ip: String, port: int, tree, output_obj, output_f):
output = output_obj
output_func = output_f
server_name = _server_name
@@ -92,18 +92,23 @@ func _client_change_teams(arguments):
func _client_request_change_character(arguments):
var dest = world.get_node("PLAYERS/"+arguments["char_name"])
- if dest.get_network_master() == 1:
+ if dest != null and dest.get_network_master() == 1:
print_line(connected_players[arguments["id"]][0] + " selected character " + arguments["char_name"])
- dest.rpc("set_owner", arguments["id"])
+ dest.rpc("set_net_owner", arguments["id"])
if arguments["current_char_name"] != "NULL":
var old = world.get_node("PLAYERS/"+arguments["current_char_name"])
- old.rpc("set_owner", 1)
+ old.rpc("set_net_owner", 1)
+
+func _client_request_control_vehicle(arguments):
+ var dest_machine = world.get_node("MACHINES/"+arguments["machine"])
+ if dest_machine != null and dest_machine.get_network_master() == 1 and !dest_machine.in_use:
+ pass
func _character_death(arguments):
var victim_player = connected_players[arguments["victim_mp_id"]][0] if arguments["victim_mp_id"] != 1 else ""
print_line(arguments["victim"] + " ("+victim_player+") killed by " + arguments["killer"] + " " + arguments["extra"] + ".")
world.rpc("game_chat_msg", arguments["victim"] + " ("+victim_player+") killed by " + arguments["killer"] + " " + arguments["extra"] + ".")
- world.get_node("PLAYERS/"+arguments["victim"]).rpc("remove_dead")
+ world.get_node("PLAYERS/"+arguments["victim"]).rpc("remove_dead_character")
world.rpc("game_update_chars")
func _send_chat(arguments):
diff --git a/scripts/ballistics/Cannonball.gd b/scripts/ballistics/Cannonball.gd
index 15f35a3..7b56577 100644
--- a/scripts/ballistics/Cannonball.gd
+++ b/scripts/ballistics/Cannonball.gd
@@ -9,7 +9,7 @@ func _physics_process(_delta):
add_force(-1*linear_velocity*drag_constant, Vector3.ZERO)
func get_init_info():
- return {"linear_velocity" : linear_velocity, "angular_velocity" : angular_velocity, "oldvel" : oldvel, "shooter" : shooter}
+ return {"linear_velocity" : linear_velocity, "angular_velocity" : angular_velocity, "oldvel" : oldvel, "shooter" : shooter, "shooter_id" : shooter_id}
func _on_collision(body):
if linear_velocity.length() > 20 and !damage_exceptions.has(body) and body.has_method("damage"):
diff --git a/scripts/ballistics/NetworkedProjectile.gd b/scripts/ballistics/NetworkedProjectile.gd
index 0626e9f..d9304cf 100644
--- a/scripts/ballistics/NetworkedProjectile.gd
+++ b/scripts/ballistics/NetworkedProjectile.gd
@@ -1,7 +1,7 @@
extends RigidBody
-
var shooter = "WORLD"
+var shooter_id = 1
# Called when the node enters the scene tree for the first time.
@@ -20,3 +20,10 @@ remote func update_phys_transform(t, lv, av):
func _integrate_forces(state):
if is_network_master():
rpc("update_phys_transform", transform, linear_velocity, angular_velocity)
+
+remotesync func net_remove():
+ queue_free()
+
+func net_master_remove():
+ if is_network_master():
+ rpc("net_remove")
diff --git a/scripts/boats/Gunboat.gd b/scripts/boats/Gunboat.gd
index 1e8dd49..6f4f807 100644
--- a/scripts/boats/Gunboat.gd
+++ b/scripts/boats/Gunboat.gd
@@ -85,10 +85,13 @@ func direction_input(fwd,bwd,left,right,_left,_right):
rudder = left - right
mainsheet = _left - _right
-func damage(amount, type, shooter, extra = ""):
+remotesync func damage(amount, _type, shooter, extra = ""):
health -= amount
print(health)
+remotesync func net_apply_impulse(impulse_v):
+ apply_central_impulse(impulse_v)
+
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _physics_process(delta):
$Mast/Sail.scale.y = sail_out
diff --git a/scripts/characters/player_controller_new.gd b/scripts/characters/player_controller_new.gd
index 37f8562..9c8f4ee 100644
--- a/scripts/characters/player_controller_new.gd
+++ b/scripts/characters/player_controller_new.gd
@@ -18,11 +18,14 @@ var velocity := Vector3()
var direction := Vector3()
var move_axis := Vector2()
var floorspeed := Vector3()
+var jumping = false
onready var nav = $NavigationAgent
# Walk
const FLOOR_MAX_ANGLE: float = deg2rad(46.0)
-export(float) var jump_height = 400
+export(float) var jump_height = 400.0
+var in_water : bool = false
+var swim_speed : float = 400.0
# Control
var controlling_machine = false #whether character is riding/controlling something
@@ -46,9 +49,11 @@ func _ready() -> void:
world = get_tree().get_root().get_node("GAMEWORLD")
if is_player:
cam.current = true
+
$Head/Camera/UseRay.add_exception(self)
$Head/Camera/MeleeRay.add_exception(self)
- $Head/Camera/LongRay.add_exception(self)
+ $Head/Camera/UseRay.add_exception($AreaDetect)
+ $Head/Camera/MeleeRay.add_exception($AreaDetect)
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
cam.fov = FOV
@@ -66,7 +71,6 @@ remote func set_phys_transform(trfrm, lvel):
# Called every frame. 'delta' is the elapsed time since the previous frame
func _process(_delta: float) -> void:
-
if is_player and !world.is_chatting:
if Input.is_action_just_pressed("use"):
initiate_use()
@@ -78,6 +82,7 @@ func _process(_delta: float) -> void:
machine.attack2()
machine.direction_input(Input.get_action_strength("move_forward"),Input.get_action_strength("move_backward"), Input.get_action_strength("move_right"),Input.get_action_strength("move_left"), Input.get_action_strength("alt_right"),Input.get_action_strength("alt_left"))
else:
+ jumping = Input.get_action_strength("move_jump")
if Input.is_action_just_pressed("fire"):
weapon.attack1()
move_axis.x = Input.get_action_strength("move_forward") - Input.get_action_strength("move_backward")
@@ -93,28 +98,33 @@ func initiate_use():
cam.current = true
return
if $Head/Camera/UseRay.is_colliding():
- var type = $Head/Camera/UseRay.get_collider().name
- match type:
+ var area_c = $Head/Camera/UseRay.get_collider()
+ match area_c.name:
"SteerArea":
- controlling_machine = true
- machine = $Head/Camera/UseRay.get_collider().get_parent().take_control(self)
- var gt = global_transform.origin
- velocity = Vector3.ZERO
- global_transform.origin = gt
+ world.rpc_id(1, "_call_on_server", "_client_request_control_vehicle", {"id" : world.client_id, "machine" : area_c.get_parent().name})
+ #controlling_machine = true
+ #machine = $Head/Camera/UseRay.get_collider().get_parent().take_control(self)
+ #var gt = global_transform.origin
+ #velocity = Vector3.ZERO
+ #global_transform.origin = gt
+ "LadderArea":
+ pass
_:
pass
-remotesync func set_owner(owner_id):
+remotesync func set_net_owner(owner_id):
$Nametag.text = ""
set_network_master(owner_id)
if owner_id != 1:
$Nametag.text = world.players_info[owner_id][0]
if get_tree().get_network_unique_id() != 1:
if owner_id == world.client_id:
+ $Nametag.visible = false
world.player_char = self
is_player = true
cam.current = true
else:
+ $Nametag.visible = true
cam.current = false
is_player = false
world.get_node("HUD").update_characters()
@@ -123,7 +133,7 @@ func deselect_character():
if is_network_master():
world.player_char = null
world.get_node("DEFAULTCAM").current = true
- rpc("set_owner", 1)
+ rpc("set_net_owner", 1)
func regain_control(_gt):
controlling_machine = false
@@ -131,24 +141,30 @@ func regain_control(_gt):
# Called every physics tick. 'delta' is constant
func _physics_process(delta: float) -> void:
- walk(delta)
if is_network_master():
+ if !on_floor_test() and in_water:
+ swim(delta)
+ else:
+ walk(delta)
rpc("set_phys_transform", transform, linear_velocity)
+ is_on_floor = false #reset whether is on floor in between frames
-# called by signal when character is collided with
-func on_floor_test() -> void:
+# called each physics frame
+func on_floor_test() -> bool:
if $Feet.is_colliding():
is_on_floor = true
if $Feet.get_collider().has_method("get_linear_velocity"):
floorspeed = $Feet.get_collider().get_linear_velocity()
else:
floorspeed = Vector3.ZERO
- return
+ return true
if player_state:
for i in range(player_state.get_contact_count()):
var contact_angle_from_up : float = Vector3.UP.angle_to(player_state.get_contact_local_normal(i))
if contact_angle_from_up < FLOOR_MAX_ANGLE:
is_on_floor = true
+ return true
+ return false
#modify simulated physics results
func _integrate_forces(state) -> void:
@@ -167,7 +183,6 @@ func _input(event: InputEvent) -> void:
camera_rotation()
func walk(_delta:float) -> void:
- on_floor_test()
# Input
direction = Vector3()
var aim: Basis = head.get_global_transform().basis
@@ -181,7 +196,7 @@ func walk(_delta:float) -> void:
# Jump
if is_on_floor and is_player:
- if Input.is_action_just_pressed("move_jump"):
+ if jumping:
apply_central_impulse(Vector3.UP*jump_height)
#max walk speed
@@ -202,18 +217,36 @@ func walk(_delta:float) -> void:
elif _airspeed_cap - projVel > 0:
add_central_force (mass*Vector3(direction.x*_temp_accel, 0, direction.z*_temp_accel))
- is_on_floor = false #reset whether is on floor in between frames
+func swim(_delta):
+ #drag and buoyancy
+ add_central_force(Vector3.UP*weight*1.0)
+ add_central_force(-1*linear_velocity*75)
+ #controls
+ var dir: Basis = cam.get_global_transform().basis
+ var m_dir: Vector3 = -move_axis.x * dir.z + move_axis.y * dir.x
+ m_dir = m_dir.normalized()
+ add_central_force(swim_speed*m_dir)
+ if jumping:
+ add_central_force(Vector3.UP*weight*0.5)
+
+func enter_water():
+ in_water = true
+
+func exit_water():
+ in_water = false
remotesync func damage(dmg_amt, type, shooter, extra = ""):
health -= dmg_amt
if health <= 0 and is_network_master():
+ if shooter[0] != get_network_master(): world.rpc_id(shooter[0], "game_killsound")
if get_network_master() == 1:
- world._call_on_server("_character_death", {"killer" : shooter, "victim_mp_id" : get_network_master(), "victim" : name, "extra" : extra})
+ world._call_on_server("_character_death", {"killer_id" : shooter[0], "killer" : shooter[1], "victim_mp_id" : get_network_master(), "victim" : name, "extra" : extra})
else:
- world.rpc_id(1, "_call_on_server", "_character_death", {"killer" : shooter, "victim_mp_id" : get_network_master(), "victim" : name, "extra" : extra})
-
+ world.rpc_id(1, "_call_on_server", "_character_death", {"killer_id" : shooter[0], "killer" : shooter[1], "victim_mp_id" : get_network_master(), "victim" : name, "extra" : extra})
+ elif is_network_master():
+ if shooter[0] != get_network_master(): world.rpc_id(shooter[0], "game_hitsound")
-remotesync func remove_dead():
+remotesync func remove_dead_character():
deselect_character()
queue_free()
@@ -234,3 +267,5 @@ func camera_rotation() -> void:
temp_rot.x = clamp(temp_rot.x, -90, 90)
cam.rotation_degrees = temp_rot
+remotesync func net_apply_impulse(impulse_v):
+ apply_central_impulse(impulse_v)
diff --git a/scripts/machines/Cannon.gd b/scripts/machines/Cannon.gd
index fcd842b..e7a5441 100644
--- a/scripts/machines/Cannon.gd
+++ b/scripts/machines/Cannon.gd
@@ -40,7 +40,11 @@ func _ready():
add_collision_exception_with(get_parent())
mode = RigidBody.MODE_STATIC
world = get_tree().get_root().find_node("BALLISTICS", true, false)
-
+
+remotesync func set_net_owner(id, char_name):
+ set_network_master(id)
+ if id != 1 or char_name != "NONE":
+ pass
func is_in_use():
return in_use
@@ -54,6 +58,7 @@ func take_control(controller):
func relinquish_control():
in_use = false
user = null
+ rpc("set_owner", 1, "NONE")
func _physics_process(delta):
if cooldown > 0:
diff --git a/sounds/hitsound.wav b/sounds/hitsound.wav
new file mode 100644
index 0000000..9145d00
--- /dev/null
+++ b/sounds/hitsound.wav
Binary files differ
diff --git a/sounds/hitsound.wav.import b/sounds/hitsound.wav.import
new file mode 100644
index 0000000..6fc90c5
--- /dev/null
+++ b/sounds/hitsound.wav.import
@@ -0,0 +1,23 @@
+[remap]
+
+importer="wav"
+type="AudioStreamSample"
+path="res://.import/hitsound.wav-bb4c90e5fac0abe837860e3914ab25b5.sample"
+
+[deps]
+
+source_file="res://sounds/hitsound.wav"
+dest_files=[ "res://.import/hitsound.wav-bb4c90e5fac0abe837860e3914ab25b5.sample" ]
+
+[params]
+
+force/8_bit=false
+force/mono=false
+force/max_rate=false
+force/max_rate_hz=44100
+edit/trim=false
+edit/normalize=false
+edit/loop_mode=0
+edit/loop_begin=0
+edit/loop_end=-1
+compress/mode=0
diff --git a/sounds/killsound.wav b/sounds/killsound.wav
new file mode 100644
index 0000000..c983ae3
--- /dev/null
+++ b/sounds/killsound.wav
Binary files differ
diff --git a/sounds/killsound.wav.import b/sounds/killsound.wav.import
new file mode 100644
index 0000000..ac438cd
--- /dev/null
+++ b/sounds/killsound.wav.import
@@ -0,0 +1,23 @@
+[remap]
+
+importer="wav"
+type="AudioStreamSample"
+path="res://.import/killsound.wav-63de2187a645827ded4cb280947ce0dc.sample"
+
+[deps]
+
+source_file="res://sounds/killsound.wav"
+dest_files=[ "res://.import/killsound.wav-63de2187a645827ded4cb280947ce0dc.sample" ]
+
+[params]
+
+force/8_bit=false
+force/mono=false
+force/max_rate=false
+force/max_rate_hz=44100
+edit/trim=false
+edit/normalize=false
+edit/loop_mode=0
+edit/loop_begin=0
+edit/loop_end=-1
+compress/mode=0
diff --git a/textures/FreeMono.otf b/theming/FreeMono.otf
index dc646b1..dc646b1 100644
--- a/textures/FreeMono.otf
+++ b/theming/FreeMono.otf
Binary files differ
diff --git a/theming/menu_font.tres b/theming/menu_font.tres
new file mode 100644
index 0000000..5c850e4
--- /dev/null
+++ b/theming/menu_font.tres
@@ -0,0 +1,6 @@
+[gd_resource type="DynamicFont" load_steps=2 format=2]
+
+[ext_resource path="res://theming/FreeMono.otf" type="DynamicFontData" id=1]
+
+[resource]
+font_data = ExtResource( 1 )
diff --git a/ui/HUD.gd b/ui/HUD.gd
index 4c5506b..9bbcae1 100644
--- a/ui/HUD.gd
+++ b/ui/HUD.gd
@@ -59,6 +59,12 @@ func ui_hide_chat():
if !$ChatPrompt.visible:
$Chat.visible = false
+func ui_play_hitsound():
+ $AudioCues/Hitsound.play()
+
+func ui_play_killsound():
+ $AudioCues/Killsound.play()
+
func update_characters():
for btn in character_list.get_children():
btn.queue_free()
diff --git a/ui/HUD.tscn b/ui/HUD.tscn
index 35c6cb7..5299b14 100644
--- a/ui/HUD.tscn
+++ b/ui/HUD.tscn
@@ -1,7 +1,9 @@
-[gd_scene load_steps=8 format=2]
+[gd_scene load_steps=10 format=2]
[ext_resource path="res://ui/HUD.gd" type="Script" id=1]
-[ext_resource path="res://textures/FreeMono.otf" type="DynamicFontData" id=2]
+[ext_resource path="res://theming/FreeMono.otf" type="DynamicFontData" id=2]
+[ext_resource path="res://sounds/hitsound.wav" type="AudioStream" id=3]
+[ext_resource path="res://sounds/killsound.wav" type="AudioStream" id=4]
[sub_resource type="DynamicFont" id=1]
size = 42
@@ -37,6 +39,9 @@ tracks/0/keys = {
}
[sub_resource type="DynamicFont" id=5]
+size = 22
+outline_size = 1
+outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 2 )
[node name="HUD" type="Control"]
@@ -190,15 +195,25 @@ margin_bottom = 543.0
anims/close_chat = SubResource( 4 )
[node name="Health" type="Label" parent="."]
-visible = false
anchor_left = 0.018
anchor_top = 0.954
anchor_right = 0.129
anchor_bottom = 0.972
+margin_left = -1.432
+margin_top = -8.40002
+margin_right = -1.43199
+margin_bottom = 3.79999
custom_fonts/font = SubResource( 5 )
-text = "HEALTH: "
-[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
+[node name="AudioCues" type="Node" parent="."]
+
+[node name="Hitsound" type="AudioStreamPlayer" parent="AudioCues"]
+stream = ExtResource( 3 )
+volume_db = 5.244
+
+[node name="Killsound" type="AudioStreamPlayer" parent="AudioCues"]
+stream = ExtResource( 4 )
+volume_db = 5.244
[connection signal="pressed" from="ServerJoinMenu/JoinTeam1" to="." method="ui_join_red"]
[connection signal="pressed" from="ServerJoinMenu/JoinTeam2" to="." method="ui_join_blue"]
diff --git a/ui/MainMenu.gd b/ui/MainMenu.gd
new file mode 100644
index 0000000..075789e
--- /dev/null
+++ b/ui/MainMenu.gd
@@ -0,0 +1,61 @@
+extends Node2D
+
+var client : NetworkedMultiplayerENet
+var world
+var local_server_tree = null
+
+func _ready():
+ world = preload("res://scenes/GameBase.tscn").instance()
+ #get_tree().connect("network_peer_connected", self, "_player_connected")
+ #get_tree().connect("network_peer_disconnected", self, "_player_disconnected")
+ get_tree().connect("connected_to_server", self, "_local_connection_successful")
+ get_tree().connect("connection_failed", self, "_connected_fail")
+ get_tree().connect("server_disconnected", world, "_connection_lost")
+ set_process(false)
+ set_physics_process(false)
+
+func to_host_menu():
+ var host_menu = preload("res://ui/servermenu/ServerUI.tscn").instance()
+ get_tree().get_root().add_child(host_menu)
+ queue_free()
+
+func to_join_menu():
+ var client_menu = preload("res://ui/clientmenu/ClientUI.tscn").instance()
+ get_tree().get_root().add_child(client_menu)
+ queue_free()
+
+func run_local_server():
+ local_server_tree = SceneTree.new()
+ local_server_tree.init()
+ local_server_tree.get_root().set_update_mode(Viewport.UPDATE_DISABLED)
+ var server_script = preload("res://scenes/Server.tscn").instance()
+
+ #CHANGE LEVEL HERE
+ server_script.start_server("Local Server", "Local Singleplayer Server", 3, "res://maps/Main.tscn", "127.0.0.1", 25565, local_server_tree, null, "print")
+ set_process(true)
+ set_physics_process(true)
+ client = NetworkedMultiplayerENet.new()
+ client.create_client("127.0.0.1", 25565)
+ get_tree().set_network_peer(client)
+
+func _local_connection_failed():
+ pass
+
+func _local_connection_successful():
+ get_tree().get_root().add_child(world)
+ world.client = client
+ world.client_id = get_tree().get_network_unique_id()
+ world.player_name = "Player"
+ world.is_local = true
+ world.local_server_tree = local_server_tree
+ print("Connected to local server.")
+ queue_free()
+
+func _process(delta):
+ local_server_tree.idle(delta)
+
+func _physics_process(delta):
+ local_server_tree.iteration(delta)
+
+func quit_game():
+ get_tree().quit()
diff --git a/ui/MainMenu.tscn b/ui/MainMenu.tscn
new file mode 100644
index 0000000..4cd993a
--- /dev/null
+++ b/ui/MainMenu.tscn
@@ -0,0 +1,44 @@
+[gd_scene load_steps=3 format=2]
+
+[ext_resource path="res://theming/menu_font.tres" type="DynamicFont" id=1]
+[ext_resource path="res://ui/MainMenu.gd" type="Script" id=2]
+
+[node name="MainMenu" type="Node2D"]
+script = ExtResource( 2 )
+
+[node name="HostButton" type="Button" parent="."]
+margin_left = 83.0
+margin_top = 73.0
+margin_right = 236.0
+margin_bottom = 109.0
+custom_fonts/font = ExtResource( 1 )
+text = "Host Server"
+
+[node name="JoinButton" type="Button" parent="."]
+margin_left = 84.0
+margin_top = 121.0
+margin_right = 235.0
+margin_bottom = 157.0
+custom_fonts/font = ExtResource( 1 )
+text = "Join Server"
+
+[node name="LocalButton" type="Button" parent="."]
+margin_left = 84.0
+margin_top = 168.0
+margin_right = 235.0
+margin_bottom = 204.0
+custom_fonts/font = ExtResource( 1 )
+text = "Local Server"
+
+[node name="QuitButton" type="Button" parent="."]
+margin_left = 117.0
+margin_top = 226.0
+margin_right = 192.0
+margin_bottom = 246.0
+custom_fonts/font = ExtResource( 1 )
+text = "QUIT"
+
+[connection signal="pressed" from="HostButton" to="." method="to_host_menu"]
+[connection signal="pressed" from="JoinButton" to="." method="to_join_menu"]
+[connection signal="pressed" from="LocalButton" to="." method="run_local_server"]
+[connection signal="pressed" from="QuitButton" to="." method="quit_game"]
diff --git a/scripts/ClientUI.gd b/ui/clientmenu/ClientUI.gd
index 32e7269..8b9fbcc 100644
--- a/scripts/ClientUI.gd
+++ b/ui/clientmenu/ClientUI.gd
@@ -11,7 +11,7 @@ func _ready():
#get_tree().connect("network_peer_disconnected", self, "_player_disconnected")
get_tree().connect("connected_to_server", self, "_connection_successful")
get_tree().connect("connection_failed", self, "_connected_fail")
- get_tree().connect("server_disconnected", world, "client_disconnect")
+ get_tree().connect("server_disconnected", world, "_connection_lost")
set_process(false)
set_physics_process(false)
@@ -47,6 +47,11 @@ func _run_local_server():
client.create_client("127.0.0.1", 25565)
get_tree().set_network_peer(client)
+func back_to_main():
+ var main_menu = load("res://ui/MainMenu.tscn").instance()
+ get_tree().get_root().add_child(main_menu)
+ queue_free()
+
func _process(delta):
local_server_tree.idle(delta)
diff --git a/ui/clientmenu/ClientUI.tscn b/ui/clientmenu/ClientUI.tscn
new file mode 100644
index 0000000..6df552b
--- /dev/null
+++ b/ui/clientmenu/ClientUI.tscn
@@ -0,0 +1,45 @@
+[gd_scene load_steps=2 format=2]
+
+[ext_resource path="res://ui/clientmenu/ClientUI.gd" type="Script" id=1]
+
+[node name="ClientUI" type="Node2D"]
+script = ExtResource( 1 )
+
+[node name="IP" type="LineEdit" parent="."]
+margin_left = 16.0
+margin_top = 64.0
+margin_right = 112.0
+margin_bottom = 88.0
+text = "127.0.0.1"
+
+[node name="Port" type="SpinBox" parent="."]
+margin_left = 128.0
+margin_top = 64.0
+margin_right = 202.0
+margin_bottom = 88.0
+max_value = 65536.0
+value = 25565.0
+
+[node name="Name" type="LineEdit" parent="."]
+margin_left = 16.0
+margin_top = 96.0
+margin_right = 199.0
+margin_bottom = 120.0
+text = "PlayerName"
+
+[node name="ConnectButton" type="Button" parent="."]
+margin_left = 16.0
+margin_top = 128.0
+margin_right = 202.0
+margin_bottom = 153.0
+text = "Connect"
+
+[node name="BackButton" type="Button" parent="."]
+margin_left = 16.0
+margin_top = 16.0
+margin_right = 80.0
+margin_bottom = 36.0
+text = "Back"
+
+[connection signal="pressed" from="ConnectButton" to="." method="_connect_btn"]
+[connection signal="pressed" from="BackButton" to="." method="back_to_main"]
diff --git a/scripts/CmdPrompt.gd b/ui/servermenu/CmdPrompt.gd
index 965631b..965631b 100644
--- a/scripts/CmdPrompt.gd
+++ b/ui/servermenu/CmdPrompt.gd
diff --git a/scripts/Console.gd b/ui/servermenu/Console.gd
index ac73525..ac73525 100644
--- a/scripts/Console.gd
+++ b/ui/servermenu/Console.gd
diff --git a/scripts/ServerUI.gd b/ui/servermenu/ServerUI.gd
index 8daf086..d065b21 100644
--- a/scripts/ServerUI.gd
+++ b/ui/servermenu/ServerUI.gd
@@ -36,3 +36,8 @@ func stop_server():
$CmdPrompt.server_ref = null
show_init_fields()
+
+func back_to_main():
+ var main_menu = load("res://ui/MainMenu.tscn").instance()
+ get_tree().get_root().add_child(main_menu)
+ queue_free()
diff --git a/scenes/ServerUI.tscn b/ui/servermenu/ServerUI.tscn
index 8081c81..f7ed009 100644
--- a/scenes/ServerUI.tscn
+++ b/ui/servermenu/ServerUI.tscn
@@ -1,8 +1,8 @@
[gd_scene load_steps=5 format=2]
-[ext_resource path="res://scripts/CmdPrompt.gd" type="Script" id=1]
-[ext_resource path="res://scripts/Console.gd" type="Script" id=2]
-[ext_resource path="res://scripts/ServerUI.gd" type="Script" id=4]
+[ext_resource path="res://ui/servermenu/CmdPrompt.gd" type="Script" id=1]
+[ext_resource path="res://ui/servermenu/Console.gd" type="Script" id=2]
+[ext_resource path="res://ui/servermenu/ServerUI.gd" type="Script" id=4]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.0705882, 0.0705882, 0.0705882, 1 )
@@ -11,25 +11,32 @@ bg_color = Color( 0.0705882, 0.0705882, 0.0705882, 1 )
script = ExtResource( 4 )
[node name="StartButton" type="Button" parent="." groups=["init_fields"]]
-margin_left = 18.0
-margin_top = 19.0
-margin_right = 103.0
-margin_bottom = 39.0
+margin_left = 24.0
+margin_top = 56.0
+margin_right = 109.0
+margin_bottom = 76.0
text = "Start Server"
+[node name="BackButton" type="Button" parent="." groups=["init_fields"]]
+margin_left = 24.0
+margin_top = 24.0
+margin_right = 112.0
+margin_bottom = 44.0
+text = "Back"
+
[node name="StopButton" type="Button" parent="."]
visible = false
-margin_left = 18.0
-margin_top = 55.0
-margin_right = 102.0
-margin_bottom = 75.0
+margin_left = 24.0
+margin_top = 88.0
+margin_right = 108.0
+margin_bottom = 108.0
text = "Stop Server"
[node name="MapPath" type="LineEdit" parent="." groups=["init_fields"]]
-margin_left = 117.0
-margin_top = 19.0
-margin_right = 334.0
-margin_bottom = 43.0
+margin_left = 120.0
+margin_top = 24.0
+margin_right = 337.0
+margin_bottom = 48.0
text = "res://maps/Main.tscn"
[node name="Console" type="ScrollContainer" parent="."]
@@ -59,42 +66,43 @@ script = ExtResource( 1 )
console_path = NodePath("../Console")
[node name="PlayerCount" type="SpinBox" parent="." groups=["init_fields"]]
-margin_left = 347.0
-margin_top = 19.0
-margin_right = 421.0
-margin_bottom = 43.0
+margin_left = 344.0
+margin_top = 24.0
+margin_right = 418.0
+margin_bottom = 48.0
min_value = 1.0
value = 4.0
[node name="Port" type="SpinBox" parent="." groups=["init_fields"]]
-margin_left = 260.0
-margin_top = 55.0
-margin_right = 334.0
-margin_bottom = 79.0
+margin_left = 264.0
+margin_top = 56.0
+margin_right = 338.0
+margin_bottom = 80.0
max_value = 65536.0
value = 25565.0
[node name="IP" type="LineEdit" parent="." groups=["init_fields"]]
-margin_left = 117.0
-margin_top = 55.0
-margin_right = 247.0
-margin_bottom = 79.0
+margin_left = 120.0
+margin_top = 56.0
+margin_right = 250.0
+margin_bottom = 80.0
text = "127.0.0.1"
[node name="MOTD" type="TextEdit" parent="." groups=["init_fields"]]
-margin_left = 117.0
-margin_top = 129.0
-margin_right = 334.0
-margin_bottom = 169.0
+margin_left = 120.0
+margin_top = 120.0
+margin_right = 337.0
+margin_bottom = 160.0
text = "MOTD"
[node name="ServerName" type="LineEdit" parent="." groups=["init_fields"]]
-margin_left = 117.0
-margin_top = 92.0
-margin_right = 334.0
-margin_bottom = 116.0
+margin_left = 120.0
+margin_top = 88.0
+margin_right = 337.0
+margin_bottom = 112.0
text = "Server Name"
[connection signal="pressed" from="StartButton" to="." method="start_server"]
+[connection signal="pressed" from="BackButton" to="." method="back_to_main"]
[connection signal="pressed" from="StopButton" to="." method="stop_server"]
[connection signal="text_entered" from="CmdPrompt" to="CmdPrompt" method="enter_cmd"]
diff --git a/work/Material_002.material b/work/Material_002.material
deleted file mode 100644
index 5ccadff..0000000
--- a/work/Material_002.material
+++ /dev/null
Binary files differ
diff --git a/work/RocketMaterial.material b/work/RocketMaterial.material
deleted file mode 100644
index 845a0ae..0000000
--- a/work/RocketMaterial.material
+++ /dev/null
Binary files differ
diff --git a/work/progress_chart.ods b/work/progress_chart.ods
index cc5572d..f14a4b3 100644
--- a/work/progress_chart.ods
+++ b/work/progress_chart.ods
Binary files differ