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
+4 -4
View File
@@ -8,13 +8,13 @@
goal_mode = 1
[node name="GoalTeam0" parent="." index="5"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6.0, 18)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9.0, 27)
[node name="GoalTeam1" parent="." index="6"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 6.0, -18)
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 9.0, -27)
[node name="Spawn1" parent="SpawnsTeam0" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.0, 2.8, 13.5)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.0, 2.8, 20.25)
[node name="Spawn1" parent="SpawnsTeam1" index="0"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, -4.0, 2.8, -13.5)
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, -6.0, 2.8, -20.25)
+12 -12
View File
@@ -32,7 +32,7 @@ gradient = SubResource("Gradient_dust")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_dust"]
emission_shape = 3
emission_box_extents = Vector3(26, 11, 28)
emission_box_extents = Vector3(39, 16.5, 42)
direction = Vector3(0, 1, 0)
spread = 180.0
initial_velocity_min = 0.1
@@ -68,48 +68,48 @@ light_color = Color(0.55, 0.35, 0.65, 1)
light_energy = 0.45
[node name="NebulaDust" type="GPUParticles3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7.5, 0)
amount = 500
lifetime = 22.0
preprocess = 8.0
randomness = 1.0
visibility_aabb = AABB(-30, -14, -32, 60, 28, 64)
visibility_aabb = AABB(-45, -21, -48, 90, 42, 96)
process_material = SubResource("ParticleProcessMaterial_dust")
draw_pass_1 = SubResource("QuadMesh_dust")
[node name="Decoration" type="Node3D" parent="."]
[node name="NebulaStationA" parent="Decoration" instance=ExtResource("8_station")]
transform = Transform3D(1.8, 0, 0, 0, 1.8, 0, 0, 0, 1.8, 28, 5, -6)
transform = Transform3D(1.8, 0, 0, 0, 1.8, 0, 0, 0, 1.8, 42, 7.5, -9)
rotation = Vector3(0, -0.436332, 0)
[node name="NebulaDebrisA" parent="Decoration" instance=ExtResource("9_debris")]
transform = Transform3D(1.2, 0, 0, 0, 1.2, 0, 0, 0, 1.2, -22, 9, 11)
transform = Transform3D(1.2, 0, 0, 0, 1.2, 0, 0, 0, 1.2, -33, 13.5, 16.5)
rotation = Vector3(0.261799, 0.698132, 0.087266)
[node name="NebulaDebrisB" parent="Decoration" instance=ExtResource("9_debris")]
transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 34, 3, 15)
transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 51, 4.5, 22.5)
rotation = Vector3(-0.174533, 1.919862, 0.349066)
[node name="NebulaDebrisC" parent="Decoration" instance=ExtResource("9_debris")]
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, -30, 11, -21)
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, -45, 16.5, -31.5)
rotation = Vector3(0.087266, -1.047198, -0.261799)
[node name="NebulaStationB" parent="Decoration" instance=ExtResource("8_station")]
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, -32, 7, 9)
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, -48, 10.5, 13.5)
rotation = Vector3(0.05, 1.134464, -0.02)
[node name="NebulaStationC" parent="Decoration" instance=ExtResource("8_station")]
transform = Transform3D(1.3, 0, 0, 0, 1.3, 0, 0, 0, 1.3, 9, 8, 42)
transform = Transform3D(1.3, 0, 0, 0, 1.3, 0, 0, 0, 1.3, 13.5, 12, 63)
rotation = Vector3(-0.03, 2.740167, 0.06)
[node name="NebulaDebrisD" parent="Decoration" instance=ExtResource("9_debris")]
transform = Transform3D(1.0, 0, 0, 0, 1.0, 0, 0, 0, 1.0, 13, 15, -35)
transform = Transform3D(1.0, 0, 0, 0, 1.0, 0, 0, 0, 1.0, 19.5, 22.5, -52.5)
rotation = Vector3(0.4, 1.3, -0.2)
[node name="NebulaDebrisE" parent="Decoration" instance=ExtResource("9_debris")]
transform = Transform3D(0.9, 0, 0, 0, 0.9, 0, 0, 0, 0.9, -11, 4, 33)
transform = Transform3D(0.9, 0, 0, 0, 0.9, 0, 0, 0, 0.9, -16.5, 6, 49.5)
rotation = Vector3(-0.3, -0.9, 0.15)
[node name="NebulaPlanet" parent="Decoration" instance=ExtResource("11_planet")]
transform = Transform3D(30, 0, 0, 0, 30, 0, 0, 0, 30, -55, 38, -80)
transform = Transform3D(30, 0, 0, 0, 30, 0, 0, 0, 30, -82.5, 57, -120)
+4 -4
View File
@@ -8,13 +8,13 @@
goal_mode = 1
[node name="GoalTeam0" parent="." index="5"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6.0, 18)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9.0, 27)
[node name="GoalTeam1" parent="." index="6"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 6.0, -18)
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 9.0, -27)
[node name="Spawn1" parent="SpawnsTeam0" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.0, 2.8, 13.5)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.0, 2.8, 20.25)
[node name="Spawn1" parent="SpawnsTeam1" index="0"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, -4.0, 2.8, -13.5)
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, -6.0, 2.8, -20.25)
+4 -4
View File
@@ -8,13 +8,13 @@
goal_mode = 1
[node name="GoalTeam0" parent="." index="5"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6.0, 18)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9.0, 27)
[node name="GoalTeam1" parent="." index="6"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 6.0, -18)
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 9.0, -27)
[node name="Spawn1" parent="SpawnsTeam0" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.0, 2.8, 13.5)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.0, 2.8, 20.25)
[node name="Spawn1" parent="SpawnsTeam1" index="0"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, -4.0, 2.8, -13.5)
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, -6.0, 2.8, -20.25)
+30 -6
View File
@@ -53,16 +53,16 @@ shadow_enabled = false
environment = SubResource("Environment_base")
[node name="ReflectionProbe" type="ReflectionProbe" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6, 0)
size = Vector3(26, 14, 40)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9, 0)
size = Vector3(38, 20, 58)
box_projection = true
update_mode = 0
[node name="GoalTeam0" parent="." instance=ExtResource("6_p57ef")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.79, 18)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.79, 27)
[node name="GoalTeam1" parent="." instance=ExtResource("6_p57ef")]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0.79, -18)
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0.79, -27)
team = 1
[node name="BallSpawn" type="Marker3D" parent="."]
@@ -71,9 +71,33 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
[node name="SpawnsTeam0" type="Node3D" parent="."]
[node name="Spawn1" type="Marker3D" parent="SpawnsTeam0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.8, 13.5)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9, 2.8, 20.25)
[node name="Spawn2" type="Marker3D" parent="SpawnsTeam0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.5, 2.8, 20.25)
[node name="Spawn3" type="Marker3D" parent="SpawnsTeam0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.8, 20.25)
[node name="Spawn4" type="Marker3D" parent="SpawnsTeam0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.5, 2.8, 20.25)
[node name="Spawn5" type="Marker3D" parent="SpawnsTeam0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9, 2.8, 20.25)
[node name="SpawnsTeam1" type="Node3D" parent="."]
[node name="Spawn1" type="Marker3D" parent="SpawnsTeam1"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 2.8, -13.5)
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, -9, 2.8, -20.25)
[node name="Spawn2" type="Marker3D" parent="SpawnsTeam1"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, -4.5, 2.8, -20.25)
[node name="Spawn3" type="Marker3D" parent="SpawnsTeam1"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 2.8, -20.25)
[node name="Spawn4" type="Marker3D" parent="SpawnsTeam1"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 4.5, 2.8, -20.25)
[node name="Spawn5" type="Marker3D" parent="SpawnsTeam1"]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 9, 2.8, -20.25)