Files
Josh Creek 08a0f74391 refactor(*): DRY up arena scenes, game modes, and HUD instruments
Arenas inherit from a new arena_base.tscn instead of restating ~40 shared
lines each; only sky/ambient/glow/tint/decoration vary, exposed via new
Arena exports since nested Environment properties aren't overridable
through scene inheritance. Bot construction and score-keeping move onto
GameMode, shared by match and spectate modes while preserving their
differing GameSettings-override behavior and the HUD's score-row
duck-typing. HUD instruments share a HudInstrument base for the
smoothing-weight calc and angle-lerp helper. Also dedupes
MAIN_MENU_SCENE_PATH into ScenePaths and documents why DIFFICULTIES
tiers share one checkpoint.
2026-08-04 15:07:33 +01:00

30 lines
945 B
Plaintext

[gd_scene load_steps=4 format=3]
[ext_resource type="PackedScene" path="res://scenes/arena_base.tscn" id="1_base"]
[sub_resource type="Shader" id="Shader_stars"]
code = "shader_type sky;
// Procedural starfield: sparse hash-based stars over near-black space, with a
// faint blue nebula glow toward the horizon.
void sky() {
vec3 dir = EYEDIR;
vec3 col = vec3(0.01, 0.012, 0.02);
col += vec3(0.02, 0.03, 0.08) * pow(1.0 - abs(dir.y), 3.0);
vec3 cell = floor(dir * 300.0);
float h = fract(sin(dot(cell, vec3(12.9898, 78.233, 45.164))) * 43758.5453);
if (h > 0.998) {
vec3 in_cell = fract(dir * 300.0) - 0.5;
float star = smoothstep(0.4, 0.0, length(in_cell));
col += vec3(star * (0.5 + fract(h * 999.0)));
}
COLOR = col;
}
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_stars"]
shader = SubResource("Shader_stars")
[node name="Arena" instance=ExtResource("1_base")]
sky_material = SubResource("ShaderMaterial_stars")