feat(arena): resize for 5v5, cut a real goal-wall hole, and bake collision geometry

Retraining from scratch removes the constraint that blocked these: the
existing checkpoints in Game/bots/promoted/ no longer need byte-identical
geometry.

- Fix the goal aperture constants (were 1.85/1.65, now match
  objects/goal.tscn's actual sensor exactly at 1.75/1.5) so a ball crossing
  the visible edge can't fail to score.
- Cut a real navigable hole in each end wall's collision
  (_build_end_wall_colliders), replacing the previous solid box — the ball
  now genuinely enters the net instead of triggering the sensor a hair
  before hitting a solid wall. Correct for both FLOOR and ELEVATED goal
  modes via _goal_surround_bounds. A separate, slightly wider
  GOAL_VISUAL_APERTURE_* pair keeps the collision hole exact while still
  giving goal.gd's bezel/rim frame clearance to be seen against the hull cut.
- Resize the play volume 1.5x (INNER_HALF_X/Z/HEIGHT 12/18/12 -> 18/27/18) to
  comfortably fit a 5v5 roster: updates every hand-authored literal in
  arena_boundary.tscn/arena_base.tscn/the elevated arena variants that
  doesn't derive from those constants, adds 5 spawn markers per team, and
  rescales ship_observations.gd's normalization scales and arena_02's
  cosmetic decoration/nebula-dust shader uniforms to match.
- Bake the ~170 runtime-generated CollisionShape3D nodes into the scene via
  a new bake_colliders()/tools/bake_arena_boundary.gd instead of rebuilding
  them on every load — a real load-time cost repeated in every parallel
  headless training env. Colliders must be direct children of the
  StaticBody3D to register at all, so bake_colliders() parents them onto
  self and tags them with a group for idempotent re-baking, rather than
  grouping them under an intermediate container node. _ready() self-heals:
  it skips regenerating only when an existing bake's goal_mode metadata
  matches the current one, so the FLOOR-mode bake in the shared scene is
  never silently reused by an ELEVATED arena variant.
This commit is contained in:
Josh Creek
2026-08-05 09:17:13 +01:00
parent a02e0770af
commit 18fdb0f232
9 changed files with 1429 additions and 73 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ uniform float soft_fade_distance : hint_range(0.0, 5.0) = 1.0;
// see ArenaBoundary.INNER_HALF_X/INNER_HALF_Z/INNER_HEIGHT. Dust is fully
// hidden inside that box and fades in over arena_clear_distance beyond it,
// so it reads as drifting around the station rather than through the pitch.
uniform vec3 arena_half_extents = vec3(12.0, 6.0, 18.0);
uniform vec3 arena_centre = vec3(0.0, 6.0, 0.0);
uniform vec3 arena_half_extents = vec3(18.0, 9.0, 27.0);
uniform vec3 arena_centre = vec3(0.0, 9.0, 0.0);
uniform float arena_clear_distance : hint_range(0.0, 10.0) = 2.0;
varying float v_flicker;