diff --git a/docs/direccion_arte_referencia_2026.md b/docs/direccion_arte_referencia_2026.md new file mode 100644 index 0000000..9643e18 --- /dev/null +++ b/docs/direccion_arte_referencia_2026.md @@ -0,0 +1,127 @@ +# Mortal Maze - referencia de arte e identidad de la banda + +Estado: especificacion de arte para la siguiente tanda de sprites. La imagen de +referencia facilitada por el autor es la guia visual, **no un spritesheet**. +Este documento NO implica que los sprites hayan sido redibujados en este parche. + +## Los cuatro personajes - orden estricto, de izquierda a derecha + +| Posicion en la referencia | Nombre | Recurso del juego | Papel | Rasgos que conservar | +| --- | --- | --- | --- | --- | +| 1 | Diego | `guitarist` | Guitarra | Melena oscura, barba abundante, chaleco vaquero oscuro, guitarra en ataques | +| 2 | Ivan | `drummer` | Bateria | Melena negra lisa, camiseta negra, vaqueros, baquetas al atacar | +| 3 | Fer | `bassist` | Bajo | Pelo oscuro rizado, ropa y accesorios metaleros, **bajo, no baquetas** | +| 4 | Hector | `singer` | Voz | Melena rubia, chaleco/chaqueta oscuros, botas, microfono al atacar | + +Las baquetas que aparecen en la mano de Fer en la referencia son un error del +boceto. Fer debe llevar bajo; Ivan es el bateria. Diego y Fer deben empunar +instrumentos distintos en poses de ataque y al cargar el especial. + +## Objetivo visual + +- Ilustracion 2D inspirada en pixel art moderno de alta calidad, sin grandes + cuadrados planos ni anatomia achatada tipo Super Mario. +- Proporciones humanas mas naturales: cabeza, hombros, torso, manos y piernas + con estructura. Rostro, pelo, pliegues de ropa, cuero, tela, parches y metal + identificables en pantalla. Contorno oscuro coherente y volumen en tres o + cuatro valores de luz; no texturas fotograficas. +- Los protagonistas son los mas metaleros. Los enemigos mantienen la misma + calidad de pintura y materiales, pero menos extravagantes (sin copiar + peinados, vestuario ni armas de los protagonistas). +- Todo se lee en un escenario oscuro y a velocidad real, no solo en una imagen + aumentada. Evitar detalles tan finos que se pierdan al reducir el sprite. + +## Escala de juego: no agrandar personajes + +La referencia es una guia de estilo, **no una nueva escala de personaje**. +En el proyecto actual, los SpriteFrames de la banda tienen 40 celdas de 64x64; +la silueta vertical ronda 56 px de mundo. Las colisiones son **26x52** en el +Player y **28x52** en los enemigos. La camara habitual tiene zoom 2x. + +Criterio innegociable: con arte nuevo, pies al mismo nivel del suelo, centro, +altura y volumen **en el mundo del juego** comparables a los actuales. El +escenario no debe percibirse encogido ni el jugador mas grande. Si los dibujos +se hacen a mas resolucion, se puede usar una celda de 128x128 a escala 0.5 o +256x256 a escala 0.25, conservando una caja virtual de 64x64 por fotograma y +los mismos nodos de colision. Revisar en Android el coste en memoria y evitar +texturas gigantes horizontales; el atlas actual es una cuadricula de 8x5. + +Las partes del instrumento que sobresalen pueden ocupar espacio dentro de la +celda sin aumentar la colision. No mover el origen visual ni desplazar el suelo +para disimular un dibujo desalineado. + +## Animaciones a producir + +- Reposo vivo sin exageracion: respiracion, pelo y ropa sutiles. +- Caminar/correr: 8-12 dibujos por ciclo si hay material; contacto, descenso, + paso y vuelo bien diferenciados, pies anclados durante el apoyo, rodilla y + tobillo articulados, cadera estable, brazos en contrafase. No reflejar la + misma pierna para simular ambas zancadas. +- Salto/subida, caida y aterrizaje con anticipacion y recuperacion. +- Punetazo, golpe desde el aire, golpe al suelo, dano y muerte. +- Especial con inicio, ejecucion, fin y silueta reconocible del instrumento: + guitarra electrica para Diego, baquetas/platos para Ivan, bajo de cuatro + cuerdas para Fer y microfono para Hector. +- Instrumentos: cuerpo, mastil, afinadores, clavijas, puente, cuerdas, golpes + de luz y sombras propios; no rectangulos de color sin volumen. El bajo de Fer + debe ser evidente en los cuatro pulsos del especial, nunca confundirse con + una guitarra o unas baquetas. +- Mantener las duraciones del combate y su hit timing; animar dentro de las + ventanas actuales antes de modificar gameplay. No prometer 12 fotogramas + efectivos si la animacion no se ha importado y revisado en Godot. + +## Enemigos + +Renovar con la misma direccion pictorica los cinco perfiles existentes: +`roadie`, `pogo_fan`, `backstage_guard`, `rival_guitarist` y `feedback_tech`. +Darles siluetas distintas y ropa creible; menos metaleros que la banda. Seguir +usando su tamaƱo, colisiones, animaciones logicas, velocidad y ataque actuales. + +## VFX y consistencia con el arte + +Los efectos son parte del mismo juego y no deben parecer pegatinas de estilo +ajeno. Usar borde de tinta oscura, brillos metalicos, degradados muy controlados +y un acento por personaje. Evitar cuadrados gigantes, figuras planas y efectos +que oculten completamente las siluetas a escala 2x. + +- Diego: descarga de guitarra, electricidad cian/azul con nucleo claro y rayos + ramificados; chispa en el punto de impacto. +- Ivan: platos dorados con borde, reflejo y sensacion de giro; trazas de + movimiento que no parezcan nuevos proyectiles daninos. +- Fer: ondas graves purpuras, lineas de vibracion y grietas negras con brillo. +- Hector: grito, ondas doradas/ambar y semicupula translucida. +- Comunes para enemigos/jugadores: impactos cortos, estela de golpe, polvo, + particulas de rotura y muerte con trazo y color coherentes. + +La primera entrega de este cambio modifica `effects/combat_fx.gd` (geometria, +capas y paleta de los efectos dibujados por Godot) y **no** los atlas SVG de +personajes/enemigos. Sus efectos siguen siendo de solo presentacion: no hay +colisiones, proyectiles reales, radio adicional ni cambios de dano. + +## Criterios para aceptar la siguiente entrega de arte + +1. Reconocer a Diego, Ivan, Fer y Hector con la referencia a tamano real. +2. Fer no muestra baquetas: lleva bajo durante los especiales cargados. +3. No se percibe ningun personaje o enemigo mayor respecto a los escenarios; + colisiones, pies y altura mantienen su posicion original. +4. Marcha y carrera no deslizan el pie de apoyo y las rodillas no se invierten. +5. Los cinco enemigos pertenecen al mismo universo visual, pero la banda es + mas metalera que ellos. +6. Probar reposo, desplazamiento, salto, punetazo, ground pound, especial, + dano, muerte y transiciones de niveles con los cuatro integrantes. +7. Probar Android en apaisado y escritorio, con el juego en pausa y en combate. +8. Validar que efectos, instrumentos y HUD no obstruyen botones tactiles. + +## Integracion + +- Atlas banda: `assets/characters/band/*.svg` y + `player/characters/animations/*_frames.tres`. +- Atlas enemigos: `assets/enemies/*.svg` y + `enemies/animations/*_frames.tres`. +- Material de efectos procedurales: `effects/combat_fx.gd`. +- Seleccion y personaje: `player/characters/*.tres`, `player/player.tscn`. + +Los generadores `tools/generate_vector_character_art.py` y +`tools/generate_band_art.py` **sobrescriben** los atlas ilustrados actuales; +cuando haya arte definitivo se deben retirar, adaptar o impedir que sobrescriban +los nuevos archivos sin intencion expresa. diff --git a/effects/combat_fx.gd b/effects/combat_fx.gd index 09099ce..8486113 100644 --- a/effects/combat_fx.gd +++ b/effects/combat_fx.gd @@ -1,8 +1,18 @@ class_name CombatFX extends Node2D -## Efectos breves en coordenadas del mundo, compartidos por jugador y enemigos. -## Usan figuras geometricas, sin plugins ni recursos externos de efectos. +## Decorative world-space effects for player and enemies. +## No collisions, timers or damage are changed by this file. +## Colors are shared with the new illustrated-metal art direction: +## dark outlines, warm metallic highlights, controlled saturated accents. + +const OUTLINE = Color(0.07, 0.08, 0.13) +const PALE_GOLD = Color(1.0, 0.90, 0.63) +const DUST_BROWN = Color(0.55, 0.46, 0.39) +const ELECTRIC_BLUE = Color(0.28, 0.65, 0.96) +const ELECTRIC_WHITE = Color(0.85, 0.97, 1.0) +const VOCAL_GOLD = Color(1.0, 0.72, 0.18) +const BASS_PURPLE = Color(0.58, 0.36, 0.87) var kind: StringName = &"hit" var direction: float = 1.0 @@ -11,7 +21,7 @@ var _age: float = 0.0 var _lifetime: float = 0.28 -## Crea un efecto transitorio en coordenadas globales bajo el padre indicado. +## Creates a transient effect at a fixed world position (not parented to an actor). static func spawn(parent: Node, origin: Vector2, effect_kind: StringName, effect_direction: float = 1.0, effect_radius: float = 54.0) -> void: if not is_instance_valid(parent): @@ -24,10 +34,11 @@ static func spawn(parent: Node, origin: Vector2, effect_kind: StringName, effect.global_position = origin -## Selecciona la duracion visual segun el tipo de efecto. func _ready() -> void: z_index = 12 - texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST + # The sprites are illustrated at high resolution; procedural FX should not + # introduce blocky sawtooth edges at the game's 2x camera zoom. + texture_filter = CanvasItem.TEXTURE_FILTER_LINEAR match kind: &"ground_pound", &"electric_pound", &"vocal_dome", &"bass_cracks": _lifetime = 0.60 @@ -39,7 +50,6 @@ func _ready() -> void: _lifetime = 0.32 -## Solicita redibujado hasta agotar la duracion y eliminar el efecto. func _process(delta: float) -> void: _age += delta if _age >= _lifetime: @@ -48,10 +58,9 @@ func _process(delta: float) -> void: queue_redraw() -## Genera el efecto segun su tipo y progreso, sin participar en el calculo de dano. func _draw() -> void: var progress: float = clampf(_age / _lifetime, 0.0, 1.0) - var fade: float = 1.0 - progress + var fade: float = (1.0 - progress) * (1.0 - progress * 0.18) match kind: &"electric_pound": _draw_electric_pound(progress, fade) @@ -66,169 +75,274 @@ func _draw() -> void: &"bass_pulse": _draw_bass_pulse(progress, fade) &"ground_pound": - _draw_ring(lerpf(8.0, radius, progress), 0.24, Color(1.0, 0.72, 0.34, fade), 3.0) - _draw_ring(lerpf(3.0, radius * 0.72, progress), 0.32, Color(1.0, 0.94, 0.68, fade), 2.0) - _draw_debris(progress, 16, Color(0.84, 0.71, 0.56, fade), radius) - # Las grietas permanecen donde ocurrio el impacto, no se desplazan con el jugador. - for side: float in [-1.0, 1.0]: - var crack := PackedVector2Array([ - Vector2(3.0 * side, 0.0), Vector2(14.0 * side, 3.0), - Vector2(22.0 * side, -1.0), Vector2(35.0 * side, 2.0), - Vector2(44.0 * side, 0.0)]) - draw_polyline(crack, Color(1.0, 0.77, 0.4, fade * 0.8), 2.0) + _draw_ground_pound(progress, fade) &"solo": - var wave_radius: float = lerpf(12.0, radius, progress) - _draw_ring(wave_radius, 0.70, Color(0.42, 0.88, 1.0, fade * 0.85), 3.0) - _draw_ring(wave_radius * 0.78, 0.70, Color(0.85, 0.57, 1.0, fade * 0.65), 2.0) - for index: int in range(8): - var angle: float = TAU * float(index) / 8.0 - progress * 0.18 - var point := Vector2(cos(angle), sin(angle) * 0.7) * wave_radius - _draw_note(point.round(), Color(0.95, 0.82, 1.0, fade)) - if progress < 0.35: - _draw_sparks(progress / 0.35, Color(0.75, 0.91, 1.0, fade), 10, 34.0) + _draw_solo(progress, fade) &"dust": - _draw_debris(progress, 7, Color(0.78, 0.76, 0.70, fade * 0.65), 22.0) + _draw_debris(progress, 7, DUST_BROWN, 23.0, fade * 0.7) &"break": - _draw_debris(progress, 14, Color(0.72, 0.5, 0.24, fade), 52.0) - _draw_debris(progress, 6, Color(0.66, 0.68, 0.71, fade), 34.0) + _draw_debris(progress, 14, Color(0.67, 0.42, 0.27), 52.0, fade) + _draw_debris(progress, 6, Color(0.67, 0.67, 0.69), 34.0, fade) &"death": - _draw_sparks(progress, Color(1.0, 0.73, 0.34, fade), 14, 42.0) - _draw_ring(lerpf(4.0, 27.0, progress), 0.80, Color(1.0, 0.89, 0.66, fade), 2.0) + _draw_death(progress, fade) &"swing": - var arc := PackedVector2Array() - for index: int in range(7): - var angle: float = lerpf(-1.1, 1.1, float(index) / 6.0) - arc.append(Vector2(cos(angle) * 16.0 * direction, sin(angle) * 17.0).round()) - draw_polyline(arc, Color(1.0, 0.91, 0.69, fade * 0.9), 2.0) + _draw_swing(progress, fade) _: - _draw_sparks(progress, Color(1.0, 0.84, 0.49, fade), 8, 27.0) - if progress < 0.45: - draw_rect(Rect2(-3, -8, 6, 16), Color(1.0, 0.98, 0.88, fade)) - draw_rect(Rect2(-8, -3, 16, 6), Color(1.0, 0.98, 0.88, fade)) + _draw_hit(progress, fade) -## Aproxima un anillo eliptico con segmentos de estilo pixelado. -func _draw_ring(ring_radius: float, height_ratio: float, color: Color, width: float) -> void: - var points := PackedVector2Array() - for index: int in range(33): - var angle: float = TAU * float(index) / 32.0 - points.append(Vector2(cos(angle) * ring_radius, sin(angle) * ring_radius * height_ratio).round()) - draw_polyline(points, color, width) +func _alpha(color: Color, opacity: float) -> Color: + return Color(color.r, color.g, color.b, clampf(opacity, 0.0, 1.0)) -func _draw_sparks(progress: float, color: Color, count: int, spread: float) -> void: - for index: int in range(count): - var angle: float = float(index) * TAU / float(count) - var axis := Vector2(cos(angle), sin(angle)) - var distance: float = spread * progress - var point: Vector2 = (axis * distance + Vector2(direction * 5.0 * progress, 0)).round() - var tail: Vector2 = (point - axis * (6.0 * (1.0 - progress))).round() - draw_line(tail, point, color, 2.0) +func _stroke(points: PackedVector2Array, outer: Color, inner: Color, + outer_width: float, inner_width: float, fade: float) -> void: + if points.size() < 2: + return + draw_polyline(points, _alpha(outer, fade), outer_width, true) + draw_polyline(points, _alpha(inner, fade), inner_width, true) -## Dibuja fragmentos que se separan del punto de impacto. -func _draw_debris(progress: float, count: int, color: Color, spread: float) -> void: +## An elliptical perspective ring with an ink border and a light upper lip. +func _draw_ring(ring_radius: float, height_ratio: float, color: Color, width: float, + fade: float = 1.0) -> void: + var rim := PackedVector2Array() + var highlight := PackedVector2Array() + for index: int in range(49): + var angle: float = TAU * float(index) / 48.0 + var point := Vector2(cos(angle) * ring_radius, + sin(angle) * ring_radius * height_ratio) + rim.append(point) + if index >= 24 and index <= 48: + highlight.append(point + Vector2(0.0, -0.8)) + _stroke(rim, OUTLINE, color, width + 2.5, width, fade) + if highlight.size() > 2: + draw_polyline(highlight, _alpha(PALE_GOLD, fade * 0.36), 0.8, true) + + +## Stable, non-random debris. Different silhouettes/velocities avoid a square cloud. +func _draw_debris(progress: float, count: int, color: Color, + spread: float, fade: float) -> void: for index: int in range(count): var side: float = -1.0 if index % 2 == 0 else 1.0 - var speed: float = 0.35 + float(index % 5) * 0.16 - var height: float = 10.0 + float(index % 4) * 7.0 - var point := Vector2(side * spread * progress * speed, - -height * sin(progress * PI) - 2.0) - var size: float = 2.0 + float(index % 3) - draw_rect(Rect2(point.round(), Vector2.ONE * size), color) + var speed: float = 0.34 + float(index % 5) * 0.145 + var height: float = 11.0 + float(index % 4) * 7.0 + var x: float = side * spread * progress * speed + var y: float = -height * sin(progress * PI) - 1.5 + var size: float = 1.9 + float(index % 3) * 0.75 + var point := Vector2(x, y) + var fragment := PackedVector2Array([ + point + Vector2(-size, 0.0), + point + Vector2(size * 0.20, -size * 1.3), + point + Vector2(size, size * 0.35), + point + Vector2(-size * 0.25, size * 0.85)]) + draw_colored_polygon(fragment, _alpha(color, fade)) + fragment.append(fragment[0]) + draw_polyline(fragment, _alpha(OUTLINE, fade * 0.72), 1.0, true) -## Dibuja una nota musical geometrica sin depender de una fuente. -func _draw_note(point: Vector2, color: Color) -> void: - draw_rect(Rect2(point, Vector2(5, 4)), color) - draw_rect(Rect2(point + Vector2(4, -10), Vector2(2, 13)), color) - draw_rect(Rect2(point + Vector2(6, -10), Vector2(5, 3)), color) +func _draw_sparks(progress: float, color: Color, count: int, + spread: float, fade: float) -> void: + for index: int in range(count): + var angle: float = TAU * (float(index) + 0.18 * float(index % 3)) / float(count) + var axis := Vector2(cos(angle), sin(angle)) + var distance: float = spread * progress * (0.68 + float(index % 4) * 0.11) + var point: Vector2 = axis * distance + Vector2(direction * 4.0 * progress, 0.0) + var tail: Vector2 = point - axis * (3.0 + 7.0 * (1.0 - progress)) + _stroke(PackedVector2Array([tail, point]), OUTLINE, color, 3.3, 1.7, fade) + if index % 3 == 0: + draw_circle(point, 1.1, _alpha(PALE_GOLD, fade)) -## Diego: descarga al suelo y rayos ramificados, sin nuevas zonas de dano. +## Curved eighth note: deliberately not a blocky 5x4 sprite. +func _draw_note(point: Vector2, color: Color, fade: float) -> void: + draw_set_transform(point, -0.18, Vector2.ONE) + draw_circle(Vector2(-2.0, 3.0), 3.1, _alpha(OUTLINE, fade)) + draw_circle(Vector2(-1.9, 2.9), 2.1, _alpha(color, fade)) + _stroke(PackedVector2Array([Vector2(0.1, 2.0), Vector2(0.1, -10.0), + Vector2(5.7, -8.0), Vector2(7.2, -4.1)]), OUTLINE, color, 2.4, 1.1, fade) + draw_set_transform(Vector2.ZERO, 0.0, Vector2.ONE) + + +func _draw_hit(progress: float, fade: float) -> void: + var scale: float = 0.45 + progress * 0.9 + var center := Vector2(direction * 5.0 * progress, 0.0) + var burst := PackedVector2Array() + for index: int in range(16): + var angle: float = TAU * float(index) / 16.0 + var length: float = (12.0 if index % 2 == 0 else 4.7) * scale + burst.append(center + Vector2(cos(angle), sin(angle)) * length) + draw_colored_polygon(burst, _alpha(Color(0.98, 0.60, 0.24), fade * 0.9)) + burst.append(burst[0]) + draw_polyline(burst, _alpha(OUTLINE, fade), 2.2, true) + draw_circle(center, 3.9 * scale, _alpha(PALE_GOLD, fade)) + _draw_sparks(progress, PALE_GOLD, 9, 27.0, fade) + + +func _draw_death(progress: float, fade: float) -> void: + _draw_sparks(progress, Color(1.0, 0.43, 0.30), 12, 37.0, fade) + _draw_debris(progress, 8, Color(0.48, 0.26, 0.33), 39.0, fade) + _draw_ring(lerpf(4.0, 25.0, progress), 0.82, + Color(1.0, 0.72, 0.43), 2.4, fade) + + +func _draw_swing(progress: float, fade: float) -> void: + var outer := PackedVector2Array() + var inner := PackedVector2Array() + for index: int in range(16): + var angle: float = lerpf(-1.05, 1.02, float(index) / 15.0) + progress * 0.42 + outer.append(Vector2(cos(angle) * 22.0 * direction, + sin(angle) * 21.0)) + inner.append(Vector2(cos(angle) * 15.0 * direction, + sin(angle) * 15.0)) + _stroke(outer, OUTLINE, PALE_GOLD, 5.0, 2.9, fade) + draw_polyline(inner, _alpha(Color(1.0, 0.50, 0.26), fade * 0.8), 1.6, true) + + +func _draw_ground_pound(progress: float, fade: float) -> void: + var reach: float = lerpf(8.0, radius, sqrt(progress)) + _draw_ring(reach, 0.25, Color(1.0, 0.61, 0.28), 3.1, fade) + _draw_ring(reach * 0.74, 0.30, PALE_GOLD, 1.7, fade * 0.7) + _draw_debris(progress, 16, Color(0.75, 0.59, 0.45), radius, fade) + for side: float in [-1.0, 1.0]: + var fissure := PackedVector2Array([ + Vector2(3.0 * side, 1.0), Vector2(13.0 * side, 3.0), + Vector2(23.0 * side, -1.0), Vector2(36.0 * side, 2.0), + Vector2(46.0 * side, 0.0)]) + _stroke(fissure, OUTLINE, Color(0.92, 0.62, 0.39), 4.2, 1.4, fade * 0.9) + + +func _draw_solo(progress: float, fade: float) -> void: + var reach: float = lerpf(12.0, radius, progress) + _draw_ring(reach, 0.68, Color(0.37, 0.80, 1.0), 3.0, fade) + _draw_ring(reach * 0.80, 0.68, Color(0.80, 0.49, 0.94), 1.7, fade * 0.8) + for index: int in range(9): + var angle: float = TAU * float(index) / 9.0 - progress * 0.22 + var point := Vector2(cos(angle), sin(angle) * 0.7) * reach + _draw_note(point, Color(0.89, 0.83, 1.0), fade) + if progress < 0.48: + _draw_sparks(progress / 0.48, ELECTRIC_WHITE, 12, 35.0, fade) + + +## Diego: lightning branches and a hot contact halo, all purely decorative. func _draw_electric_pound(progress: float, fade: float) -> void: var reach: float = lerpf(10.0, radius, sqrt(progress)) - _draw_ring(reach, 0.27, Color(0.30, 0.80, 1.0, fade), 3.0) + _draw_ring(reach, 0.27, ELECTRIC_BLUE, 3.2, fade) + _draw_ring(reach * 0.82, 0.31, ELECTRIC_WHITE, 1.1, fade * 0.6) for index: int in range(9): var angle: float = PI + PI * float(index) / 8.0 var axis := Vector2(cos(angle), sin(angle) * 0.72) var normal := Vector2(-axis.y, axis.x) var bolt := PackedVector2Array([Vector2.ZERO]) - for step: int in range(1, 6): - var fraction: float = float(step) / 5.0 - var zigzag: float = (-1.0 if (step + index) % 2 == 0 else 1.0) * 5.0 - bolt.append((axis * reach * fraction + normal * zigzag).round()) - draw_polyline(bolt, Color(0.20, 0.65, 1.0, fade * 0.72), 5.0) - draw_polyline(bolt, Color(0.82, 0.98, 1.0, fade), 1.0) - var fork: Vector2 = bolt[3] + normal * (10.0 + progress * 8.0) - draw_line(bolt[2], fork.round(), Color(0.48, 0.88, 1.0, fade), 2.0) + for step: int in range(1, 7): + var fraction: float = float(step) / 6.0 + var jitter: float = (-1.0 if (step + index) % 2 == 0 else 1.0) * (3.7 + step * 0.25) + bolt.append(axis * reach * fraction + normal * jitter) + _stroke(bolt, OUTLINE, ELECTRIC_BLUE, 6.2, 3.3, fade * 0.9) + draw_polyline(bolt, _alpha(ELECTRIC_WHITE, fade), 1.25, true) + var fork := PackedVector2Array([bolt[3], bolt[4] + normal * 8.0, + bolt[5] + normal * 14.0]) + _stroke(fork, OUTLINE, ELECTRIC_WHITE, 3.0, 1.2, fade * 0.85) + _draw_sparks(progress, ELECTRIC_WHITE, 11, radius * 0.45, fade * 0.8) -## Hector: semicupula amarilla transparente que crece desde el punto de aterrizaje. +## Hector: layered transparent sound dome, not an additional damage area. func _draw_vocal_dome(progress: float, fade: float) -> void: var reach: float = lerpf(5.0, radius, sqrt(progress)) var dome := PackedVector2Array() - for index: int in range(33): - var angle: float = PI + PI * float(index) / 32.0 - var point := Vector2(cos(angle) * reach, sin(angle) * reach * 0.85).round() - # Evita vertices consecutivos iguales al redondear una cupula aun pequena. - if dome.is_empty() or dome[dome.size() - 1] != point: - dome.append(point) - draw_colored_polygon(dome, Color(1.0, 0.83, 0.14, fade * 0.20)) - draw_polyline(dome, Color(1.0, 0.91, 0.40, fade * 0.95), 3.0) - _draw_ring(reach, 0.16, Color(1.0, 0.78, 0.12, fade * 0.8), 2.0) + for index: int in range(49): + var angle: float = PI + PI * float(index) / 48.0 + dome.append(Vector2(cos(angle) * reach, sin(angle) * reach * 0.85)) + draw_colored_polygon(dome, _alpha(VOCAL_GOLD, fade * 0.14)) + _stroke(dome, OUTLINE, Color(1.0, 0.85, 0.34), 5.4, 2.7, fade) + for ratio: float in [0.42, 0.73]: + var seam := PackedVector2Array() + for index: int in range(25): + var angle: float = PI + PI * float(index) / 24.0 + seam.append(Vector2(cos(angle) * reach * ratio, + sin(angle) * reach * ratio * 0.85)) + draw_polyline(seam, _alpha(PALE_GOLD, fade * 0.24), 1.1, true) + _draw_ring(reach, 0.16, VOCAL_GOLD, 2.3, fade) -## Fer: fracturas cortas que quedan ancladas al punto de impacto y luego desaparecen. -## No se modifica el TileMap, ni la colision, ni se conserva dano visual del escenario. +## Fer: inked floor fissures and violet resonant dust; no TileMap writes. func _draw_bass_cracks(progress: float, fade: float) -> void: var growth: float = minf(progress * 4.0, 1.0) for side: float in [-1.0, 1.0]: for branch: int in range(3): var crack := PackedVector2Array([Vector2.ZERO]) - for step: int in range(1, 6): - var x: float = side * radius * float(step) / 5.0 * growth - var y: float = float(branch - 1) * float(step) * 2.0 - y += 3.0 if (branch + step) % 2 == 0 else -3.0 - crack.append(Vector2(x, y).round()) - draw_polyline(crack, Color(0.08, 0.06, 0.14, fade), 5.0) - draw_polyline(crack, Color(0.68, 0.50, 0.93, fade * 0.7), 1.0) - var split: Vector2 = crack[3] + Vector2(side * 10.0, -10.0) - draw_line(crack[2], split, Color(0.12, 0.09, 0.20, fade), 3.0) - _draw_debris(progress, 12, Color(0.57, 0.52, 0.64, fade), radius * 0.7) + for step: int in range(1, 7): + var x: float = side * radius * float(step) / 6.0 * growth + var y: float = float(branch - 1) * float(step) * 1.8 + y += 3.4 if (branch + step) % 2 == 0 else -3.4 + crack.append(Vector2(x, y)) + _stroke(crack, OUTLINE, BASS_PURPLE, 6.0, 1.8, fade) + var fork := PackedVector2Array([crack[3], + crack[4] + Vector2(side * 3.0, -6.0), + crack[4] + Vector2(side * 9.0, -12.0)]) + _stroke(fork, OUTLINE, Color(0.85, 0.72, 1.0), 3.0, 1.1, fade) + _draw_debris(progress, 12, Color(0.61, 0.54, 0.67), radius * 0.7, fade) + _draw_ring(lerpf(4.0, radius * 0.7, progress), 0.18, + Color(0.68, 0.48, 0.94), 1.8, fade * 0.65) -## Hector: frentes de sonido concentricos; el grito sigue usando el dano de area comun. +## Hector: successive broad, hand-inked sound wavefronts. func _draw_vocal_wave(progress: float, fade: float) -> void: var reach: float = lerpf(9.0, radius, progress) for index: int in range(3): - var ratio: float = 1.0 - float(index) * 0.19 - _draw_ring(reach * ratio, 0.85, Color(1.0, 0.86, 0.25, fade * (0.85 - float(index) * 0.16)), 3.0) + var ratio: float = 1.0 - float(index) * 0.18 + _draw_ring(reach * ratio, 0.82, + Color(1.0, 0.86 - float(index) * 0.07, 0.29), 3.0, + fade * (0.92 - float(index) * 0.18)) + for index: int in range(15): + var angle: float = TAU * float(index) / 15.0 + var axis := Vector2(cos(angle), sin(angle) * 0.82) + var start: Vector2 = axis * reach * 0.87 + var tip: Vector2 = axis * (reach + 5.0 + float(index % 3) * 2.4) + _stroke(PackedVector2Array([start, tip]), OUTLINE, PALE_GOLD, + 3.7, 1.5, fade * 0.67) -## Ivan: platos que vuelan y giran en todas direcciones. Son dibujo, no proyectiles. -## El dano lo aplica Player una sola vez por pulso, nunca por contacto con estos platos. +## Ivan: rimmed cymbals with highlights and movement trails. No projectiles. func _draw_drum_cymbals(progress: float, fade: float) -> void: for index: int in range(10): var angle: float = TAU * float(index) / 10.0 var travel: float = lerpf(14.0, radius, progress) var point := Vector2(cos(angle), sin(angle) * 0.78) * travel - var wobble: float = 0.30 + absf(sin(progress * TAU * 2.0 + angle)) * 0.35 - draw_set_transform(point.round(), angle + progress * 5.0, Vector2(1.0, wobble)) - draw_circle(Vector2.ZERO, 12.0, Color(0.34, 0.21, 0.06, fade)) - draw_circle(Vector2.ZERO, 10.0, Color(0.92, 0.65, 0.17, fade)) - _draw_ring(8.0, 1.0, Color(1.0, 0.89, 0.45, fade), 1.0) - draw_circle(Vector2.ZERO, 3.0, Color(1.0, 0.94, 0.65, fade)) - draw_circle(Vector2.ZERO, 1.0, Color(0.20, 0.15, 0.05, fade)) + var wobble: float = 0.32 + absf(sin(progress * TAU * 1.8 + angle)) * 0.26 + draw_set_transform(point, angle + progress * 4.0, Vector2(1.0, wobble)) + var outer := PackedVector2Array() + for step: int in range(33): + var theta: float = TAU * float(step) / 32.0 + outer.append(Vector2(cos(theta) * 12.0, sin(theta) * 12.0)) + draw_colored_polygon(outer, _alpha(Color(0.91, 0.63, 0.22), fade)) + draw_polyline(outer, _alpha(OUTLINE, fade), 2.4, true) + _draw_ring(9.0, 1.0, Color(1.0, 0.85, 0.44), 1.4, fade) + draw_circle(Vector2.ZERO, 3.5, _alpha(Color(0.40, 0.27, 0.12), fade)) + draw_circle(Vector2(-0.7, -0.7), 1.5, _alpha(PALE_GOLD, fade)) + draw_line(Vector2(-6.0, -5.5), Vector2(1.0, -8.0), + _alpha(PALE_GOLD, fade * 0.9), 1.4, true) draw_set_transform(Vector2.ZERO, 0.0, Vector2.ONE) + if index % 2 == 0: + var trail := PackedVector2Array([ + point - Vector2(cos(angle), sin(angle) * 0.78) * 8.0, + point - Vector2(cos(angle), sin(angle) * 0.78) * 17.0]) + draw_polyline(trail, _alpha(Color(1.0, 0.84, 0.48), fade * 0.48), 1.6, true) -## Fer: ondas graves gruesas. La vibracion de camara se sincroniza con estos pulsos. +## Fer: thick low-frequency pulses with visible harmonic strings. func _draw_bass_pulse(progress: float, fade: float) -> void: var reach: float = lerpf(8.0, radius, progress) - _draw_ring(reach, 0.65, Color(0.64, 0.42, 0.97, fade * 0.65), 7.0) - _draw_ring(reach * 0.83, 0.65, Color(0.91, 0.76, 1.0, fade * 0.8), 2.0) - for index: int in range(8): - var angle: float = TAU * float(index) / 8.0 - var point := Vector2(cos(angle), sin(angle) * 0.65) * reach - _draw_note(point.round(), Color(0.83, 0.66, 1.0, fade)) + _draw_ring(reach, 0.63, BASS_PURPLE, 5.4, fade * 0.82) + _draw_ring(reach * 0.84, 0.65, Color(0.92, 0.77, 1.0), 2.1, fade * 0.9) + for index: int in range(6): + var angle: float = TAU * float(index) / 6.0 + var axis := Vector2(cos(angle), sin(angle) * 0.63) + var point: Vector2 = axis * reach + _draw_note(point, Color(0.86, 0.73, 1.0), fade) + var line := PackedVector2Array() + for step: int in range(8): + var r: float = reach * (0.50 + float(step) * 0.060) + var offset: float = sin(float(step) * PI * 0.6 + progress * TAU * 2.0) * 2.2 + line.append(axis * r + Vector2(-axis.y, axis.x) * offset) + draw_polyline(line, _alpha(Color(0.78, 0.54, 1.0), fade * 0.65), 1.6, true) diff --git a/tests/test_combat_fx_style_resources.py b/tests/test_combat_fx_style_resources.py new file mode 100644 index 0000000..4788d3d --- /dev/null +++ b/tests/test_combat_fx_style_resources.py @@ -0,0 +1,46 @@ +"""Checks the FX-only art pass without requiring the Godot editor.""" +from pathlib import Path +import re +import unittest + +ROOT = Path(__file__).resolve().parents[1] +FX = ROOT / "effects/combat_fx.gd" +BRIEF = ROOT / "docs/direccion_arte_referencia_2026.md" + + +class CombatFXArtPassTests(unittest.TestCase): + def test_shared_effect_stays_visual_only(self): + source = FX.read_text(encoding="utf-8") + self.assertIn("extends Node2D", source) + self.assertIn("static func spawn", source) + self.assertIn("queue_free()", source) + for disallowed in ("Area2D.new", "CollisionShape2D.new", "apply_damage(", + "take_damage(", "set_collision_layer_value("): + self.assertNotIn(disallowed, source) + for actor in ("player/player.gd", "enemies/walker/walker.gd"): + self.assertIn('res://effects/combat_fx.gd', + (ROOT / actor).read_text(encoding="utf-8")) + + def test_existing_fx_names_and_signature_are_retained(self): + source = FX.read_text(encoding="utf-8") + for effect in ("hit", "swing", "dust", "death", "break", "solo", + "ground_pound", "electric_pound", "vocal_dome", + "bass_cracks", "vocal_wave", "drum_cymbals", "bass_pulse"): + self.assertRegex(source, rf'&"{re.escape(effect)}"') + self.assertIn("effect_radius: float = 54.0", source) + self.assertIn("effect.global_position = origin", source) + + def test_reference_mapping_is_documented_without_claiming_new_sprites(self): + brief = BRIEF.read_text(encoding="utf-8") + for name, role in (("Diego", "guitarist"), ("Ivan", "drummer"), + ("Fer", "bassist"), ("Hector", "singer")): + self.assertIn(name, brief) + self.assertIn(f"`{role}`", brief) + self.assertIn("**bajo, no baquetas**", brief) + self.assertIn("**no** los atlas SVG", brief) + self.assertIn("**26x52**", brief) + self.assertIn("**28x52**", brief) + + +if __name__ == "__main__": + unittest.main()