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>
This commit is contained in:
2026-07-02 20:55:20 -04:00
parent ce39b237c3
commit b0c83af092
4416 changed files with 57418 additions and 902676 deletions
Executable
+119
View File
@@ -0,0 +1,119 @@
#!/bin/bash
BOLD="$(tput bold)"
NC="$(tput sgr0)"
ROOT="$(pwd)"
BUILD="$ROOT/build"
TMP="$ROOT/buildtmp"
declare -a OFF_FILES=(
"addons/netfox.extras/physics/godot_driver_2d.gd"
"addons/netfox.extras/physics/godot_driver_2d.gd.uid"
"addons/netfox.extras/physics/godot_driver_3d.gd"
"addons/netfox.extras/physics/godot_driver_3d.gd.uid"
"addons/netfox.extras/physics/rapier_driver_2d.gd"
"addons/netfox.extras/physics/rapier_driver_2d.gd.uid"
"addons/netfox.extras/physics/rapier_driver_3d.gd"
"addons/netfox.extras/physics/rapier_driver_3d.gd.uid"
)
# Assume we're running from project root
source sh/shared.sh
# Grab commit history
print $BOLD"Unshallowing commit history"$NC
git fetch --unshallow --filter=tree:0
print $BOLD"Building netfox v${version}" $NC
print "Directories"
print "Root: $ROOT"
print "Build: $BUILD"
print "Temp: $TMP"
rm -rf "$BUILD"
mkdir -p "$BUILD"
rm -rf "$TMP"
# Disable scripts
print "::group::Disabling optional scripts"
has_missing_offs="false"
for file in "${OFF_FILES[@]}"; do
has_source=$(test -f "$file" && echo "true" || echo "false")
has_off=$(test -f "$file.off" && echo "true" || echo "false")
if [[ $has_source == "false" && $has_off == "false" ]]; then
print "::error::Registered optional script doesn't exist: $file"
has_missing_offs="true"
fi
if [[ $has_source == "true" ]]; then
mv "$file" "$file.off"
print "Disabled optional script: $file"
fi
done
if [[ $has_missing_offs == "true" ]]; then
print "::error::Found missing optional scripts!"
print "::endgroup::"
exit 1;
fi;
print "::endgroup::"
# Bundle addons
for addon in ${addons[@]}; do
print "::group::Packing addon ${addon}"
addon_tmp="$TMP/${addon}.v${version}/addons"
addon_src="$ROOT/addons/${addon}"
addon_dst="$BUILD/${addon}.v${version}"
mkdir -p "${addon_tmp}"
cd "$TMP"
cp -r "${addon_src}" "${addon_tmp}"
"$ROOT/sh/contributors.sh" > "${addon_tmp}/${addon}/CONTRIBUTORS.md"
has_deps="false"
for dep in ${addon_deps[$addon]}; do
print "Adding dependency $dep"
cp -r "$ROOT/addons/${dep}" "${addon_tmp}"
"$ROOT/sh/contributors.sh" > "${addon_tmp}/${dep}/CONTRIBUTORS.md"
has_deps="true"
done
if [ $has_deps = "true" ]; then
zip -r "${addon_dst}.zip" "${addon}.v${version}"
fi
cd "$ROOT"
rm -rf "$TMP"
print "::endgroup::"
done
# Build example game
print $BOLD"Building Forest Brawl" $NC
mkdir -p build/linux
mkdir -p build/win64
print "Building with Linux/X11 preset"
godot --headless --export-release "Linux/X11" "build/linux/forest-brawl.x86_64"
zip -j "build/forest-brawl.v${version}.linux.zip" build/linux/*
print "Building with Windows preset"
godot --headless --export-release "Windows Desktop" "build/win64/forest-brawl.exe"
zip -j "build/forest-brawl.v${version}.win64.zip" build/win64/*
# Build docs
print $BOLD"Building docs" $NC
mkdocs build --no-directory-urls
cd site
zip -r "../build/netfox.docs.v${version}.zip" ./*
cd ..
rm -rf site
# Cleanup
print $BOLD"Cleaning up" $NC
rm -rf build/win64 build/linux
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
# Assume we're running from project root
source sh/shared.sh
# Check Godot version
if ! godot --version | grep ^4.4; then
print "Wrong Godot version!"
godot --version
exit 1;
fi
print "::group::Import project"
godot --headless --import .
print "::endgroup::"
UNTRACKED_FILES="$(git ls-files --others --exclude-standard)"
if [[ "$UNTRACKED_FILES" ]]; then
print "Missing UIDs detected!"
echo "$UNTRACKED_FILES"
exit 1
else
print "All UIDs are present!"
fi
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
# Outputs a contributors' notice
echo """# Contributors
This addon, and the entirety of [netfox] is a shared effort of [Fox's Sake
Studio], and the community. The following is the list of community contributors
involved with netfox:
"""
git log --pretty="* %an <%ae>%n* %cn <%ce>" | sort -u \
| grep -v "Tamás Gálffy" \
| grep -v "<noreply.github.com>" \
| grep -v "<ci@foxssake.studio>"
echo """
[netfox]: https://github.com/foxssake/netfox
[Fox's Sake Studio]: https://github.com/foxssake/
"""
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
# DEV="$(ifconfig | head -n 1 | cut -f1 -d':')"
DEV="lo"
delay=$1
jitter=$2
if [ $# -eq 0 ]; then
echo "Usage: $0 <latency> [jitter]"
exit 1
fi
if [ "$1" == "reset" ]; then
tc qdisc del dev $DEV root
exit $?
fi
tc qdisc del dev $DEV root
tc qdisc add dev $DEV root netem delay $delay $jitter
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
# Assume we're running from project root
source sh/shared.sh
# Grab commit history
print $BOLD"Unshallowing commit history"$NC
git fetch --unshallow --filter=tree:0
# Figure out version
TAG="$(git tag --points-at HEAD)"
REF="$(git rev-parse --abbrev-ref HEAD)"
SHA="$(git rev-parse --short HEAD)"
VERSION="$SHA"
if [ "$REF" == "main" ]; then
VERSION="latest";
elif [ "$TAG" != "" ]; then
VERSION="$TAG";
fi;
# Push version
print -e "Pushing version $BOLD$VERSION$NC"
mike deploy --push "$VERSION"
+19
View File
@@ -0,0 +1,19 @@
source sh/shared.sh
if ! which java > /dev/null; then
print "Java not found!"
exit 1;
fi;
java -version
print "Downloading plantuml"
curl -LO https://github.com/plantuml/plantuml/releases/download/v1.2025.4/plantuml-mit-1.2025.4.jar
print "Starting server"
java -jar ./plantuml-mit-1.2025.4.jar -picoweb:8080:127.0.0.1 &
if [ $? -ne 0 ]; then
print "Server failed!"
else
print "Server PID:" $!
fi
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
# Formatting
# See: https://github.com/chalk/ansi-styles/blob/main/index.js
NC="\033[0m";
BOLD="\033[1m";
print() {
echo -e $@
}
# Version and addon data for build
version="$(grep "version=" addons/netfox/plugin.cfg | cut -d"\"" -f2)"
addons=("netfox" "netfox.internals" "netfox.noray" "netfox.extras")
declare -A addon_deps=(\
["netfox"]="netfox.internals"
["netfox.noray"]="netfox.internals"
["netfox.extras"]="netfox.internals netfox"
)
# git config
if [[ "$(git config user.name)" == "" ]]; then
print "Configuring git user"
git config user.name "Fox's Sake CI"
git config user.email "ci@foxssake.studio"
fi;
Executable
+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
source sh/shared.sh
VEST_LOG="vest.log"
# Run tests
# NOTE: Must be ran with 4.2+, so the --import flag is available
# Otherwise, Godot won't import scripts properly
print "::group::Import project"
godot --headless --import .
print "::endgroup::"
print "::group::Run vest"
godot --headless -s "addons/vest/cli/vest-cli.gd" \
--vest-glob "res://test/*.test.gd" \
--vest-report-format tap --vest-report-file "$VEST_LOG"
print "::endgroup::"
# Check results
if [ ! -f "$VEST_LOG" ]; then
echo "::error::No test logs!"
exit 1
fi
echo "::group::Test report"
cat "$VEST_LOG"
echo ""
echo "::endgroup::"
if grep "not ok" "$VEST_LOG"; then
echo "::error::There are failing test(s)!"
exit 1
else
print "Success!"
fi
Executable
+46
View File
@@ -0,0 +1,46 @@
#!/bin/bash
# Assume we're running from project root
source sh/shared.sh
version_major="$(echo ${version} | cut -f1 -d.)"
version_minor="$(echo ${version} | cut -f2 -d.)"
version_patch="$(echo ${version} | cut -f3 -d.)"
version="$version_major.$version_minor.$version_patch"
persist="false"
if (( $# == 0 )); then
echo $version
exit 0
fi
if [ $1 == "bump" ]; then
if [ "$2" = "major" ]; then
version_major=$((version_major + 1));
version_minor=0;
version_patch=0;
elif [ "$2" = "minor" ]; then
version_minor=$((version_minor + 1));
version_patch=0;
elif [ "$2" = "patch" ]; then
version_patch=$((version_patch + 1));
else
>&2 echo "Unknown version part: $2"
exit 1
fi
version="$version_major.$version_minor.$version_patch"
persist="true"
elif [ $1 == "envvar" ]; then
echo "VERSION=v$version"
exit 0
fi
if [ "$persist" = "true" ]; then
for addon in "${addons[@]}"; do
sed -i "s/version=.*/version=\"$version\"/g" "addons/$addon/plugin.cfg"
done
fi
echo "$version"