#!/usr/bin/env bash # #95/#84 CONFIRMATION: are missiles TUNNELLING through the target? # # Contact is a fixed 10-unit sphere sampled ONCE PER FRAME. Logged field speeds # reach v=955, which at 60fps is a ~16 unit step -- larger than the radius, so # consecutive samples can straddle the target entirely. Prediction: a salvo # lands only the rounds that pass near dead centre, and the rest hit the flight # cap and FIZZLE. BT_PROJ_LOG=1 turns on the fizzle line (it is gated, which is # why the field logs could not answer this). # # Verdict = the IMPACT:FIZZLE ratio per salvo. set -x . /c/git/bt411/scratchpad/night6/bench_common.sh cd /c/git/bt411/content || exit 1 taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 2 sed "s/^map=.*/map=grass/; s/^time=.*/time=day/" MP.EGG > SALVO.EGG LOG=salvo_${1:-pre}.log rm -f "$LOG" # Walk up to the spawned target and hold the missile group down. BT_PROJ_LOG=1 BT_DMG_LOG=1 BT_FIRE_LOG=1 \ BT_SPAWN_ENEMY=1 BT_GOTO=enemy BT_GOTO_STOP=2 \ BT_AUTOFIRE=1 BT_AF_MISSILE=1 BT_AF_PERIOD=3 \ bt_launch "$LOG" SALVO.EGG 0x03 sleep 100 taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 2 echo "=== impacts vs fizzles ===" printf "IMPACT %s\n" "$(grep -c 'projectile\] IMPACT' "$LOG")" printf "FIZZLE %s\n" "$(grep -c 'projectile\] FIZZLE' "$LOG")" printf "WORLD %s\n" "$(grep -c 'projectile\] WORLD' "$LOG")" echo "=== impact speeds (the tunnelling driver) ===" grep -o 'IMPACT .*v=[0-9.]*' "$LOG" | grep -o 'v=[0-9.]*' | sort -t= -k2 -n | tail -3