feat: integrate ChaffGames FPS template as local player controller

Replaces the overhead box-mesh view with a full FPS character:

- mouse look, WASD movement, jump (Space), crouch (C), sprint (Shift), lean (Q/E)

- 6 weapons (LMB shoot, R reload, scroll switch, F melee, G drop)

- Crosshair HUD, ammo counter, sprint bar

- Client sends position to server at 20Hz for multiplayer visibility

- Server broadcasts positions to all peers

- Remote players shown as boxes (placeholder)

source: https://godotengine.org/asset-library/asset/2652 (MIT license)
This commit is contained in:
2026-07-02 00:26:45 -04:00
parent f0c95dcfd2
commit ad48f38ca5
70 changed files with 5297 additions and 52 deletions
@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dc48o4niy1mok"]
[ext_resource type="Script" uid="uid://b26eegme16mfw" path="res://client/template/scripts/Projectiles/Projectile.gd" id="1_epqi3"]
[node name="Projectile" type="Node3D"]
script = ExtResource("1_epqi3")
@@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://bpxa3je174q43"]
[ext_resource type="Script" uid="uid://b26eegme16mfw" path="res://client/template/scripts/Projectiles/Projectile.gd" id="1_won33"]
[ext_resource type="PackedScene" uid="uid://dxlkgbr1p580" path="res://client/template/Spawnable_Objects/bullet.tscn" id="2_sq5da"]
[node name="Projectile" type="Node3D"]
script = ExtResource("1_won33")
Projectile_Type = "Rigidbody_Projectile"
Projectile_Velocity = 20
Rigid_Body_Projectile = ExtResource("2_sq5da")
Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

@@ -0,0 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://6rfh1ejt4m6m"]
[ext_resource type="Script" uid="uid://bfn8eu00l4btq" path="res://client/template/scripts/Projectiles/melee_weapon_projectile.gd" id="1_qlmbe"]
[sub_resource type="BoxShape3D" id="BoxShape3D_q86ac"]
[node name="MeleeProjectile" type="Node3D"]
script = ExtResource("1_qlmbe")
Projectile_Type = "over_ride"
[node name="MeleeHitbox" type="ShapeCast3D" parent="."]
shape = SubResource("BoxShape3D_q86ac")
target_position = Vector3(0, 0, -1)
collision_mask = 37
@@ -0,0 +1,22 @@
[gd_scene load_steps=4 format=3 uid="uid://ddfiivxgnakti"]
[ext_resource type="Script" uid="uid://biivm72fp7af8" path="res://client/template/scripts/Projectiles/rocket_launcher_projectile.gd" id="1_dkmt1"]
[ext_resource type="PackedScene" uid="uid://cqhlfy6ccomm3" path="res://client/template/Spawnable_Objects/rocket.tscn" id="2_u24w0"]
[sub_resource type="SphereShape3D" id="SphereShape3D_wqjlt"]
radius = 5.0
[node name="Projectile" type="Node3D" node_paths=PackedStringArray("explosion")]
script = ExtResource("1_dkmt1")
explosion = NodePath("ExplosionRadias")
Projectile_Type = "Rigidbody_Projectile"
Projectile_Velocity = 20
Expirey_Time = 20
Rigid_Body_Projectile = ExtResource("2_u24w0")
pass_through = true
[node name="ExplosionRadias" type="ShapeCast3D" parent="."]
top_level = true
shape = SubResource("SphereShape3D_wqjlt")
target_position = Vector3(0, 0, 0)
collision_mask = 37
@@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://brvfyahytwd8m"]
[ext_resource type="Script" uid="uid://dnh4a4vkl0cl1" path="res://client/template/scripts/Projectiles/shotgun_projectile.gd" id="1_idx2q"]
[sub_resource type="Curve2D" id="Curve2D_2lhxk"]
_data = {
"points": PackedVector2Array(0, 0, 0, 0, 7, 3, 0, 0, 0, 0, -30, -11, 0, 0, 0, 0, -8, -18, 0, 0, 0, 0, 8, -9, -2.50282, -11.0124, 2.50282, 11.0124, 19, 13, 0, 0, 0, 0, -21, 1, 0, 0, 0, 0, 22, 22, 0, 0, 0, 0, 12, 21, 0, 0, 0, 0, -33, 4)
}
point_count = 9
[node name="shotgun_projectile" type="Node3D"]
script = ExtResource("1_idx2q")
Randomness = 2.941
Split_Damage = true
[node name="shotgun_pattern" type="Path2D" parent="."]
curve = SubResource("Curve2D_2lhxk")