mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
df3e168b31
Each of the three arenas gains an ELEVATED sibling scene that inherits the base arena and overrides the boundary's goal_mode, the two goal transforms and the ship spawns, so the goal sits at mid-wall height instead of flush with the deck. Registered in ArenaRegistry alongside the floor-level arenas, plus a training_elevated scene for self-play on them. TrainingMode reads the arena's goal_mode once in _start() and widens the ball-placement height range to match the goal's real position; on FLOOR arenas the bound is a no-op, so floor-level training is unchanged. It is read in _start() rather than _ready() because TrainingMode has no _ready() override and GameMode._ready() is what discovers the arena first. Policies trained against floor-level goals are not expected to score on an elevated one, so the two are kept as separate arenas rather than a variant of the same entry.
16 lines
514 B
Plaintext
16 lines
514 B
Plaintext
[gd_scene load_steps=4 format=3]
|
|
|
|
[ext_resource type="Script" path="res://scripts/training_mode.gd" id="1_tr"]
|
|
[ext_resource type="PackedScene" path="res://scenes/arena_01_elevated.tscn" id="2_tr"]
|
|
[ext_resource type="Script" path="res://addons/godot_rl_agents/sync.gd" id="3_tr"]
|
|
|
|
[node name="Training" type="Node3D"]
|
|
script = ExtResource("1_tr")
|
|
|
|
[node name="Arena" parent="." instance=ExtResource("2_tr")]
|
|
|
|
[node name="Sync" type="Node" parent="."]
|
|
script = ExtResource("3_tr")
|
|
action_repeat = 8
|
|
speed_up = 8.0
|