Cambiados los aspectos visuales del juego a algo gotico

This commit is contained in:
Diego De la Viuda Llorente committed 2026-11-26 18:46:31 +01:00
1 parent ec7e35ddf6
commit 967b3a286d
205 files changed
+7056 -1630

No files matched your search

+2 -3
View File
@@ -1,7 +1,7 @@
[gd_scene load_steps=5 format=3]
[ext_resource type="Script" path="res://world/triggers/kill_gate.gd" id="gate"]
[ext_resource type="Script" path="res://world/triggers/ossuary_gate_visual.gd" id="visual"]
[ext_resource type="PackedScene" path="res://world/triggers/ossuary_gate_visual.tscn" id="visual"]
[sub_resource type="RectangleShape2D" id="gate_collision"]
size = Vector2(44, 220)
@@ -17,8 +17,7 @@ script = ExtResource("gate")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("gate_collision")
[node name="Visual" type="Node2D" parent="."]
script = ExtResource("visual")
[node name="Visual" parent="." instance=ExtResource("visual")]
[node name="Sensor" type="Area2D" parent="."]
position = Vector2(-40, 0)
+31 -132
View File
@@ -1,22 +1,27 @@
@tool
extends Node2D
class_name OssuaryGateVisual
## Porton de calaveras provisional: hojas de hierro, cadenas, sello y apertura
## lateral animada. No controla las muertes ni las colisiones del nivel.
## Porton raster: las dos hojas de hierro se repliegan detras de las columnas.
## Solo anima sprites ya cargados. KillGate conserva todo el contrato de combate
## y retira su colision exclusivamente al recibir fully_open.
signal fully_open
@export_range(0.2, 4.0, 0.1) var open_duration: float = 1.15
var _unlocked: bool = false
var _progress: float = 0.0
var _elapsed: float = 0.0
var _signalled: bool = false
const STONE: Color = Color(0.24, 0.22, 0.29)
const STONE_EDGE: Color = Color(0.53, 0.49, 0.59)
const IRON: Color = Color(0.12, 0.12, 0.19)
const IRON_EDGE: Color = Color(0.53, 0.58, 0.63)
const BONE: Color = Color(0.90, 0.84, 0.71)
@onready var _left_leaf: Sprite2D = $LeftLeaf
@onready var _right_leaf: Sprite2D = $RightLeaf
@onready var _seal: Sprite2D = $Seal
@onready var _glow: PointLight2D = $SealGlow
func _ready() -> void:
_update_visuals()
set_process(_unlocked and not Engine.is_editor_hint())
func set_unlocked(value: bool) -> void:
@@ -25,135 +30,29 @@ func set_unlocked(value: bool) -> void:
_unlocked = value
if not value:
_signalled = false
if not Engine.is_editor_hint():
set_process(true)
func _process(delta: float) -> void:
if Engine.is_editor_hint():
# Preview fija en el editor; animacion real solo durante la partida.
queue_redraw()
return
_elapsed += delta
_progress = move_toward(_progress, 1.0 if _unlocked else 0.0, delta / open_duration)
_progress = move_toward(_progress, 1.0 if _unlocked else 0.0,
delta / maxf(open_duration, 0.01))
_update_visuals()
if _unlocked and _progress >= 1.0 and not _signalled:
_signalled = true
fully_open.emit()
queue_redraw()
if is_equal_approx(_progress, 1.0 if _unlocked else 0.0):
set_process(false)
func _draw() -> void:
var pale: Color = Color(0.45, 1.0, 0.85) if _unlocked else Color(1.0, 0.33, 0.31)
var pulse: float = 0.6 + 0.4 * sin(_elapsed * 4.0)
# Sombra y vacio de la cripta. El resplandor se vuelve verde al abrir.
draw_colored_polygon(PackedVector2Array([
Vector2(-96, 116), Vector2(-96, -62), Vector2(-91, -89),
Vector2(-72, -120), Vector2(-40, -142), Vector2(0, -150),
Vector2(40, -142), Vector2(72, -120), Vector2(91, -89),
Vector2(96, -62), Vector2(96, 116)
]), Color(0.055, 0.05, 0.092))
draw_rect(Rect2(Vector2(-65, -89), Vector2(130, 198)), Color(0.025, 0.06 + 0.04 * pulse, 0.08))
draw_circle(Vector2(0, 6), 42.0, Color(pale.r, pale.g, pale.b, 0.10 + 0.08 * pulse))
# Las hojas se deslizan a los lados y dejan pasar al personaje.
for side: int in [-1, 1]:
_draw_leaf(side, side * (31.0 + 60.0 * _progress), pale, pulse)
# Marco principal de bloques de piedra, dibujado por delante de las hojas.
for side: int in [-1, 1]:
var x: float = -91.0 if side < 0 else 65.0
draw_rect(Rect2(Vector2(x, -93), Vector2(26, 211)), STONE)
draw_rect(Rect2(Vector2(x + (20 if side < 0 else 0), -88), Vector2(6, 204)), STONE_EDGE.darkened(0.25))
for i: int in range(5):
draw_line(Vector2(x, -69 + i * 39), Vector2(x + 26, -69 + i * 39), Color(0.11, 0.11, 0.17), 2.0)
_draw_skull(Vector2(side * 78.0, -46.0), 0.38, pale)
# Arco de piedra, moldura y remaches.
draw_arc(Vector2(0, -61), 91.0, PI, TAU, 45, STONE, 25.0)
draw_arc(Vector2(0, -61), 91.0, PI, TAU, 45, STONE_EDGE, 5.0)
draw_arc(Vector2(0, -61), 65.0, PI, TAU, 40, Color(0.66, 0.58, 0.76), 4.0)
for i: int in range(9):
var angle: float = PI + float(i) * PI / 8.0
var point: Vector2 = Vector2(cos(angle), sin(angle)) * 88.0 + Vector2(0, -61)
draw_circle(point, 4.0, Color(0.12, 0.11, 0.18))
draw_rect(Rect2(Vector2(-105, 109), Vector2(210, 15)), STONE)
draw_line(Vector2(-103, 109), Vector2(103, 109), STONE_EDGE, 4.0)
# El craneo principal domina el umbral. Cuernos y huesos cruzados.
_draw_bone(Vector2(-31, -149), Vector2(31, -122), 5.0)
_draw_bone(Vector2(31, -149), Vector2(-31, -122), 5.0)
_draw_skull(Vector2(0.0, -131.0), 0.76, pale)
for side: int in [-1, 1]:
draw_line(Vector2(side * 41, -127), Vector2(side * 60, -147), STONE_EDGE, 5.0)
draw_line(Vector2(side * 60, -147), Vector2(side * 52, -116), STONE_EDGE, 4.0)
if _progress < 0.97:
# Cadenas y cerradura central; desaparecen al romper el sello.
var opacity: float = 1.0 - _progress
for i: int in range(6):
var y: float = -44.0 + i * 23.0
draw_arc(Vector2(-4 + (i % 2) * 8, y), 10.0, 0, TAU, 18, Color(0.75, 0.72, 0.76, opacity), 4.0)
draw_rect(Rect2(Vector2(-18, 22), Vector2(36, 41)), Color(0.26, 0.16, 0.30, opacity))
draw_rect(Rect2(Vector2(-14, 27), Vector2(28, 28)), Color(0.63, 0.50, 0.71, opacity), false, 3.0)
draw_circle(Vector2(0, 42), 7.0 + pulse * 2.0, Color(pale.r, pale.g, pale.b, opacity))
if _progress > 0.0 and _progress < 1.0:
# Chispas del sello mientras se desliza la puerta.
for i: int in range(7):
var a: float = float(i) * TAU / 7.0 + _elapsed * 2.5
var r: float = 18.0 + _progress * 80.0
draw_circle(Vector2(cos(a) * r, sin(a) * r * 0.55), 2.0 + i % 3, Color(0.75, 1.0, 0.82, 1.0 - _progress))
func _draw_leaf(side: int, cx: float, glow: Color, pulse: float) -> void:
var x: float = cx - 30.0
# Acero viejo con barras, remaches y espinas, no un simple rectangulo.
draw_rect(Rect2(Vector2(x, -94), Vector2(60, 205)), IRON)
draw_rect(Rect2(Vector2(x + 4, -90), Vector2(52, 197)), Color(0.20, 0.18, 0.26), false, 4.0)
for j: int in range(4):
var bar_x: float = x + 10 + j * 13
draw_line(Vector2(bar_x, -86), Vector2(bar_x, 106), IRON_EDGE.darkened(0.30), 5.0)
draw_line(Vector2(bar_x + 1, -86), Vector2(bar_x + 1, 106), Color(0.09, 0.08, 0.14), 2.0)
# Punta de lanza en cada barra.
draw_colored_polygon(PackedVector2Array([
Vector2(bar_x - 5, -85), Vector2(bar_x, -104), Vector2(bar_x + 5, -85)
]), IRON_EDGE)
for j: int in range(4):
var y: float = -65 + j * 52
draw_rect(Rect2(Vector2(x + 4, y), Vector2(52, 8)), Color(0.34, 0.31, 0.40))
for i: int in range(3):
draw_circle(Vector2(x + 13 + i * 17, y + 4), 2.0, Color(0.70, 0.66, 0.67))
# Huesos cruzados y craneo tallado sobre cada hoja.
_draw_bone(Vector2(cx - 18, -38), Vector2(cx + 18, 12), 5.0)
_draw_bone(Vector2(cx + 18, -38), Vector2(cx - 18, 12), 5.0)
_draw_skull(Vector2(cx, -12), 0.70, glow)
# Grietas en la madera ennegrecida, pulso espectral.
draw_line(Vector2(cx - 20, 58), Vector2(cx - 6, 69), Color(glow.r, glow.g, glow.b, 0.48 * pulse), 3.0)
draw_line(Vector2(cx - 6, 69), Vector2(cx + 5, 64), Color(glow.r, glow.g, glow.b, 0.48 * pulse), 3.0)
draw_line(Vector2(cx + 5, 64), Vector2(cx + 16, 88), Color(glow.r, glow.g, glow.b, 0.48 * pulse), 3.0)
func _draw_bone(a: Vector2, b: Vector2, width: float) -> void:
draw_line(a, b, BONE.darkened(0.18), width)
for end: Vector2 in [a, b]:
draw_circle(end + Vector2(-2, 0), width * 0.56, BONE)
draw_circle(end + Vector2(2, 0), width * 0.56, BONE)
func _draw_skull(center: Vector2, scale_value: float, glow: Color) -> void:
var r: float = 26.0 * scale_value
var skull: Color = BONE
# Silueta ancha en la frente y mandibula con dientes individuales.
draw_circle(center + Vector2(0, -4 * scale_value), r, Color(0.28, 0.24, 0.29))
draw_circle(center + Vector2(0, -5 * scale_value), r - 2.0, skull)
draw_rect(Rect2(center + Vector2(-r * 0.56, r * 0.38), Vector2(r * 1.12, r * 0.72)), skull)
for side: int in [-1, 1]:
var eye: Vector2 = center + Vector2(side * r * 0.43, -r * 0.15)
draw_circle(eye, r * 0.30, Color(0.07, 0.06, 0.13))
draw_circle(eye, r * 0.12, glow)
draw_colored_polygon(PackedVector2Array([
center + Vector2(0, r * 0.10),
center + Vector2(-r * 0.20, r * 0.46),
center + Vector2(r * 0.20, r * 0.46)
]), Color(0.12, 0.08, 0.16))
for tooth: int in range(4):
var xx: float = center.x - r * 0.42 + tooth * r * 0.28
draw_line(Vector2(xx, center.y + r * 0.60), Vector2(xx, center.y + r * 1.03), Color(0.35, 0.32, 0.33), maxf(1.0, 2.0 * scale_value))
draw_line(center + Vector2(-r * 0.55, -r * 0.70), center + Vector2(-r * 0.12, -r * 0.83), Color.WHITE, maxf(1.0, 2.0 * scale_value))
func _update_visuals() -> void:
if not is_instance_valid(_left_leaf):
return
var eased: float = smoothstep(0.0, 1.0, _progress)
_left_leaf.position.x = roundf(-40.0 - 74.0 * eased)
_right_leaf.position.x = roundf(40.0 + 74.0 * eased)
_left_leaf.scale.x = lerpf(1.0, 0.28, eased)
_right_leaf.scale.x = lerpf(1.0, 0.28, eased)
_seal.modulate.a = 1.0 - minf(eased * 2.0, 1.0)
_glow.color = Color(1.0, 0.39, 0.21).lerp(Color(0.37, 0.84, 0.72), eased)
_glow.set("base_energy", lerpf(0.24, 0.38, eased))
+65
View File
@@ -0,0 +1,65 @@
[gd_scene load_steps=10 format=3]
[ext_resource type="Script" path="res://world/triggers/ossuary_gate_visual.gd" id="script"]
[ext_resource type="Texture2D" path="res://assets/ashen/environment/fence.png" id="iron"]
[ext_resource type="Texture2D" path="res://assets/ashen/environment/column.png" id="column"]
[ext_resource type="Texture2D" path="res://assets/ashen/environment/stone_cap.png" id="stone"]
[ext_resource type="Texture2D" path="res://assets/ashen/environment/banner.png" id="seal"]
[ext_resource type="Texture2D" path="res://assets/ashen/environment/gate_arch.png" id="arch"]
[ext_resource type="PackedScene" path="res://world/props/votive_glow.tscn" id="glow"]
[sub_resource type="AtlasTexture" id="left_iron"]
atlas = ExtResource("iron")
region = Rect2(24, 0, 80, 204)
[sub_resource type="AtlasTexture" id="right_iron"]
atlas = ExtResource("iron")
region = Rect2(104, 0, 80, 204)
[node name="OssuaryGateVisual" type="Node2D"]
texture_filter = 1
script = ExtResource("script")
[node name="LeftLeaf" type="Sprite2D" parent="."]
position = Vector2(-40, 8)
texture = SubResource("left_iron")
[node name="RightLeaf" type="Sprite2D" parent="."]
position = Vector2(40, 8)
texture = SubResource("right_iron")
[node name="Seal" type="Sprite2D" parent="."]
position = Vector2(0, 8)
scale = Vector2(0.375, 0.375)
texture = ExtResource("seal")
[node name="ColumnLeft" type="Sprite2D" parent="."]
position = Vector2(-96, -12)
scale = Vector2(0.58, 1)
texture = ExtResource("column")
self_modulate = Color(0.8, 0.75, 0.82, 1)
[node name="ColumnRight" type="Sprite2D" parent="."]
position = Vector2(96, -12)
scale = Vector2(0.58, 1)
texture = ExtResource("column")
flip_h = true
self_modulate = Color(0.8, 0.75, 0.82, 1)
[node name="Arch" type="Sprite2D" parent="."]
position = Vector2(0, -132)
texture = ExtResource("arch")
self_modulate = Color(0.8, 0.75, 0.82, 1)
[node name="Threshold" type="Sprite2D" parent="."]
position = Vector2(-134, 110)
texture = ExtResource("stone")
centered = false
region_enabled = true
region_rect = Rect2(0, 0, 268, 16)
[node name="SealGlow" parent="." instance=ExtResource("glow")]
position = Vector2(0, 8)
color = Color(1, 0.39, 0.21, 1)
texture_scale = 1.5
base_energy = 0.24