14 Commits

Author SHA1 Message Date
shawn 91b878f347 Quaternius weapons, input fixes, sound & path fixes
- Added 6 Quaternius weapon models (Pistol, Revolver, Rifle, Shotgun, P90, SniperRifle)
- Created weapon resource files with balanced stats
- Wired Pistol + Rifle into player.tscn replacing Kenney blasters
- Fixed WASD input (matched input map action names)
- Fixed Escape key toggles mouse capture
- Added Audio autoload singleton
- Fixed broken sound asset paths across all scripts
- Fixed all scene ext_resource text paths (nested under assets/kenney-fps/)
- Fixed all .import source_file paths
- Deleted stale .import files (will be regenerated by editor on open)
2026-07-05 22:53:27 -04:00
shawn 695e4db5cd Add input debug to window title for diagnostic
Shows Input.get_axis() values, weapon slot states, and fire
state in the window title bar — visible even when print()
output is lost on Windows GUI exports.
2026-07-03 23:13:42 -04:00
shawn c5b6b05801 Fix keyboard input: use OS.move_to_foreground() for window focus
get_window().grab_focus() was insufficient on Windows GUI exports.
Replaced with OS.move_to_foreground() + Input.set_mouse_mode(CAPTURED)
+ deferred retries to ensure the game window holds keyboard focus
after the connection UI is dismissed.
2026-07-03 22:34:50 -04:00
shawn 7db8434f7e Fix duplicate _rollback_tick causing WeaponManager compile error
A debug-print attempt from earlier inadvertently appended a second
_rollback_tick function (with spaces instead of tabs) at the end of
weapon_manager.gd:419, causing the entire script to fail compilation.
This meant the WeaponManager node had NO script attached:
- 'has_method("set_default_loadout")' returned false
- Client-side loadout init never ran
- All weapon operations silently did nothing

This is the real root cause of why weapons never worked on the client.
2026-07-03 20:07:40 -04:00
shawn 7bbe4ba71d Fix weapons not working on client: remove is_predicting check + init loadout
- Removed the is_predicting() early-return in weapon_manager._rollback_tick
  which blocked all weapon actions on the client (player owned by server)
- Added client-side weapon loadout initialization in player-spawner._spawn
  so the player has weapons immediately, before server state sync arrives
- Server reconciles via rollback state sync

Movement was fixed in v0.2.2 (window focus grab). This addresses
the remaining 'can't switch or use weapons' issue.
2026-07-03 18:24:21 -04:00
shawn 1ccd26bbab Fix keyboard input not working on Windows client
Added explicit window focus grab after connecting (lan-bootstrapper.gd)
so keyboard input is properly received by the input system.
Also added diagnostic debug prints to trace input pipeline.
2026-07-03 17:48:33 -04:00
shawn 9901f6a34d Fix blaster GLB root type error (Node3D, not MeshInstance3D)
- Changed _gun_model type from MeshInstance3D to Node3D
  (all imported GLB/GLTF weapon models have Node3D root)
- Added check_models.gd diagnostic script

The type mismatch at WeaponManager._load_weapon_models:73
was the only script error in the user's game.log.
Headless bot tests confirm movement still works fine.
2026-07-03 17:32:18 -04:00
shawn 012d038025 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
2026-07-03 17:13:36 -04:00
shawn 597d6dde2d Fix server clock reset in NetworkTimeSynchronizer and client-side peer 1 avatar duplicate
- Move _clock.set_time(0.) inside the 'if not server' block in
  NetworkTimeSynchronizer.start() so the server's SystemClock isn't
  reset to zero — fixes -1.78 billion second offset panic on client
- Skip spawning peer 1's avatar on clients (the server replicates
  all avatars; spawning peer 1 locally creates a duplicate that
  the dedicated server doesn't have)
2026-07-03 16:21:35 -04:00
shawn aad186552c Bake dev server IP (192.168.0.127:34197) as default in network popup 2026-07-03 16:11:23 -04:00
shawn fc2c0236cb Fix dedicated server: delay netfox tick loop until first client connects, keep full scene tree for identity sync 2026-07-03 14:47:00 -04:00
shawn 00bb8a21d2 Fix bootstrapper parse error in exports — remove forest-brawl type dependency
lan-bootstrapper.gd and noray-bootstrapper.gd both had a host_only()
function that referenced BrawlerSpawner (class_name from forest-brawl).
Since examples/forest-brawl/ is excluded from exports, the type was
undefined, causing the entire script to fail loading with:
  'Could not find type BrawlerSpawner in current scope'

This meant the Join and Host button signal handlers never existed,
so clicking them did nothing — no error shown, no connection, no UI change.

Fix: remove the unused host_only() function from both bootstrapper files.
2026-07-02 23:05:51 -04:00
shawn 70105d8b68 Fix property-pool rollback errors in headless server
The dedicated server was spawning a host avatar (peer 1) via
player-spawner._handle_host() and _handle_new_peer(1) on startup,
which registered RollbackSynchronizer subjects with the netfox
rollback system. Since no client input exists for peer 1, the
rollback system tried to record state for freed/recycled objects,
flooding the log with property-pool.gd errors.

Fix:
- Add spawn_host_avatar @export flag to player-spawner.gd
- Set it false in headless_server.gd before starting the ENet server
- PlayerSpawner._handle_host() skips avatar spawn when flag is false
- PlayerSpawner._handle_new_peer(1) skips avatar spawn when flag is false

Server startup is now clean: no property-pool errors, no RPC path errors.
2026-07-02 22:34:32 -04:00
shawn b0c83af092 Fresh start: replace with naxIO/netfox-cs-sample foundation
Complete replacement of the tactical-shooter project with the
netfox-cs-sample (MIT) — a CS 1.6 inspired multiplayer FPS built
with Godot 4 and netfox.

## What's new
- Full CS-style gameplay: teams (T/CT), rounds, economy, buy menu
- 6 weapons: Knife, Glock, USP, AK-47, M4A1, AWP
- Bomb plant/defuse with 2 bombsites
- Flashbang & smoke grenades
- Proper netfox rollback netcode at 64 tick
- Network popup UI for host/join
- HUD, crosshair, round timer, scoreboard
- All netfox singletons registered as autoloads (works in exported builds)

## Architecture
- Listen-server (host from client, no dedicated server binary)
- Multiplayer-fps game lives at examples/multiplayer-fps/
- Netfox addons registered as autoloads for exported build compat
- Godot 4.7 with Forward+ renderer

## Removed
- Old headless-server architecture (client_main, server_main, player.gd, etc.)
- Custom netfox bootstrap with ENet fallback
- Old ChaffGames FPS template (2,420 lines, 844 KB)
- SimulationServer GDExtension stub
- Godot-jolt physics (netfox sample uses default Godot physics)
- Duplicate weapon_data.gd, anti_cheat.gd, round_manager.gd, etc.
- Server browser API Python venv (87 MB)
- test_range map and modular assets

## Preserved
- Git history
- Server config at config/default_server_config.cfg
- Windows export preset
- Build directory (gitignored)

Co-authored-by: naxIO <naxIO@users.noreply.github.com>
2026-07-02 20:55:20 -04:00