Add tentacled boss planet encounter

This commit is contained in:
Loïc Wisniewski 2026-09-03 10:33:05 +02:00
commit 40f284dcdd
38 changed files with 1051 additions and 19 deletions

View file

@ -0,0 +1,14 @@
[gd_resource type="Resource" script_class="PlanetDefinition" load_steps=3 format=3]
[ext_resource type="Script" path="res://planets/PlanetDefinition.gd" id="1"]
[ext_resource type="PackedScene" path="res://planets/BossPlanetVisual.tscn" id="2"]
[resource]
script = ExtResource("1")
definition_id = "boss"
display_name = "Tentacled world"
names = PackedStringArray("The Sleeper", "Many-Eyed Deep", "Nacre Wound", "The Coiled Moon", "Abyssal Crown")
visual_scene = ExtResource("2")
surface_profile_id = "boss"
resource_id = ""
map_color = Color(0.95, 0.18, 0.58, 1)

View file

@ -0,0 +1,51 @@
extends Node2D
# The space-side landmark: organic, asymmetric and visibly awake. The landed
# encounter uses the same pink/cyan palette at a much larger scale.
const RADIUS: float = 104.0
const FLESH_COLOR := Color(0.95, 0.18, 0.58)
const VEIN_COLOR := Color(0.25, 0.9, 1.0)
const CORE_COLOR := Color(0.11, 0.015, 0.08)
var phase: float = 0.0
func configure(shape_seed: int) -> void:
phase = float(posmod(shape_seed, 628)) / 100.0
queue_redraw()
func extractor_anchor() -> Vector2:
return Vector2(0.0, -(RADIUS + 36.0))
func _process(delta: float) -> void:
phase += delta
queue_redraw()
func _draw() -> void:
# Eight short feelers make this read as a creature before the central eye
# is even noticed.
for i in range(8):
var angle: float = TAU * float(i) / 8.0 + phase * 0.08
var points := PackedVector2Array()
for step in range(7):
var t: float = float(step) / 6.0
var radial: float = lerpf(RADIUS * 0.72, RADIUS * 1.35, t)
var curl: float = sin(t * PI * 1.7 + phase * 1.5 + float(i)) * 0.16 * t
points.append(Vector2.from_angle(angle + curl) * radial)
NeonDraw.draw_glowing_path(self, points, FLESH_COLOR, 0.75, 0.55, CORE_COLOR)
var body := PackedVector2Array()
for i in range(24):
var angle: float = TAU * float(i) / 24.0
var pulse: float = 1.0 + 0.035 * sin(phase * 2.2 + float(i) * 1.7)
body.append(Vector2.from_angle(angle) * RADIUS * pulse)
NeonDraw.draw_glowing_polygon(self, body, FLESH_COLOR, 0.9, CORE_COLOR)
var eye_scale: float = 1.0 + 0.08 * sin(phase * 3.0)
draw_set_transform(Vector2.ZERO, 0.0, Vector2(0.62, 1.0) * eye_scale)
NeonDraw.draw_glowing_circle(self, Vector2.ZERO, 34.0, VEIN_COLOR, 1.0, CORE_COLOR)
NeonDraw.draw_glowing_circle(self, Vector2.ZERO, 13.0, Color.WHITE, 1.0, CORE_COLOR)
draw_set_transform(Vector2.ZERO, 0.0, Vector2.ONE)

View file

@ -0,0 +1 @@
uid://dabh0dbwxu3i3

View file

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3]
[ext_resource type="Script" path="res://planets/BossPlanetVisual.gd" id="1"]
[node name="Visual" type="Node2D"]
script = ExtResource("1")

View file

@ -5,12 +5,14 @@ const ROCKY_ID: String = "rocky"
const GAS_GIANT_ID: String = "gas_giant"
const BLACK_HOLE_ID: String = "black_hole"
const RESEARCH_LAB_ID: String = "research_lab"
const BOSS_ID: String = "boss"
const DEFAULT_DEFINITION_ID: String = ROCKY_ID
const DEFINITIONS: Dictionary = {
ROCKY_ID: preload("res://planets/RockyPlanetDefinition.tres"),
GAS_GIANT_ID: preload("res://planets/GasGiantDefinition.tres"),
BLACK_HOLE_ID: preload("res://planets/BlackHolePlanetDefinition.tres"),
RESEARCH_LAB_ID: preload("res://planets/ResearchLabPlanetDefinition.tres"),
BOSS_ID: preload("res://planets/BossPlanetDefinition.tres"),
}