Curated roster: 34 classic-Robocode archives were downloaded, measured in real
Tank Royale battles and curated to 28 usable bots, now in legacy_bots/<Name>/
(<Name>.jar + <Name>.json + <Name>.sh) with checksums in MANIFEST.sha256.
Six were dropped as NOT_USEFUL and deleted from tr_bots/_salvage/legacy_bots/
and tr_bots/_salvage/tr_wrappers/, with the rationale recorded in
legacy_bots/README.md and tools/robocode_shim/LEGACY_BOTS.md:
- Nene, Seraphim - Azuma-framework melee bots, completely inert (0 scans,
0 shots); getRobotRunnable() returns null so the shim has
no driver path for them.
- Aurora - fires 6 shots and crawls.
- FloodMini, LightningBug, Aristocles - near-stationary turrets: they scan and
fire but land 0 hits and take 10+ hits every round.
DrussGT is the reference bot and is deliberately NOT in legacy_bots/: it lives in
tr_bots/DrussGT and is now vendored with its sources under
tools/robocode_shim/vendor/drussgt/.
Repo-relative paths replace /tmp: every <Name>.sh resolves the shim and the
vendor jars via $REPO (../..), and none hardcodes a server URL, a /tmp data
path, or anything under ~/Downloads. SERVER_URL/SERVER_SECRET come from the
environment, which the booter populates from its own -Dserver.url /
-Dsystem.secret system properties.
Booter: tools/booter/robocode-tankroyale-booter-0.35.5-all.jar, copied from a
local tank-royale build, plus a README covering the real CLI. Note the command
is `boot`; the upstream README's `run` is stale. Verified it discovers all 28
kept bots via both `dir` and `info`.
Licensing: every third-party jar here reads "not stated in jar", and DrussGT is
GPL. The repo owner has explicitly waived this - the repository is PRIVATE and
lives on their own LAN. Do not mirror or redistribute without revisiting that.
.gitignore flipped back to tracking legacy_bots/**/*.jar; an over-broad *.jar
rule already cost us the only copy of DrussGT.jar once.
49 lines
1.9 KiB
Bash
Executable File
49 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build the Approach-(B) shim.
|
|
#
|
|
# Requires JAVA_HOME/javac on PATH, the genuine Robocode 1.9.5.5 jar (for the
|
|
# robocode.* API the peer implements) and the Tank Royale Java bot API jar (for
|
|
# DrussGTBridge / TrBattleCapture).
|
|
#
|
|
# ROBOCODE_JAR=/path/to/robocode.jar TR_BOT_API_JAR=/path/to/bot-api.jar ./build.sh
|
|
set -euo pipefail
|
|
|
|
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
ROBOCODE_JAR="${ROBOCODE_JAR:-$HERE/vendor/robocode.jar}"
|
|
TR_BOT_API_JAR="${TR_BOT_API_JAR:-$HOME/Downloads/sample-bots-java-1.0.2/lib/robocode-tankroyale-bot-api-1.0.2.jar}"
|
|
OUT="${OUT:-$HERE/out}"
|
|
RUNNER_JAR="${TR_RUNNER_JAR:-/home/davide/Projects/tank-royale/runner/examples/lib/robocode-tankroyale-runner.jar}"
|
|
|
|
if [[ ! -f "$ROBOCODE_JAR" ]]; then
|
|
echo "robocode.jar not found: $ROBOCODE_JAR" >&2
|
|
echo "Set ROBOCODE_JAR to a Robocode 1.9.5.5 install's libs/robocode.jar" >&2
|
|
exit 1
|
|
fi
|
|
if [[ ! -f "$TR_BOT_API_JAR" ]]; then
|
|
echo "Tank Royale bot API jar not found: $TR_BOT_API_JAR" >&2
|
|
echo "Set TR_BOT_API_JAR to robocode-tankroyale-bot-api-*.jar" >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$OUT"
|
|
javac -nowarn -cp "$ROBOCODE_JAR:$TR_BOT_API_JAR" -d "$OUT" \
|
|
"$HERE/src/robocode_shim/ClassicPeer.java" \
|
|
"$HERE/src/robocode_shim/BotHost.java" \
|
|
"$HERE/src/robocode_shim/TankRoyaleBridge.java" \
|
|
"$HERE/src/robocode_shim/ThreadManagerFix.java" \
|
|
"$HERE/src/robocode_shim/ThreadManagerFixTest.java" \
|
|
"$HERE/src/robocode_shim/LegacyBotBridge.java" \
|
|
"$HERE/src/robocode_shim/DrussGTBridge.java" \
|
|
"$HERE/src/robocode_shim/SmokeTest.java"
|
|
echo "shim built -> $OUT"
|
|
|
|
# The observer/capture program needs the battle-runner jar (which bundles the
|
|
# Tank Royale client model + embedded server) rather than the bot API.
|
|
if [[ -f "$RUNNER_JAR" ]]; then
|
|
javac -nowarn -cp "$RUNNER_JAR" -d "$OUT" \
|
|
"$HERE/src/robocode_shim/TrBattleCapture.java"
|
|
echo "capture built -> $OUT"
|
|
else
|
|
echo "runner jar not found ($RUNNER_JAR); skipped TrBattleCapture" >&2
|
|
fi
|