Files
CosmicClash/Game/scripts/arena_registry.gd
T
Josh Creek 171cd4a840 feat: add Nebula and Asteroid Field arenas
Introduce arena_02 (Nebula) and arena_03 (Asteroid Field) alongside
arena_01, listed in a new ArenaRegistry (scripts/arena_registry.gd) as
the single source of truth for available arenas. Free Play lets the
player pick an arena from the main menu; Match/Spectate each pick one
at random per session; Training keeps its own fixed arena_01.

Nebula gets an RL-style visual treatment: a near-invisible glass
boundary material shared by all arenas, a baked equirect nebula sky
texture, a drifting-dust particle system, and a Blender-modeled
station/debris/planet decoration set. GameMode gains a
_get_arena_scene_path() hook so modes can instantiate their arena in
code instead of hardcoding it in the scene.
2026-08-03 19:11:13 +01:00

15 lines
538 B
GDScript

class_name ArenaRegistry
# Single source of truth for available arenas: the Free Play menu dropdown
# lists these, and Match/Spectate pick one at random each session. Training
# is exempt — training.tscn keeps its own fixed arena_01 child.
const ARENAS := [
{"name": "Starfield", "path": "res://scenes/arena_01.tscn"},
{"name": "Nebula", "path": "res://scenes/arena_02.tscn"},
{"name": "Asteroid Field", "path": "res://scenes/arena_03.tscn"},
]
static func random_path() -> String:
return ARENAS[randi() % ARENAS.size()]["path"]