j129: virtual-bullet debug overlay (TR_VBULLET_DEBUG, default off) - travelled path, predicted aim ring, hit/miss vector; shared turret colour table

This commit is contained in:
2026-09-26 11:02:39 +02:00
parent a5c893ace6
commit 752d3a3829
5 changed files with 480 additions and 19 deletions
+13
View File
@@ -32,6 +32,7 @@ import movements/learned_surfer
import guns/tm_horizon
import guns/bitbrain_gun
import guns/pattern_matcher
import vbullet_draw
const EnvReportEnableEnvVar* = "TR_ENV_REPORT"
@@ -44,6 +45,9 @@ type
## diverge from what the bot will actually use.
movementName*: string
vBulletAdmitOnly*: bool
vBulletDebug*: bool
vBulletDebugGun*: string
vBulletDebugMax*: int
recordWorldState*: bool
radarForceSpin*: bool
radarScanLog*: bool
@@ -197,6 +201,14 @@ proc printEffectiveValues(ctx: EnvReportContext) =
emit("TR_MOVEMENT_LOG", onOff(MovementLog), sourceOfPresence("TR_MOVEMENT_LOG"))
emit("TR_VBULLET_ADMIT_ONLY", onOff(ctx.vBulletAdmitOnly),
sourceOf("TR_VBULLET_ADMIT_ONLY"))
emit("TR_VBULLET_DEBUG", onOff(ctx.vBulletDebug),
sourceOfPresence(VBulletDebugEnv))
emit("TR_VBULLET_DEBUG_GUN",
(if ctx.vBulletDebugGun.len == 0: "(unset -> selected gun)"
else: ctx.vBulletDebugGun),
sourceOf(VBulletDebugGunEnv))
emit("TR_VBULLET_DEBUG_MAX", $ctx.vBulletDebugMax,
sourceOf(VBulletDebugMaxEnv))
emit("TR_POWER_LOG", onOff(ctx.powerLog), sourceOfPresence("TR_POWER_LOG"))
emit("TR_RESULT_LOG", onOff(ctx.resultLog), sourceOf("TR_RESULT_LOG"))
emit("TR_RECORD_WORLDSTATE", onOff(ctx.recordWorldState),
@@ -469,6 +481,7 @@ proc knownEnvNames*(): seq[string] =
"TR_MOVEMENT", "TR_MOVEMENT_LOG", "TR_RECORD_WORLDSTATE",
"TR_RADAR_FORCE_SPIN", "TR_RADAR_SCANLOG", "TR_RADAR_SCAN_LOG_PATH",
"TR_TRACKER_PROBE", "TR_TRACKER_PROBE_PATH", "TR_VBULLET_ADMIT_ONLY",
VBulletDebugEnv, VBulletDebugGunEnv, VBulletDebugMaxEnv,
"TR_POWER_LOG",
"TR_RESULT_LOG",
# the .env loader's own environment hook (TR_ENV_FILE names the file)