Integrate Kenney Starter Kit FPS assets + comprehensive test suite

Assets (CC0 license):
- 3D models: Blaster gun, walls, platforms, grass, clouds, enemy
- Sounds: blaster fire, impacts, footsteps, jumps, weapon change
- Sprites: crosshair, hit marker, muzzle flash, skybox, blob shadow
- Font: Lilita One

Code changes:
- weapon_manager.gd: load blaster.glb as gun model (replaces box mesh)
- player.tscn: use Kenney sounds (blaster.ogg, enemy_hurt/destroy) and crosshair

Test suite (100 unit tests + 4 integration scenarios):
- weapon_data.gd: 27 tests — all 6 weapons every stat verified
- economy.gd: 19 tests — constants, loss streak, buy thresholds
- bomb.gd: 15 tests — state machine, timing constants
- round_manager.gd: 10 tests — win conditions, elimination logic
- team_manager.gd: 8 tests — auto-balance, team assignment
- headless_test_bot.gd: integration bot with movement/idle/rounds scenarios
- run_multi_bot.sh: multi-client launcher
This commit is contained in:
2026-07-03 17:13:36 -04:00
parent 597d6dde2d
commit 012d038025
176 changed files with 4653 additions and 19 deletions
+35
View File
@@ -0,0 +1,35 @@
extends Node
# Code adapted from KidsCanCode
var num_players = 12
var bus = "master"
var available = [] # The available players.
var queue = [] # The queue of sounds to play.
func _ready():
for i in num_players:
var p = AudioStreamPlayer.new()
add_child(p)
available.append(p)
p.volume_db = -10
p.finished.connect(_on_stream_finished.bind(p))
p.bus = bus
func _on_stream_finished(stream):
available.append(stream)
func play(sound_path): # Path (or multiple, separated by commas)
var sounds = sound_path.split(",")
queue.append("res://" + sounds[randi() % sounds.size()].strip_edges())
func _process(_delta):
if not queue.is_empty() and not available.is_empty():
available[0].stream = load(queue.pop_front())
available[0].play()
available[0].pitch_scale = randf_range(0.9, 1.1)
available.pop_front()
+1
View File
@@ -0,0 +1 @@
uid://d2fg3ewfjx4u4
+5
View File
@@ -0,0 +1,5 @@
extends CanvasLayer
func _on_health_updated(health):
$Health.text = str(health) + "%"
+1
View File
@@ -0,0 +1 @@
uid://by0qn28x1i1jj
+25
View File
@@ -0,0 +1,25 @@
extends Resource
class_name Weapon
@export_subgroup("Model")
@export var model: PackedScene # Model of the weapon
@export var position: Vector3 # On-screen position
@export var rotation: Vector3 # On-screen rotation
@export var muzzle_position: Vector3 # On-screen position of muzzle flash
@export_subgroup("Properties")
@export_range(0.1, 1) var cooldown: float = 0.1 # Firerate
@export_range(1, 20) var max_distance: int = 10 # Fire distance
@export_range(0, 100) var damage: float = 25 # Damage per hit
@export_range(0, 5) var spread: float = 0 # Spread of each shot
@export_range(1, 5) var shot_count: int = 1 # Amount of shots
@export_range(0, 50) var knockback: int = 20 # Amount of knockback
@export var min_knockback: Vector2 = Vector2(0.001, 0.001) # x for vertical knockback, y for horizontal knockback
@export var max_knockback: Vector2 = Vector2(0.0025, 0.002) # x for vertical knockback, y for horizontal knockback
@export_subgroup("Sounds")
@export var sound_shoot: String # Sound path
@export_subgroup("Crosshair")
@export var crosshair: Texture2D # Image of crosshair on-screen
+1
View File
@@ -0,0 +1 @@
uid://dg01pkkc1c5vd