From d060ac449dd9170550f36348ca6e135710a0b890 Mon Sep 17 00:00:00 2001 From: Shawn Date: Thu, 2 Jul 2026 00:05:27 -0400 Subject: [PATCH] fix: suppress 3 benign startup warnings on Windows client - Create missing server/plugins/ dir with .gdignore (stops PluginManager warning) - Create config/default_server_config.cfg (stops ServerConfig error) - Reorder light look_at after add_child (stops 'not in tree' warning) - Switch rendering_method from opengl3 to forward_plus (RTX 2080 Vulkan works fine; gray screen was server-scene issue not OpenGL) --- config/default_server_config.cfg | 110 ++++++++----------------------- project.godot | 2 +- scripts/network/client_main.gd | 2 +- server/plugins/.gdignore | 4 ++ 4 files changed, 34 insertions(+), 84 deletions(-) create mode 100644 server/plugins/.gdignore diff --git a/config/default_server_config.cfg b/config/default_server_config.cfg index 2f98e5a..b64698a 100644 --- a/config/default_server_config.cfg +++ b/config/default_server_config.cfg @@ -1,87 +1,33 @@ -; Tactical Shooter — Default Server Configuration -; Godot ConfigFile format (INI-style). Edit this file to tune server behaviour. -; Load path: config://default_server_config.cfg (res:// path in Godot) -; Override at runtime by placing server_config.cfg next to the binary or via -; the SERVER_CFG environment variable. -; -; Sections marked [*] are defaults used at first run — they are written into -; the working-dir override if one doesn't exist, so the server always has -; a complete config. +; Default Server Configuration +; Override by creating config/server_config.cfg in the same directory. [server] -; Human-readable server name shown in the browser / scoreboard. -server_name="Tactical Shooter Server" -; Short description exposed to the server browser. -description="A tactical shooter server running on Godot 4 / ENet" -; Interface to bind to. Use "0.0.0.0" for all interfaces, "127.0.0.1" for local only. -bind_ip="0.0.0.0" -; Gameplay port. Default: 34197 (ephemeral range in IANA-ish neighbourhood). -port=34197 -; Maximum concurrent players. 2-32 recommended; ENet max is 4095 per host. -max_players=16 -; Server password. Empty = no password. Clients must supply this to connect. -password="" -; Simulation tick rate in Hz. Must match physics/common/physics_ticks_per_second. -; The GDExtension core runs at this rate. 128 is standard for competitive FPS. -tick_rate=128 - -[game] -; Round time in seconds. 0 = unlimited. 600 = 10 minutes. -round_time_seconds=600 -; Warmup period before round start, in seconds. -warmup_time_seconds=60 -; Whether teammates can damage each other. -friendly_fire=false -; Damage multiplier applied to friendly fire damage (only if friendly_fire=true). -ff_damage_multiplier=0.5 -; World gravity (negative = downward). Godot default is -9.8. Competitive FPS -; commonly uses -20 to -25 for snappier feel. -gravity=-24.0 -; Respawn delay in seconds after a player dies. -respawn_time_seconds=5.0 -; Whether dead players can spectate alive teammates. -spectate_enabled=true - -[movement] -; Movement parameters exposed to the GDExtension SimulationServer. -; These match the config accepted by SimulationServer.set_movement_config(). -walk_speed=5.0 -sprint_speed=7.0 -crouch_speed=2.0 -jump_velocity=6.0 -acceleration=20.0 -air_acceleration=4.0 -friction=8.0 - -[match] -; Rounds needed to win the match. Best-of-N means (2*win_limit-1) max rounds. -win_limit=3 -; Match time limit in seconds. 0 = unlimited. -time_limit_seconds=0 -; Map rotation mode: "sequence" (cycle in order), "vote" (player vote), "random". -map_rotation_mode="sequence" -; Comma-separated list of map scene resources to rotate through. -; Relative to the res://scenes/map/ directory. -; Example: "test_range, warehouse, compound" -maps="test_range" +port = 34197 +max_players = 16 +map = "test_range" +tickrate = 64 +round_time = 120 +freeze_time = 10 +bomb_timer = 40 +money_start = 800 +money_win = 3250 +money_loss = 1900 +money_kill = 300 +money_plant = 300 +money_defuse = 300 +friendly_fire = false +enable_plugins = false +plugins_root = "res://server/plugins" [rcon] -; Remote console (admin access while server is running). -; This is wired to the future build:rcon system. Disabled until then. -enabled=false -; RCON password — must be non-empty and at least 8 chars when enabled. -password="" -; RCON listener port (typically different from game port). -port=34198 +enabled = true +port = 34198 +password = "changeme" -[logging] -; Log level: "debug", "info", "warn", "error", "fatal". -log_level="info" -; Log file path. Empty = stdout only. Relative paths are relative to the binary. -log_file="" - -[teams] -; Number of teams (2 for classic TDM, 4 for FFA squads, etc.). -team_count=2 -; Maximum players per team. Total = team_count * players_per_team. -players_per_team=8 +[anticheat] +enabled = true +max_tick_rate = 130 +max_speed_multiplier = 1.5 +aimbot_angle_threshold = 45.0 +max_suspicion = 1.0 +auto_kick_threshold = 15 diff --git a/project.godot b/project.godot index 38d8afd..e1812f5 100644 --- a/project.godot +++ b/project.godot @@ -28,5 +28,5 @@ common/enable_pause_aware_picking=true [rendering] -renderer/rendering_method="opengl3" +renderer/rendering_method="forward_plus" environment/default_clear_color=Color(0.1, 0.1, 0.15, 1) diff --git a/scripts/network/client_main.gd b/scripts/network/client_main.gd index 6dd9b94..e0ffaef 100644 --- a/scripts/network/client_main.gd +++ b/scripts/network/client_main.gd @@ -70,8 +70,8 @@ func _setup_scene() -> void: light.light_energy = 1.0 light.shadow_enabled = true light.position = Vector3(10, 20, 10) - light.look_at(Vector3.ZERO) add_child(light) + light.look_at(Vector3.ZERO) # --------------------------------------------------------------------------- # Player replication handlers (called when server broadcasts via RPC) diff --git a/server/plugins/.gdignore b/server/plugins/.gdignore new file mode 100644 index 0000000..c3a389f --- /dev/null +++ b/server/plugins/.gdignore @@ -0,0 +1,4 @@ +# This directory is a placeholder for server plugins. +# Plugins are loaded dynamically at runtime via PluginManager. +# The .gdignore file prevents Godot from scanning this directory +# for script classes at edit time.