From 6a267b2cf48e9126c20adce972aa5a0e4917b8f8 Mon Sep 17 00:00:00 2001 From: Diego De la Viuda Llorente Date: Mon, 9 Nov 2026 14:58:36 +0100 Subject: [PATCH] Menus de muerte pausa y personajes renovados --- README.md | 124 +- assets/characters/band/README.md | 32 +- assets/characters/band/bassist.svg | 2836 ++++++++++++----- assets/characters/band/drummer.svg | 2578 +++++++++++---- assets/characters/band/guitarist.svg | 2509 +++++++++++---- assets/characters/band/singer.svg | 2640 +++++++++++---- assets/enemies/backstage_guard.svg | 783 ++++- assets/enemies/feedback_tech.svg | 815 ++++- assets/enemies/pogo_fan.svg | 815 ++++- assets/enemies/rival_guitarist.svg | 877 ++++- assets/enemies/roadie.svg | 799 ++++- docs/architecture.md | 22 +- docs/characters.md | 14 +- docs/design_vision.md | 81 +- docs/level_00.md | 12 +- docs/level_01.md | 4 +- docs/level_design.md | 25 +- docs/pausa_resultados_y_arte.md | 77 + docs/project_status.md | 23 +- docs/rare_items_and_breakables.md | 8 +- docs/start_menu.md | 40 +- docs/tuning.md | 7 +- .../animations/backstage_guard_frames.tres | 116 + enemies/animations/feedback_tech_frames.tres | 116 + enemies/animations/pogo_fan_frames.tres | 116 + .../animations/rival_guitarist_frames.tres | 116 + enemies/animations/roadie_frames.tres | 116 + enemies/variants/backstage_guard.tscn | 4 +- enemies/variants/feedback_tech.tscn | 4 +- enemies/variants/pogo_fan.tscn | 4 +- enemies/variants/rival_guitarist.tscn | 4 +- enemies/variants/roadie.tscn | 4 +- enemies/walker/walker.gd | 29 +- enemies/walker/walker.tscn | 8 +- game/run_session.gd | 3 + levels/level_00.gd | 15 +- levels/level_root.gd | 16 +- pickups/pickup.gd | 2 +- player/player.gd | 17 +- player/player.tscn | 2 +- tests/test_band_resources.py | 28 +- tests/test_level_01_resources.py | 2 +- tests/test_menu_resources.py | 11 +- tests/test_menu_runtime.gd | 30 +- tests/test_pause_result_runtime.gd | 100 + tests/test_pixel_combat_resources.py | 4 +- tests/test_pixel_combat_runtime.gd | 2 +- tests/test_rare_items_resources.py | 3 +- tools/generate_band_art.py | 386 +-- tools/generate_vector_character_art.py | 430 +++ ui/menu/level_navigation.gd | 255 +- ui/menu/level_navigation.tscn | 122 +- ui/menu/main_menu.gd | 6 +- world/triggers/level_exit.gd | 11 +- 54 files changed, 14033 insertions(+), 3170 deletions(-) create mode 100644 docs/pausa_resultados_y_arte.md create mode 100644 enemies/animations/backstage_guard_frames.tres create mode 100644 enemies/animations/feedback_tech_frames.tres create mode 100644 enemies/animations/pogo_fan_frames.tres create mode 100644 enemies/animations/rival_guitarist_frames.tres create mode 100644 enemies/animations/roadie_frames.tres create mode 100644 tests/test_pause_result_runtime.gd create mode 100644 tools/generate_vector_character_art.py diff --git a/README.md b/README.md index 0409829..5fe0731 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,120 @@ Plataformas y accion 2D sobre una banda de thrash metal, en Godot. Un solo `Player` utiliza cuatro recursos `CharacterData`; los escenarios se montan con piezas reutilizables desde el editor. -**Estado: prototipo con intro, menu, cuatro personajes elegibles, coleccion permanente y construccion visual de niveles.** -Hay movimiento, combate, enemigos, objetos y HUD. Todavia no hay campana, +**Estado (revision del ZIP, 9 de noviembre de 2026): base implementada en escenas y scripts, no version jugable validada.** +Hay intro, menu, cuatro personajes, movimiento, combate, enemigos, objetos, +HUD, dos niveles y construccion visual de escenarios. Tambien existe guardado +local de raros confirmados al terminar un nivel. Todavia no hay campana, guardado de campana, pausa, audio, bosses ni pantallas completas de victoria/derrota. -Si existe guardado local de objetos raros confirmados al terminar un nivel. Al elegir un nivel aparece una **cuadricula 2x2**: Diego, Ivan, Fer y Hector. Se escoge antes de cargar; morir conserva la eleccion. Sus ataques tienen la misma logica, dano, alcance y tiempos: solo cambian aspecto y efectos visuales. [Tareas y decisiones](docs/design_vision.md) · [Estado y validacion](docs/project_status.md). +## Revision para cerrar lo basico (9 de noviembre de 2026) + +Esta es una **foto de situacion del proyecto incluido en el ZIP**, no una +certificacion de que ya se pueda jugar de principio a fin. El backlog activo y +sus decisiones siguen en [la guia maestra](docs/design_vision.md); esta seccion +ordena los pasos para cerrar una **primera demo jugable**, antes de ampliar +contenido. "Implementado" significa que existen recursos, escenas y codigo; +**no significa probado en Godot ni en un telefono**. + +### Que hay y que falta + +| Area | Estado contrastado en el proyecto | Falta para cerrar la base | +|---|---|---| +| Inicio y navegacion | Intro saltable, menu, niveles descubiertos automaticamente, selector 2x2 y carga de escena | Verificar F5/F6, errores de carga, foco, retornos y botones reales | +| Jugador y combate | Un Player, cuatro apariencias, doble salto, punetazo, Ground Pound, especial y HUD | Recorrer los mapas, verificar colisiones/impactos y afinar sensacion y balance | +| Enemigos y objetos | Cinco variantes Walker, 17 objetos y drops; mejoras temporales y hasta golpe | Probar IA, encuentros, recogidas, escudo, duraciones y legibilidad | +| Escenarios | Level00: beta horizontal con 29 enemigos y 14 objetos; Level01: vertical con 12 y 14; kit y plantilla reutilizables | Verificar que ambos son terminables sin mejoras obligatorias y ajustar camara y saltos | +| Salida y derrota | Salida reutilizable al menu; Level00 confirma y reinicia tras 9 s; muerte recarga automaticamente | Unificar victoria/derrota, reintentar y salir con un flujo claro | +| Raros y rompibles | Coleccion local, Pua Perdida +20% especial, recompensa de meta y barriles rompibles | Probar persistencia y drops; situar/conceder al menos un raro para hacerlo obtenible | +| Pausa, ajustes y sonido | No hay pausa, opciones de volumen ni archivos de audio de juego | Implementar lo minimo de pausa, sonido y control de volumen | +| Android | Preset arm64, controles tactiles, script y workflow de exportacion | Exportar, instalar, abrir y probar en un dispositivo; revisar orientacion y disposicion | +| Campana | Selector libre de niveles de prueba; no hay desbloqueos ni progreso de niveles | **No es requisito de esta demo**; definir despues de cerrar el bucle basico | + +### Orden recomendado de cierre + +**P0 - Antes de considerar estable la demo** + +- [ ] **QA del motor:** importar con Godot 4.7, ejecutar las once suites + `test_*_runtime.gd` mediante `tools/run_checks.py --godot ...` y + resolver errores de importacion, GDScript, recursos y fisica. +- [ ] **Recorrido real de los dos mapas:** F5 desde la intro, seleccion y carga; + F6 desde editor; avanzar hasta la meta, morir, caer, reintentar y volver + al menu. Probar los cuatro personajes, enemigos, HUD y objetos, primero + con teclado y despues con tacto. Registrar bloqueos y errores reproducibles. +- [ ] **Ciclo de victoria y derrota:** decidir y unificar el resultado, con + opciones claras de REINTENTAR / MENU. Hoy la muerte recarga sola, + Level00 vuelve a empezar a los 9 s y Level01 termina en el menu. + Evitar transiciones dobles (por ejemplo, muerte y meta en el mismo instante) + sin perder los raros pendientes ni romper la ejecucion directa con F6. +- [ ] **Pausa util:** pausar/reanudar, reintentar y abandonar deliberadamente; + detener simulacion, enemigos y relojes de mejoras mientras esta pausado. + Actualmente MENU/Escape abandona el nivel, **no** lo pausa. +- [ ] **Reglas visuales y balance comunes:** elegir resolucion/orientacion de + referencia y normalizar el radio del especial (290 en Level00/01 frente + a 100000 en Player/plantilla, aunque haya filtro por pantalla). + Comprobar zoom, camara y dano antes de retocar la dificultad. +- [ ] **APK real:** ejecutar la exportacion de Android e instalar la APK; + probar arranque desde el lanzador, botones simultaneos, bordes de pantalla, + orientacion, legibilidad, fluidez, atras y cambios de escena. + Revisar `package/show_as_launcher_app=false` en `export_presets.cfg`: + no dar por comprobado el acceso desde el lanzador. + +**P1 - Para que la demo ya se sienta completa antes del pulido fino** + +- [ ] **Audio minimo:** musica propia o autorizada y efectos de golpe, recogida, + dano, muerte y especial; ajustar volumen de musica/efectos y su pausa. + Los instrumentos, gritos y solo actuales son solo visuales. +- [ ] **Hacer visible la coleccion rara:** colocar la Pua Perdida en una ruta + alcanzable o concederla mediante `Completion Rewards`, y comprobar + ganar/morir/abandonar/reabrir/duplicados. Al hacerlo, actualizar la prueba + `test_rare_not_placed_in_any_existing_map`, que hoy exige que no haya + raros colocados ni premios en los niveles. +- [ ] **Usabilidad y dificultad:** revisar las indicaciones de controles, + HUD y avisos, tamano/posicion tactil, respuesta de ataques y camara. + Ajustar los dos recorridos por separado tras jugarlos sin buffs. +- [ ] **Elegir el escenario de referencia de la demo:** tratar Level00 como + beta/laboratorio y, si el recorrido se valida, Level01 como candidato a + experiencia corta completa. Esto es una **propuesta**, no una decision + de campana ni una retirada de Level00. + +**P2 - Dejar fuera del cierre basico** + +Campana por canciones y capitulos, orden/desbloqueo de niveles, guardado de +campana, bosses, enemigos con nuevas mecanicas, eventos narrativos, nuevos raros, +arte final y nueva intro. Abordarlos despues de tener una demo estable; no crear +ahora managers ni un sistema de progresion que todavia no se necesita. + +**Criterio de salida:** poder abrir el juego, elegir integrante, jugar un +recorrido completo, ganar o perder con un resultado comprensible, reintentar o +salir, pausar sin que avance el juego y hacerlo en Android sin bloqueos de +entrada o presentacion. Las once suites del motor y una partida manual en +escritorio y dispositivo deben quedar registradas como evidencia. La campana y +los bosses no condicionan este hito. + +### Riesgos y notas de la revision + +- **Validacion pendiente:** las 87 pruebas estaticas se han repetido y pasan; + las 11 suites Godot existen, pero **no se han ejecutado en esta revision** por + no disponer del ejecutable. Tampoco se ha exportado ni probado una APK. + Los contratos de texto no prueban el juego ni el tacto real. +- **Transiciones separadas:** Player gestiona la recarga al morir, LevelRoot la + caida, la meta de Level00 su reinicio y LevelExit el regreso al menu. Es + deuda de flujo a resolver al introducir pantallas de resultado; no se afirma + que ya provoque fallos. +- **Configuracion de pantalla:** `project.godot` define stretch, pero no una + resolucion/orientacion de referencia explicita. El comportamiento final + del HUD, la camara y el alcance del especial debe contrastarse en dispositivo. +- **Deuda documental, sin modificar aqui:** `docs/items.md` aun conserva una + tabla antigua que llama pendiente a la Pua Perdida, aunque el sistema y su + recurso estan implementados. `docs/validation_static.txt` recoge 37 tests + historicos, no las 87 pruebas actuales. La fuente del backlog sigue siendo + `docs/design_vision.md`. + ## Abrir y jugar Abre `project.godot` y deja importar los recursos. El proyecto declara @@ -178,11 +282,11 @@ El segundo comando importa el proyecto y ejecuta las once suites `*_runtime.gd`. En Windows, indica la ruta del ejecutable de consola entre comillas. El runner y las pruebas estaticas solo requieren la biblioteca estandar de Python. -**87 pruebas estaticas superadas en esta entrega.** La comprobacion jugable -y visual corresponde a las pruebas locales del autor. -Las once suites usan perfiles de prueba aislados y estan preparadas; tampoco se ha -exportado una APK ni probado el tacto real. Los contratos de texto/geometria -no certifican GDScript, fisica, recorrido jugable ni presentacion en pantalla. +**87 pruebas estaticas superadas de nuevo en la revision del 9 de noviembre de +2026.** La comprobacion jugable y visual sigue pendiente de la validacion local. +Las once suites usan perfiles de prueba aislados y estan preparadas, pero aqui +no se han ejecutado; tampoco se ha exportado una APK ni probado el tacto +real. Los contratos de texto/geometria no certifican GDScript, fisica, recorrido jugable ni presentacion en pantalla. Se conservan preset Android arm64, `scripts/export_android_debug.sh` y workflow Gitea. El preset incluye todos los recursos, necesario para descubrir escenas al @@ -204,5 +308,5 @@ git diff --stat ``` Guarda tus cambios antes. Si el check falla, revisa el contexto en vez de forzarlo. -`README_LEVEL_KIT.md`, `LEVEL_KIT_MANIFEST.json` y los informes antiguos son -historicos; sus rutas, hashes y cifras no describen toda la version actual. +`README_LEVEL_KIT.md`, `docs/LEVEL_KIT_MANIFEST.json` y los informes antiguos +son historicos; sus rutas, hashes y cifras no describen toda la version actual. diff --git a/assets/characters/band/README.md b/assets/characters/band/README.md index 091f0b1..1e921bd 100644 --- a/assets/characters/band/README.md +++ b/assets/characters/band/README.md @@ -1,15 +1,25 @@ -# Atlas de la banda +# Arte de la banda — vectorial con ADN pixel-art -Cuatro SVG autocontenidos, de 512 x 320, con celdas de 64 x 64. Derivan del arte -pixelado ya presente en `../ankarde/player_pixel.svg`. No incorporan imagenes -externas, fuentes ni dependencias durante la partida. +Los cuatro SVG de esta carpeta contienen **40 fotogramas en celdas de 64 × 64** +(atlas 512 × 320). Se ha abandonado el arte de rectangulos puros en favor de +contornos redondeados, paleta corta, sombras y brillos con planos de color. +Aparecen piernas con rodilla/tobillo, contacto de ambos pies en la marcha, +contrabalanceo de brazos y distintas poses para salto, dano, ataques y solo. -Los SpriteFrames estan en `player/characters/animations/`. Diego conserva las -celdas previas salvo ground_pound; los otros integrantes adaptan pelo/ropa y -las poses de ataques propias. Todos mantienen tiempos y cajas fisicas comunes. +- Diego: chaqueta granate, melena oscura y guitarra roja. +- Ivan: banda roja, vestuario azul y baquetas. +- Fer: pelo largo, prendas moradas y bajo verde. +- Hector: cresta rubia, verde oscuro y microfono. -Para editar manualmente, modifica SVG/SpriteFrames y conserva sus regiones. -La utilidad `tools/generate_band_art.py` regenera ambos (requiere Pillow), -sobrescribiendo el arte de esta carpeta. No es parte del arranque del juego. +No se alteran vida, dano, velocidad, colisiones ni los tiempos del punetazo. +`player/characters/animations/*_frames.tres` contiene los fotogramas existentes; +`player/player.gd` adapta la velocidad visual de marcha a la velocidad real. +El Sprite2D usa filtrado lineal: no son pixels gigantes dibujados con nearest. -Documentacion de comportamiento: `docs/characters.md`. +**Fuente para regenerar:** `python tools/generate_vector_character_art.py` +(solo biblioteca estandar). `python tools/generate_band_art.py` es un alias. +Regenerar sobrescribe estos SVG y tambien los atlas/recursos de los enemigos; +si haces retoques manuales, guarda los cambios antes de ejecutar el generador. + +El motor carga los SVG y SpriteFrames versionados, no invoca Python ni depende +de archivos o fuentes externos durante la partida. diff --git a/assets/characters/band/bassist.svg b/assets/characters/band/bassist.svg index 2a2a652..6d4d1d8 100644 --- a/assets/characters/band/bassist.svg +++ b/assets/characters/band/bassist.svg @@ -1,790 +1,2208 @@ - -bassist: band member animations - + +Fer · Bajo · ilustración vectorial animada + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/characters/band/drummer.svg b/assets/characters/band/drummer.svg index 2cc9889..e17f96c 100644 --- a/assets/characters/band/drummer.svg +++ b/assets/characters/band/drummer.svg @@ -1,736 +1,2004 @@ - -drummer: band member animations - + +Iván · Batería · ilustración vectorial animada + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/characters/band/guitarist.svg b/assets/characters/band/guitarist.svg index ff66f91..796c1e6 100644 --- a/assets/characters/band/guitarist.svg +++ b/assets/characters/band/guitarist.svg @@ -1,663 +1,2008 @@ - -guitarist: band member animations - + +Diego · Guitarra · ilustración vectorial animada + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/characters/band/singer.svg b/assets/characters/band/singer.svg index fe2e2ce..be375d5 100644 --- a/assets/characters/band/singer.svg +++ b/assets/characters/band/singer.svg @@ -1,689 +1,2113 @@ - -singer: band member animations - + +Héctor · Voz · ilustración vectorial animada + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/enemies/backstage_guard.svg b/assets/enemies/backstage_guard.svg index 3df87b2..74fe208 100644 --- a/assets/enemies/backstage_guard.svg +++ b/assets/enemies/backstage_guard.svg @@ -1,4 +1,781 @@ - -Guardia de camerino - + +Guarda · ilustración vectorial animada + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/enemies/feedback_tech.svg b/assets/enemies/feedback_tech.svg index 15a22b1..29d730d 100644 --- a/assets/enemies/feedback_tech.svg +++ b/assets/enemies/feedback_tech.svg @@ -1,4 +1,813 @@ - -Tecnico del feedback - + +Técnico de feedback · ilustración vectorial animada + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/enemies/pogo_fan.svg b/assets/enemies/pogo_fan.svg index 7f7a152..2bdaa6a 100644 --- a/assets/enemies/pogo_fan.svg +++ b/assets/enemies/pogo_fan.svg @@ -1,4 +1,813 @@ - -Fan del pogo eterno - + +Fan del pogo · ilustración vectorial animada + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/enemies/rival_guitarist.svg b/assets/enemies/rival_guitarist.svg index 18191cd..34c8257 100644 --- a/assets/enemies/rival_guitarist.svg +++ b/assets/enemies/rival_guitarist.svg @@ -1,4 +1,875 @@ - -Guitarrista rival - + +Guitarrista rival · ilustración vectorial animada + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/enemies/roadie.svg b/assets/enemies/roadie.svg index 2a10a13..bee8bd4 100644 --- a/assets/enemies/roadie.svg +++ b/assets/enemies/roadie.svg @@ -1,4 +1,797 @@ - -Roadie del mas alla - + +Roadie · ilustración vectorial animada + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/architecture.md b/docs/architecture.md index 30d02a8..e749780 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -12,13 +12,14 @@ y muestra el selector de personajes antes de cargar solo la elegida. ruta/personaje en memoria para recargar sin perder la eleccion, sin tocar el perfil. `LevelRoot` aplica camara/caidas y agrega una instancia de LevelNavigation solo -al jugar. Esta ofrece MENU/Escape/Atras; la salida Area2D reutilizable tambien -vuelve al menu tras confirmar los raros. MENU abandona sin confirmarlos. -Ambas van directamente al menu, no a la intro. +al jugar. PAUSA/Escape/Atras abre un panel con reanudar, selector o titulo; +las salidas solicitan confirmacion. La muerte y la caida abren HAS MUERTO..., +y la meta de Level00 y la salida Area2D de Level01 abren ¡VICTORIA! despues de +confirmar los raros. Los resultados permiten reiniciar o pasar al siguiente +nivel segun corresponda. Volver al menu no repite la intro. -Player._die aun recarga el mapa, la meta de beta Level00 aun reinicia tras 9 s y la nueva -salida de Level01 confirma raros y vuelve al inicio. No existe un coordinador de victoria/derrota ni -campana. Resolver las recargas competidoras cuando se implemente ese flujo. +El coordinador de pausa/resultados vive en LevelNavigation; `RunSession` solo +conserva personaje y destino. No hay campana ni guardado de niveles completados. La seleccion se realiza antes de cada entrada desde el menu. F6 utiliza el recurso asignado al Player; por defecto, Diego. No hay restricciones por mapa. @@ -52,7 +53,7 @@ abrirse y ejecutarse directamente sin un generador ni un plugin de edicion. | `ui/menu/rare_inventory.gd` | Coleccion en el menu, sin equipamiento ni efectos propios | | `game/boot.gd` | Espera provisional, salto y carga del menu | | `ui/menu/main_menu.gd` | Inicio, descubrimiento no recursivo y carga de niveles | -| `ui/menu/level_navigation.gd` | Salida del escenario al menu, sin pausa ni guardado | +| `ui/menu/level_navigation.gd` | Pausa, confirmacion, derrota, victoria y transiciones; sin guardado de campana | | `world/triggers/level_exit.gd` | Area colocable de salida, de una sola activacion | | `world/terrain/terrain_piece.gd` | Sincronizar tamano, texturas y colision de una superficie | | `world/terrain/*.tscn` | Presets de suelo, plataforma, pared y bloque | @@ -177,9 +178,10 @@ inspeccionaban esas rutas se han actualizado. Las fachadas y farolas cambian su origen de esquina superior izquierda a pies centrados, compensando sus posiciones para conservar donde se veian. -La beta Level00 conserva su meta de pruebas. El nuevo Level01 usa la salida colocable al menu. -La plantilla no instancia una salida por defecto: el autor elige donde colocarla. -Eso no implementa eventos, resultados, guardado o progresion de campana. +La beta Level00 conserva su meta de pruebas. Level01 usa la salida colocable. +Ambas muestran el mismo resultado de victoria. La plantilla no instancia una +salida por defecto: el autor elige donde colocarla. Eso no implementa eventos, +guardado de niveles completados ni progresion de campana. ## Convenciones diff --git a/docs/characters.md b/docs/characters.md index 248e2cf..78a6b55 100644 --- a/docs/characters.md +++ b/docs/characters.md @@ -40,7 +40,7 @@ animaciones/efectos visuales hasta que se integre audio. ```text Inicio -> Jugar -> Nivel -> Diego / Ivan / Fer / Hector (2x2) -> Carga -> Juego | | - +-- Volver -> Niveles +-- Morir: mismo personaje + +-- Volver -> Niveles +-- Reiniciar / siguiente: mismo personaje ``` Toda la tarjeta es pulsable con tacto o clic. Hay scroll cuando no caben las dos @@ -49,8 +49,7 @@ Elegir personaje inicia la carga y bloquea dobles pulsaciones. Un error vuelve al selector sin dejar una sesion a medias. `RunSession` guarda solo ruta/recurso en memoria. Player resuelve la eleccion -antes de vida, animaciones, hitboxes y senales iniciales del HUD. Recargar por -muerte, caida o reinicio de la beta la conserva. El menu la limpia: cada entrada +antes de vida, animaciones, hitboxes y senales iniciales del HUD. Reiniciar tras morir/caer y avanzar desde VICTORIA conserva la eleccion. El menu la limpia: cada entrada muestra de nuevo la banda. No se persiste al cerrar, no se registra en los raros y no hay restricciones ni personajes desbloqueables. @@ -79,9 +78,12 @@ y 3 px de amplitud maxima, sincronizados con los cuatro pulsos ya existentes. El cuerpo fisico y los ataques no se mueven para dibujar esos efectos. Los SVG y `.tres` se incluyen listos. Python no es necesario para importar ni -jugar. `tools/generate_band_art.py` permite regenerarlos a partir del atlas -original; requiere Pillow solo como utilidad de arte. Sobrescribe los cuatro -atlas/recursos: no lo ejecutes sobre arte retocado a mano sin guardar sus cambios. +jugar. `tools/generate_vector_character_art.py` genera los nuevos atlas SVG vectoriales +con volumen, contornos y marcha articulada, sin dependencias externas. El alias +`tools/generate_band_art.py` llama al nuevo generador. Los recursos SpriteFrames +de la banda conservan regiones y tiempos; tambien se regeneran los dibujos y +SpriteFrames de los cinco enemigos. Guarda cualquier retoque manual antes de +regenerarlos. [Pausa y estilo visual](pausa_resultados_y_arte.md). ## Revision manual del autor diff --git a/docs/design_vision.md b/docs/design_vision.md index f5f9bda..706d169 100644 --- a/docs/design_vision.md +++ b/docs/design_vision.md @@ -1,6 +1,6 @@ # Guia maestra: vision, decisiones y tareas -Actualizacion: **29 de octubre de 2026**, entrega de cuatro personajes y seleccion antes de cada nivel. Este es el unico backlog activo. `[x]` significa presente +Actualizacion: **9 de noviembre de 2026**, pausa, resultados compartidos, siguiente nivel y renovacion del arte de personajes/enemigos. Este es el unico backlog activo. `[x]` significa presente en la implementacion revisada, **no probado jugando**. `[ ]` queda pendiente. La evidencia de ejecucion se registra aparte en [Estado](project_status.md). @@ -28,17 +28,17 @@ tiene radio comun 108 (antes 54). El punetazo tambien comparte animacion. Flujo implementado ahora: ```text -Intro 10 s, saltable -> Inicio -> Jugar -> lista de escenas en levels/ - ^ | - | v - +----- MENU / salida -- personaje 2x2 -> escenario - | - +-- muerte: recarga +Intro saltable -> Inicio -> Jugar -> selector -> personaje 2x2 -> nivel + En nivel: PAUSA (arriba derecha) -> REANUDAR / SELECTOR* / TITULO* + Muerte/caida -> HAS MUERTO... -> REINICIAR / SELECTOR / TITULO + Meta -> ¡VICTORIA! -> SIGUIENTE NIVEL / SELECTOR / TITULO + * Confirma previamente que se pierde el avance del intento. ``` La lista es un selector libre de **pruebas**, no el catalogo de una campana. -La meta confirma los raros y vuelve al menu; MENU abandona sin confirmar. No -registra niveles completados de campana ni desbloquea escenarios. +La meta confirma los raros y abre victoria; abandonar antes de ganar los descarta. +SIGUIENTE NIVEL carga el siguiente mapa del selector, sin desbloqueos ni guardado +de campana. La ultima pantalla no ofrece una continuacion activa. ## Principios de desarrollo @@ -61,7 +61,7 @@ verificar el parche y separar implementacion de validacion efectiva. - [x] Estadisticas provisionales compartidas: vida 50, velocidad 390, salto -600, dano basico 5; SpriteFrames provisional comun (37 celdas / 11 animaciones). - [x] Aceleracion, friccion, salto variable/doble, coyote time y buffer de salto. -- [x] Vida, hurtboxes, retroceso, invulnerabilidad, muerte y recarga. +- [x] Vida, hurtboxes, retroceso, invulnerabilidad y derrota con reinicio opcional. - [x] Punetazo, Ground Pound y especial parcial por pulsos. - [x] Un Walker con cinco perfiles; Fan y Rival saltan, Tecnico no dispara. - [x] 17 objetos / ocho efectos, recogida confirmada y drops fijos/ponderados. @@ -85,11 +85,11 @@ verificar el parche y separar implementacion de validacion efectiva. - [x] Intro provisional de diez segundos, saltable desde el primer arranque. - [x] Inicio simple y submenu tactil/raton con carga asincrona de niveles. - [x] Descubrimiento no recursivo de escenas de la raiz `levels/`. -- [x] MENU / Escape / Atras para abandonar escenarios sin repetir la intro. -- [x] Meta arrastrable que confirma raros y vuelve al menu, sin sistema de campana. +- [x] PAUSA / Escape / Atras para pausar; confirmacion al abandonar hacia selector o titulo. +- [x] Meta arrastrable que confirma raros, muestra VICTORIA y permite siguiente nivel. - [x] Submenu OBJETOS RAROS con estado/efecto, sin equipamiento. - [x] Selector de banda 2x2 antes de cargar, con retratos/nombres y retorno a niveles. -- [x] Cuatro apariencias y efectos; Diego conserva las demas animaciones originales. +- [x] Cuatro atlas renovados con volumen 2D y marcha de seis fases; cinco enemigos animados. - [x] Ground Pound comun de radio 108, sin ventajas de dano/alcance por integrante. - [x] Eleccion temporal independiente del guardado raro; muerte/caida la conservan. @@ -99,7 +99,7 @@ verificar el parche y separar implementacion de validacion efectiva. - [x] Level01: nuevo mapa vertical con 12 enemigos, 14 objetos y desvios opcionales. - [x] Laboratorio antiguo, su script y `lab_control.tres` retirados; tests desacoplados. - [x] Sala de combate y catalogo fuera del selector, dentro de subcarpetas. -- [x] 87 pruebas estaticas ejecutadas y once suites de motor preparadas, con perfil aislado. +- [x] 87 pruebas estaticas ejecutadas y doce suites de motor preparadas, con perfil aislado. - [x] Preset Android arm64, script de exportacion y workflow Gitea conservados. - [x] README, guias y backlog actualizados con esta entrega. @@ -121,9 +121,10 @@ El especial tambien golpea adornos rompibles, pero romperlos no aporta carga. Al entrar/reentrar un nivel se crea estado temporal nuevo: no se guarda ni transporta vida actual, carga o buffs temporales entre escenas. La coleccion -confirmada si persiste, y sus bonos se leen al crear al jugador. La muerte aun recarga el nivel; -la meta de la beta aun reinicia a los nueve segundos. El nuevo Level01 sale al menu. -MENU abandona; no se ha implementado pausa por llamarlo menu. +confirmada si persiste, y sus bonos se leen al crear al jugador. Al morir o caer +aparece HAS MUERTO...; el reinicio solo ocurre al elegir REINICIAR NIVEL. Ambas +metas muestran VICTORIA y permiten seguir al siguiente nivel disponible. PAUSA +congela el arbol; salir antes de la victoria advierte de la perdida del intento. ## Reconciliacion de fases originales @@ -145,7 +146,7 @@ MENU abandona; no se ha implementado pausa por llamarlo menu. ### QA-01 - Godot y dispositivo -- [ ] Ejecutar `tools/run_checks.py --godot ...` y resolver importacion/GDScript y once suites (ejecucion local del autor). +- [ ] Ejecutar `tools/run_checks.py --godot ...` y resolver importacion/GDScript y doce suites (ejecucion local del autor). - [ ] Comprobar intro de 10 s, salto, selector, scroll, cargas, errores y retorno sin intro. - [ ] Crear una copia de la plantilla en raiz y verificar que aparece sin codigo. - [ ] Recorrer00/01: saltos, enemigos, salida, desvios y camara; repetir sin mejoras. @@ -173,11 +174,12 @@ Cierre: escenarios comparables sin excepciones ocultas ni saltos que dependan de ### UX-01 - pausa y ajustes -- [ ] Pausar/reanudar, reintentar y abandonar con acciones explicitas. -- [ ] Detener ataques y temporizadores durante la pausa, sin estados tactiles retenidos. -- [ ] Exponer feedback visual y revisar colocacion/legibilidad del HUD y controles. +- [x] Boton PAUSA arriba a la derecha, reanudar y abandonar al selector/titulo con aviso. +- [x] Pausar simulacion, movimiento y temporizadores de recogida; liberar acciones sinteticas. +- [ ] Verificar teclado, tactil, Atras Android, legibilidad y escala en dispositivo real. +- [ ] Exponer ajustes de sonido/volumen cuando se integre audio. -Cierre: pausar no avanza la simulacion; salir conserva el retorno directo al inicio. +Cierre: pausa implementada pero pendiente comprobacion real en Godot y Android. ### AUDIO-01 - musica y sonidos basicos @@ -189,19 +191,19 @@ Cierre: una partida corta con audio controlable. El solo actual es visual, no au ### FLOW-01 - resultado y final de partida -- [x] Salida sencilla arrastrable al menu para probar mapas nuevos. -- [ ] Definir victoria/derrota y ofrecer reintentar/salir sin la recarga automatica anterior. -- [ ] Resolver una autoridad de transicion cuando haga falta, sin bus de eventos universal. +- [x] Salida sencilla arrastrable que confirma los raros y abre VICTORIA. +- [x] HAS MUERTO... con REINICIAR, SELECTOR y TITULO; sin recarga automatica. +- [x] ¡VICTORIA! con SIGUIENTE NIVEL, SELECTOR y TITULO; sin bucles de reinicio. +- [x] Centralizar transiciones en LevelNavigation, sin bus de eventos universal. - [ ] Probar muerte junto a salida, activacion doble y controles pulsados al cambiar de escena. -- [ ] Mantener F6 y los escenarios de prueba sin requisitos de sesion previos. +- [ ] Validar F6 y los escenarios nuevos sin requisitos de sesion previos en Godot. -Cierre: un escenario nuevo presenta resultado y reintento sin copiar el script de la beta. -La salida actual es un avance parcial, no se marca esta tarea completa. +Cierre: flujo implementado en codigo; falta prueba funcional en motor y Android. ### FLOW-02 - campana y continuidad, cuando se defina el diseno - [x] Entrada real del juego y menu simple con niveles autodetectados. -- [ ] Definir identificadores/orden de niveles de campana y continuacion entre dos escenarios. +- [ ] Definir identificadores/orden de niveles de campana; el siguiente del selector ya es navegable, sin progreso de campana. - [x] Resolver politica: seleccion antes de cargar el nivel, conservar al morir; sin restricciones. - [ ] Separar selector de pruebas del acceso de una campana con desbloqueos. @@ -237,11 +239,11 @@ un contexto sincronico valido para Walker actual; proyectiles/muerte diferida requeriran transportar la causa. El HUD lee algunos campos internos de mejoras: extraer un contrato cuando una segunda necesidad lo justifique, no por adelantado. -Player, LevelRoot y la meta beta aun pueden solicitar reinicios; resolver junto -al flujo de resultado, no declarar que ya existe una sesion completa. La sala de -combate no hereda LevelRoot. El workflow Android exporta pero no ejecuta los tests. +La muerte, la caida y ambas metas delegan en las pantallas compartidas de +LevelNavigation; no hay recarga automatica. La sala de combate no hereda +LevelRoot. El workflow Android exporta pero no ejecuta los tests. -Se han pasado **87 pruebas estaticas**. La ejecucion jugable, las once suites +Se han pasado **87 pruebas estaticas**. La ejecucion jugable, las doce suites y la comprobacion visual/dispositivo quedan a cargo del autor, como se ha acordado. [Evidencias](project_status.md). ## Contexto breve para continuar @@ -249,10 +251,11 @@ y la comprobacion visual/dispositivo quedan a cargo del autor, como se ha acorda Godot 4.7 / Compatibility, Player unico/Diego por defecto, cuatro integrantes elegibles. Movimiento/doble salto, combate normal/aereo/especial, cinco Walker, 17 objetos, kit visual y HUD thrash oculto al editar. F5intro de 10 s saltable->menu->niveles de -raiz;00betaantiguo02,01verticalnuevo. F6 sigue directo. MENU/salida->menu sin intro. -Dano hasta golpe y solo mejores sustituyen; otros buffs de 30/45 s. Seleccion 2x2 -tras elegir nivel; al morir conserva personaje, al volver al menu se limpia. -Todos atacan igual; Ground Pound radio 108; solo efectos/poses diferentes. -Sin audio, pausa ni campana. Hay coleccion rara permanente y barriles -rompibles: guardar solo al completar, nunca al abandonar. +raiz;00betaantiguo02,01verticalnuevo. F6 sigue directo. PAUSA->reanudar, +selector o titulo con aviso; muerte->reintentar/selector/titulo; meta->victoria y +siguiente nivel/selector/titulo. Dano hasta golpe y solo mejores sustituyen; otros +buffs de 30/45 s. Seleccion 2x2 tras elegir nivel; morir/reiniciar/avanzar +conservan personaje y al volver al menu se limpia. Ground Pound radio 108; +cuatro atlas 2D renovados y cinco enemigos con marcha animada. Sin audio ni +campana. Coleccion rara permanente y barriles: guardar solo al completar. Entregas por git apply; actualizar este backlog sin duplicarlo en otros documentos. diff --git a/docs/level_00.md b/docs/level_00.md index 45d7f63..0b32665 100644 --- a/docs/level_00.md +++ b/docs/level_00.md @@ -35,7 +35,7 @@ necesario regenerar los PNG ni copiar la logica de progreso de esta calle. Son los mismos recursos `PickupData` que funcionan en Level 01. - **Barreras de colisión** a x=0 y x=11.000, visibles en píxeles, para impedir salir por los extremos. -- HUD de progreso (sector y bajas), meta con resultado y reinicio tras 9 s. +- HUD de progreso (sector y bajas); meta con VICTORIA y boton SIGUIENTE NIVEL. - El especial mantiene un radio de 290 unidades en esta instancia del jugador (el nuevo Level01 tambien tiene esa sobrescritura), para limitar su alcance. @@ -135,11 +135,11 @@ aún para evitar cambiar demasiadas variables simultáneamente. `Collision Enabled` decide si bloquean; `Draw Layer` decide delante/detrás. En esta calle siguen colocadas como decoración sin colisión. - **Cámara:** `Camera Bounds` en la raíz de Level00; se aplica mediante `LevelRoot`. -- **Meta:** `FinishZone` y la regla de `level_00.gd`. Muestra un resumen al entrar - el jugador, sin exigir todos los KOs, y recarga a los 9 segundos. No cambia de - nivel; confirma los raros del intento y los Completion Rewards antes del reinicio. MENU abandona sin confirmar hallazgos pendientes. Para otro escenario, no copiar este script completo - como sustituto de la salida simple `world/triggers/level_exit.tscn`. - Una victoria de campana con resultado y desbloqueos sigue pendiente. +- **Meta:** `FinishZone` y la regla de `level_00.gd`. Al entrar el jugador, + sin exigir todos los KOs, confirma raros y Completion Rewards y abre el + panel ¡VICTORIA!: SIGUIENTE NIVEL (Level01), SELECTOR o TITULO. No existe + el reinicio anterior de 9 segundos. Para otro escenario, usa la salida simple + `world/triggers/level_exit.tscn`. El desbloqueo de campana sigue pendiente. ## Pruebas pendientes en Godot / APK diff --git a/docs/level_01.md b/docs/level_01.md index a84e4cc..7c5be53 100644 --- a/docs/level_01.md +++ b/docs/level_01.md @@ -19,7 +19,7 @@ Entrada elevada (y=760) -> pasar bajo el muro central -> torre en zigzag, 12 plataformas -> descanso lateral opcional con comida - -> azotea (y=420) -> salida al menu + -> azotea (y=420) -> ¡VICTORIA! (siguiente nivel si existe) ``` Las coordenadas Y aumentan hacia abajo. El mapa mide **3800 x 2760** y empieza @@ -48,7 +48,7 @@ No hay accion de bajar atravesando plataformas: en el descenso sal por un latera | Carteles de orientacion | 7, mas el cartel de salida | | Personaje | Elegido antes de cargar desde el menu; con F6, el recurso del Inspector | | Especial | Radio local 290; economia actual sin cambios | -| Final | `Triggers/Exit`, confirma raros y vuelve al menu, sin desbloquear niveles | +| Final | `Triggers/Exit`, confirma raros y abre ¡VICTORIA!; selector o titulo, sin desbloquear niveles | Al inicio hay Cuerda de Titanio; el camerino ofrece el Pedal de Distorsion mas potente y un escudo. Tambien hay una Pua en la torre: si aun conservas el Pedal, diff --git a/docs/level_design.md b/docs/level_design.md index 0d06e53..2543771 100644 --- a/docs/level_design.md +++ b/docs/level_design.md @@ -206,9 +206,9 @@ decoracion oculta accidentalmente una zona peligrosa. Revisa la camara hasta amb extremos y comprueba la recuperacion de caidas. Guarda y vuelve a abrir la escena para comprobar que todo conserva sus valores. -La plantilla no coloca una meta ni implementa victoria, dialogos, checkpoints o -desbloqueos. Puedes arrastrar una salida al menu en `Triggers`; los eventos de -campana siguen pendientes. Level00 conserva su meta de prueba, Level01 usa la +La plantilla no coloca una meta ni implementa dialogos, checkpoints o +desbloqueos. Puedes arrastrar una salida de nivel en `Triggers`: LevelRoot +presentara ¡VICTORIA! al terminar. Los eventos de campana siguen pendientes. Level00 conserva su meta de prueba, Level01 usa la salida compartida descrita al final de esta guia. ## 10. Interfaz mientras construyes @@ -223,8 +223,8 @@ Consulta [Visibilidad de UI](editor_ui_visibility.md) y [HUD thrash](thrash_hud. La ocultacion de editor no es un sistema de pausa ni un ajuste de controles para escritorio. La validacion interactiva sigue siendo necesaria. -El menu y la salida simple ya permiten probar escenarios. Las tareas de -resultado y campana estan en [la guia maestra](design_vision.md). Todos los +El menu, pausa y resultado compartidos permiten probar escenarios. +Las tareas de campana estan en [la guia maestra](design_vision.md). Todos los niveles elegidos desde el menu muestran antes la banda; con F6 se respeta el Character Data de la instancia de Player (Diego por defecto). @@ -236,15 +236,16 @@ jugable directamente en la raiz de `levels/` (por ejemplo level_02.tscn, ahora libre tras renombrar la calle a Level00). El submenu lo detecta sin lista manual ni codigo nuevo. Las subcarpetas examples/templates/test quedan fuera. -LevelRoot agrega MENU/Escape/Atras solo al jugar, sin crear nodos en el editor. -Regresa directamente al inicio, sin repetir la intro y descartando la partida. -`Enable Level Menu` permite desactivarlo. No es pausa ni guardado. +LevelRoot agrega II PAUSA arriba a la derecha solo al jugar. Escape/Atras +abre o cierra la pausa; hay confirmacion para abandonar al selector o titulo, +sin repetir la intro. `Enable Level Menu` permite desactivar la interfaz. Para terminar con una salida sencilla, arrastra `world/triggers/level_exit.tscn` -y coloca su origen sobre el suelo. Contiene cartel y area vertical de 112 x 160; al -entrar el jugador confirma los raros del intento y vuelve al menu una sola vez. El tamano fisico se modifica en -su CollisionShape2D (haz unica la forma si editas una instancia). No desbloquea -niveles ni sustituye una futura pantalla de resultado. +y coloca su origen sobre el suelo. Contiene cartel y area vertical de 112 x 160; +al entrar el jugador confirma los raros del intento y abre ¡VICTORIA!. El tamano +fisico se modifica en su CollisionShape2D (haz unica la forma si editas una +instancia). Avanzar va al siguiente nivel del selector; no desbloquea niveles +de campana. La plantilla no obliga a colocar una salida. El nuevo [Level01](level_01.md) es un ejemplo vertical con desvios y salida. [Level00](level_00.md) conserva la diff --git a/docs/pausa_resultados_y_arte.md b/docs/pausa_resultados_y_arte.md new file mode 100644 index 0000000..106481f --- /dev/null +++ b/docs/pausa_resultados_y_arte.md @@ -0,0 +1,77 @@ +# Pausa, derrota, victoria y nueva direccion visual + +Entrega sobre la base del ZIP `project.zip` de Mortal Maze, 9 de noviembre de 2026. +No cambia las dimensiones fisicas, dano, IA, drops ni progreso de campana. + +## Flujo de una partida + +```text +LEVEL 00 / LEVEL 01 + ├─ boton II PAUSA (arriba a la derecha), Escape / Atras de Android + │ ├─ REANUDAR → vuelve al juego exactamente donde estaba + │ ├─ SELECTOR DE NIVELES → AVISO → Confirmar / Cancelar + │ └─ TITULO PRINCIPAL → AVISO → Confirmar / Cancelar + ├─ derrota por dano o caida → HAS MUERTO... + │ ├─ REINICIAR NIVEL → reinicia el escenario con el personaje elegido + │ ├─ SELECTOR DE NIVELES → vuelve a ELEGIR NIVEL + │ └─ TITULO PRINCIPAL → vuelve a INICIO + └─ meta → ¡VICTORIA! + ├─ SIGUIENTE NIVEL → carga el siguiente *.tscn de levels/ (mismo personaje) + ├─ SELECTOR DE NIVELES → vuelve a ELEGIR NIVEL + └─ TITULO PRINCIPAL → vuelve a INICIO +``` + +En el ultimo nivel del selector, **SIGUIENTE NIVEL** se muestra deshabilitado +con el texto `NO HAY MAS NIVELES`. El orden procede del mismo descubrimiento +no recursivo de `MainMenu`, no de una lista paralela. No hay campana, desbloqueos +ni checkpoints. Si se inicia un nivel con F6, pasar al siguiente usa la +configuracion `CharacterData` actual del Player. + +Mientras el panel este abierto, `SceneTree.paused` paraliza Player, enemigos, +IA, caidas y contadores de buffs. El CanvasLayer de la UI se procesa siempre, +para aceptar los botones incluso con el arbol pausado. Antes de salir, reiniciar +o cargar otro nivel, se despausa el arbol y se liberan acciones tactiles +sinteticas. Escape/Atras abre/cierra pausa; no evita una pantalla de resultado. + +**Coleccion:** solo `LevelRoot.complete_level()` confirma objetos raros. La +muerte, la caida o abandonar desde pausa descartan los hallazgos de ese intento. +En victoria ya se han guardado o no se muestra la pantalla si falla el guardado. +El selector y el titulo limpian la eleccion temporal; reintentar y avanzar +conservan al personaje. La meta de Level00 y LevelExit del vertical unifican +este mismo flujo, sin temporizador oculto de reinicio ni retorno automatico. + +## Direccion de arte: ilustracion 2D inspirada en pixel-art + +Se reemplazan los atlas de los **cuatro personajes** y **cinco enemigos** por +ilustraciones SVG vectoriales autocontenidas. Se mantiene una paleta deliberada, +contorno oscuro y volumen en bloques, pero se introducen curvas, gradientes +controlados, volumen en chaquetas/botas/caras y mejor diferenciacion de estilos. +Es una **primera propuesta artistica** de estilo 2D, no arte final de estudio. + +- Banda: 40 celdas 64x64 por personaje, mismas animaciones y ataques. +- Enemigos: 16 celdas 64x64 por variante con idle, 6 de marcha, ataque, salto, + dano y muerte; `Walker.Visual` pasa a `AnimatedSprite2D`. +- Marcha: 6 poses con alternancia de apoyos, elevacion del pie en vuelo, + articulacion de rodillas, braceo y cadencia ligada a la velocidad horizontal. +- Cambios de render: filtrado lineal para que no aparezcan cuadraditos duros. +- Generador reproducible: `python tools/generate_vector_character_art.py`. + +Los cinco enemigos comparten IA y dimensiones de colision existentes; la +animacion es exclusivamente visual. El cambio de arte no pretende modificar +la velocidad ni el ritmo jugable de 390 px/s del jugador. + +## Validacion + +```bash +python tools/run_checks.py --static-only +python tools/run_checks.py --godot /ruta/a/Godot_4.7.2 +``` + +**Pendiente para el autor:** ejecutar el runner Godot 4.7 en local y probar +una partida completa en escritorio y Android. Hay una nueva suite +`tests/test_pause_result_runtime.gd` para pausa, abandono, muerte, reinicio, +victoria y siguiente nivel. Comprobar visualmente que la nueva paleta encaje +con los fondos antiguos, que el paso no resbale a velocidades extremas, +que las pantallas sigan siendo legibles y pulsables en movil apaisado, y que +las transiciones nunca dejen el juego pausado. Revisar los cinco enemigos +caminando/atacando y las cuatro poses de personajes. No se ha probado APK aqui. diff --git a/docs/project_status.md b/docs/project_status.md index 0a5ea07..f528804 100644 --- a/docs/project_status.md +++ b/docs/project_status.md @@ -1,8 +1,8 @@ # Estado de implementacion y validacion -Revision de **29 de octubre de 2026**: banda de cuatro personajes y seleccion previa. -Base: entregas anteriores hasta coleccion rara permanente y adornos rompibles. -No incluye cambios locales del autor que no estuvieran en esas entregas. +Revision de **9 de noviembre de 2026**: pausa, derrota/victoria compartidas, +navegacion al siguiente nivel y renovacion de sprites y caminata de la banda y +enemigos. Se preservan los cambios locales ajenos al parche. ## Lo incorporado @@ -28,6 +28,11 @@ No incluye cambios locales del autor que no estuvieran en esas entregas. | Efectos de guitarra, bateria, bajo y voz sin dano propio | `effects/combat_fx.gd`, datos de personaje | | Vibracion grave por pulso de Fer, desactivable | `player/camera_2d.gd`, `CharacterData.special_shake_*` | +| Pausa con aviso de perdida de intento | `ui/menu/level_navigation.gd/.tscn` | +| Derrota, reinicio y regreso al selector o titulo | `LevelRoot.level_failed`, `LevelNavigation` | +| Victoria comun y siguiente mapa | `LevelRoot.level_completed`, `main_menu.discover_level_paths` | +| Cuatro atlas suavizados, cinco enemigos animados | `assets/characters/band/`, `assets/enemies/`, `enemies/animations/` | + La Pua Perdida todavia no esta escondida en 00/01 ni asignada como premio de meta. La geometria, enemigos y 17 consumibles de los niveles no se han modificado. Los barriles existentes heredan la rotura, sin recompensa salvo configuracion. @@ -43,10 +48,12 @@ El hallazgo se confirma al llegar vivo a la meta actual; no obliga a eliminar todos los enemigos. Morir, caer o abandonar antes de ganar lo pierde. Si falla el guardado, la meta conserva el intento pendiente y permite reintentar. -Se mantienen intro saltable, selector libre de raiz de levels, recarga al morir, -reinicio beta tras nueve segundos y salida del vertical. El personaje se elige -tras escoger nivel; no hay restricciones y la seleccion no se guarda en disco. -Pausa, audio, resultado completo, bosses y campana siguen pendientes. +Se mantienen intro saltable y selector libre de raiz de levels. Morir o caer +abre derrota con REINICIAR/SELECTOR/TITULO. Level00 y Level01 abren victoria; +el siguiente del selector conserva personaje. No hay temporizador de reinicio +ni vuelta automatica al menu desde la meta. El personaje se elige antes del +nivel; no hay restricciones ni guardado del personaje en disco. +Pendientes: validar Godot/Android, audio, arte final, bosses y campana. ## Comprobaciones de esta entrega @@ -56,7 +63,7 @@ Pausa, audio, resultado completo, bosses y campana siguen pendientes. - Comprobacion de aplicacion del parche sobre la base reconstruida, comparacion de los archivos resultantes y reversibilidad sobre esa misma base. - Se actualiza la suite existente de menu para exigir eleccion previa y conservar - personaje al reiniciar. Siguen once suites opcionales para ejecucion local; + personaje al reiniciar. Las suites de motor, incluida la nueva de pausa/resultados, quedan para ejecucion local; usan un perfil de pruebas aislado. No se cuentan como ejecutadas. Las comprobaciones estaticas no ejecutan GDScript ni certifican comportamiento diff --git a/docs/rare_items_and_breakables.md b/docs/rare_items_and_breakables.md index 3852628..aaacb30 100644 --- a/docs/rare_items_and_breakables.md +++ b/docs/rare_items_and_breakables.md @@ -24,8 +24,8 @@ Las reglas de victoria futuras deberan llamar a `LevelRoot.complete_level()`. El registro pendiente pertenece a la instancia de LevelRoot, nunca al autoload. Por eso reintentar, cambiar de nivel o cerrar antes de ganar no arrastra hallazgos -al intento siguiente. La meta confirma una unica vez. La beta mantiene su -reinicio nueve segundos despues; la salida del vertical vuelve al menu. +al intento siguiente. La meta confirma una unica vez; la beta y el vertical +muestran la pantalla ¡VICTORIA! y permiten continuar o volver al menu. Si el disco falla, no se declara conseguida la recompensa ni se abandona el nivel desde la meta. Aparece un mensaje y se conservan los pendientes para @@ -41,8 +41,8 @@ por distancia y el reparto entero entre pulsos se conservan: un presupuesto base Los atributos permanentes se leen al crear el Player del siguiente intento. Recoger la pua a mitad del mapa no facilita terminar ese mismo intento y ganarla -no cambia al personaje que sigue vivo durante los nueve segundos de la beta. -Tras reiniciar, o entrar en otro escenario, ya se aplica el bono. +no cambia al personaje durante la pantalla de victoria. Tras reiniciar, o +entrar en otro escenario, ya se aplica el bono. No se ha colocado la pua en ningun nivel ni asignado como premio automatico. Para esconderla, arrastra: diff --git a/docs/start_menu.md b/docs/start_menu.md index 8489335..2e85c9c 100644 --- a/docs/start_menu.md +++ b/docs/start_menu.md @@ -53,7 +53,7 @@ La lista de niveles se reconstruye cada vez que se abre el submenu. La eleccion se realiza despues del nivel y antes de cargarlo: **Diego, Ivan, Fer y Hector**. `RunSession` conserva en memoria la ruta y el recurso `CharacterData`. Player resuelve ese recurso antes de inicializar vida, animaciones y HUD. -Morir/caer o reiniciar la beta conserva la eleccion; abrir el menu la limpia. +Morir/caer, reiniciar tras derrota y avanzar al siguiente nivel conservan la eleccion; abrir el menu la limpia. F6 no exige una sesion: utiliza el recurso del Inspector (Diego por defecto). No hay restricciones por nivel ni guardado del personaje entre ejecuciones. [Aspecto, igualdad de combate y configuracion](characters.md). @@ -62,25 +62,31 @@ Cada entrada desde el menu crea una instancia nueva del nivel. Vida, especial, escudos, mejoras temporales, enemigos y objetos comienzan de nuevo. La coleccion de raros confirmados si persiste; sus bonos se aplican al crear Player. Los hallazgos pendientes se pierden al abandonar o morir, no al recibir un golpe. -Morir sigue recargando la escena actual. No hay pausa, derrota con opciones, -continuacion automatica ni desbloqueos. +Morir o caer abre HAS MUERTO..., con REINICIAR NIVEL, SELECTOR DE NIVELES y +TITULO PRINCIPAL. Llegar a la meta abre ¡VICTORIA!, con SIGUIENTE NIVEL, +SELECTOR y TITULO; el siguiente es el que figure a continuacion en el selector. +No hay guardado de campana ni desbloqueos. ## Regresar desde un escenario `LevelRoot` instancia una unica `ui/menu/level_navigation.tscn` durante la partida. -Aparece MENU arriba a la derecha; Escape/Atras hace lo mismo. No se crea en el -editor ni modifica la escena guardada. `Enable Level Menu` permite desactivarlo. -Si colocas una instancia llamada `LevelNavigation` en la raiz, no se duplica. -La propia escena de navegacion tiene el componente de ocultacion del editor. +Aparece II PAUSA arriba a la derecha; Escape/Atras abre/cierra pausa. El panel +permite REANUDAR, SELECTOR DE NIVELES y TITULO PRINCIPAL. Las dos salidas +requieren confirmar la perdida del intento, con opcion CANCELAR. No se crea en +el editor ni modifica la escena guardada; `Enable Level Menu` permite +desactivarlo. Si ya existe una instancia LevelNavigation no se duplica. El cambio de escena es diferido para no liberar nodos dentro de un callback de -fisica. Los controles moviles existentes liberan sus acciones al salir. Se vuelve -a `main_menu.tscn`, **nunca a la intro**. MENU abandona la partida, no la pausa. +fisica. Los controles moviles liberan sus acciones sinteticas antes de pausar o +salir. El panel detiene SceneTree; al salir se reanuda antes de cargar la escena. +Volver al selector abre directamente ELEGIR NIVEL; volver al titulo abre INICIO, +**sin repetir la intro**. `world/triggers/level_exit.tscn` es una salida colocable con cartel y Area2D. Solo -acepta el grupo player y confirma `LevelRoot.complete_level()` antes de volver -al inicio. Guarda los raros del intento y los premios automaticos, no una victoria -de campana ni el siguiente nivel. MENU no llama a ese metodo: solo abandona. +acepta el grupo player y confirma `LevelRoot.complete_level()` antes de mostrar +la victoria comun. Guardar raros no equivale a desbloquear un nivel de campana. +La meta propia de Level00 usa la misma pantalla. +[Flujo detallado y arte renovado](pausa_resultados_y_arte.md). ## Coleccion de objetos raros @@ -101,7 +107,7 @@ regresan al inicio. La lista tiene scroll y tarjetas editables en | Eleccion temporal durante el intento | `game/run_session.gd` | | Colores, tipografia y estados | `ui/menu/menu_theme.tres` | | Carpetas, etiquetas y carga | `ui/menu/main_menu.gd` | -| Boton de salida en juego | `ui/menu/level_navigation.tscn` | +| Boton de pausa y pantallas de resultado | `ui/menu/level_navigation.tscn` | | Activar navegacion por escenario | `Enable Level Menu` en su raiz `LevelRoot` | | Zona final colocable | `world/triggers/level_exit.tscn` | @@ -117,12 +123,12 @@ un wrapper de `combat_test`, que se conserva como prueba independiente con F6. - [ ] Cada nivel abre cuatro tarjetas 2x2; volver no carga nada; elegir aplica al integrante. - [ ] Morir conserva la eleccion; volver al menu permite cambiar; F6 usa el Inspector. - [ ] Pulsar varias veces durante la carga no abre dos escenarios. -- [ ] MENU y la salida regresan al inicio sin intro ni acciones tactiles retenidas. -- [ ] Volver a entrar restaura vida, objetos y enemigos; morir solo reinicia el mapa. +- [ ] PAUSA deja congelado el juego; confirma salida al selector/titulo sin intro ni acciones retenidas. +- [ ] Morir abre derrota; REINICIAR restaura vida, objetos y enemigos; victoria avanza al siguiente. - [ ] Botones, scroll, letra, margen derecho y orientacion son utilizables en telefono. -La suite `test_menu_runtime.gd` cubre transiciones y botones por senales; no -sustituye toques reales en Android. Esta entrega solo ha ejecutado pruebas +Las suites `test_menu_runtime.gd` y `test_pause_result_runtime.gd` cubren +transiciones y botones por senales; no sustituyen toques reales en Android. Esta entrega solo ha ejecutado pruebas estaticas; consulta [el estado](project_status.md). ## Referencias de las API empleadas diff --git a/docs/tuning.md b/docs/tuning.md index 1f2bc10..7484544 100644 --- a/docs/tuning.md +++ b/docs/tuning.md @@ -156,8 +156,9 @@ movimiento. No se han cambiado sus asociaciones. | Decoracion delante/detras | `Draw Layer`, independientemente de la colision | | Texto de cartel | `Text` en la raiz de la instancia | -La meta beta Level00 conserva sus constantes de reinicio. La nueva salida al menu no -introduce un sistema de eventos configurable; ese trabajo sigue separado. +La meta de Level00 y la salida del Level01 comparten el resultado ¡VICTORIA!. +No hay reinicio automatico ni sistema de eventos configurable; ese trabajo +sigue separado. ## Intro, menu y objetos de esta entrega @@ -165,7 +166,7 @@ introduce un sistema de eventos configurable; ese trabajo sigue separado. `game/main.tscn` > raiz > **Intro Duration Seconds**: 10 por defecto, saltable desde el primer arranque. Aspecto en las escenas y tema de `ui/menu/`. El selector no requiere registrar rutas: guarda los mapas jugables directamente en `levels/`. -`Enable Level Menu` en LevelRoot controla el boton de salida. [Guia](start_menu.md). +`Enable Level Menu` en LevelRoot controla el boton de pausa y el resultado. [Guia](start_menu.md). En `pickups/data/*.tres`, `value` define la potencia. Para dano general y aereo, `duration` se ignora: duran hasta golpe y solo un `value` mayor sustituye al diff --git a/enemies/animations/backstage_guard_frames.tres b/enemies/animations/backstage_guard_frames.tres new file mode 100644 index 0000000..f253f96 --- /dev/null +++ b/enemies/animations/backstage_guard_frames.tres @@ -0,0 +1,116 @@ +[gd_resource type="SpriteFrames" load_steps=18 format=3] + +[ext_resource type="Texture2D" path="res://assets/enemies/backstage_guard.svg" id="atlas"] + +[sub_resource type="AtlasTexture" id="idle_0"] +atlas = ExtResource("atlas") +region = Rect2(0, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="idle_1"] +atlas = ExtResource("atlas") +region = Rect2(64, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_0"] +atlas = ExtResource("atlas") +region = Rect2(128, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_1"] +atlas = ExtResource("atlas") +region = Rect2(192, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_2"] +atlas = ExtResource("atlas") +region = Rect2(0, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_3"] +atlas = ExtResource("atlas") +region = Rect2(64, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_4"] +atlas = ExtResource("atlas") +region = Rect2(128, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_5"] +atlas = ExtResource("atlas") +region = Rect2(192, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_0"] +atlas = ExtResource("atlas") +region = Rect2(0, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_1"] +atlas = ExtResource("atlas") +region = Rect2(64, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_2"] +atlas = ExtResource("atlas") +region = Rect2(128, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="jump_0"] +atlas = ExtResource("atlas") +region = Rect2(192, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="jump_1"] +atlas = ExtResource("atlas") +region = Rect2(0, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="hurt_0"] +atlas = ExtResource("atlas") +region = Rect2(64, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="death_0"] +atlas = ExtResource("atlas") +region = Rect2(128, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="death_1"] +atlas = ExtResource("atlas") +region = Rect2(192, 192, 64, 64) +filter_clip = true + +[resource] +animations = [{ +"frames": [{"duration": 1.0, "texture": SubResource("idle_0")}, {"duration": 1.0, "texture": SubResource("idle_1")}], +"loop": true, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("walk_0")}, {"duration": 1.0, "texture": SubResource("walk_1")}, {"duration": 1.0, "texture": SubResource("walk_2")}, {"duration": 1.0, "texture": SubResource("walk_3")}, {"duration": 1.0, "texture": SubResource("walk_4")}, {"duration": 1.0, "texture": SubResource("walk_5")}], +"loop": true, +"name": &"walk", +"speed": 10.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("attack_0")}, {"duration": 1.0, "texture": SubResource("attack_1")}, {"duration": 1.0, "texture": SubResource("attack_2")}], +"loop": false, +"name": &"attack", +"speed": 12.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("jump_0")}, {"duration": 1.0, "texture": SubResource("jump_1")}], +"loop": true, +"name": &"jump", +"speed": 7.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("hurt_0")}], +"loop": false, +"name": &"hurt", +"speed": 10.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("death_0")}, {"duration": 1.0, "texture": SubResource("death_1")}], +"loop": false, +"name": &"death", +"speed": 6.0 +}] diff --git a/enemies/animations/feedback_tech_frames.tres b/enemies/animations/feedback_tech_frames.tres new file mode 100644 index 0000000..91f5b39 --- /dev/null +++ b/enemies/animations/feedback_tech_frames.tres @@ -0,0 +1,116 @@ +[gd_resource type="SpriteFrames" load_steps=18 format=3] + +[ext_resource type="Texture2D" path="res://assets/enemies/feedback_tech.svg" id="atlas"] + +[sub_resource type="AtlasTexture" id="idle_0"] +atlas = ExtResource("atlas") +region = Rect2(0, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="idle_1"] +atlas = ExtResource("atlas") +region = Rect2(64, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_0"] +atlas = ExtResource("atlas") +region = Rect2(128, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_1"] +atlas = ExtResource("atlas") +region = Rect2(192, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_2"] +atlas = ExtResource("atlas") +region = Rect2(0, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_3"] +atlas = ExtResource("atlas") +region = Rect2(64, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_4"] +atlas = ExtResource("atlas") +region = Rect2(128, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_5"] +atlas = ExtResource("atlas") +region = Rect2(192, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_0"] +atlas = ExtResource("atlas") +region = Rect2(0, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_1"] +atlas = ExtResource("atlas") +region = Rect2(64, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_2"] +atlas = ExtResource("atlas") +region = Rect2(128, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="jump_0"] +atlas = ExtResource("atlas") +region = Rect2(192, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="jump_1"] +atlas = ExtResource("atlas") +region = Rect2(0, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="hurt_0"] +atlas = ExtResource("atlas") +region = Rect2(64, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="death_0"] +atlas = ExtResource("atlas") +region = Rect2(128, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="death_1"] +atlas = ExtResource("atlas") +region = Rect2(192, 192, 64, 64) +filter_clip = true + +[resource] +animations = [{ +"frames": [{"duration": 1.0, "texture": SubResource("idle_0")}, {"duration": 1.0, "texture": SubResource("idle_1")}], +"loop": true, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("walk_0")}, {"duration": 1.0, "texture": SubResource("walk_1")}, {"duration": 1.0, "texture": SubResource("walk_2")}, {"duration": 1.0, "texture": SubResource("walk_3")}, {"duration": 1.0, "texture": SubResource("walk_4")}, {"duration": 1.0, "texture": SubResource("walk_5")}], +"loop": true, +"name": &"walk", +"speed": 10.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("attack_0")}, {"duration": 1.0, "texture": SubResource("attack_1")}, {"duration": 1.0, "texture": SubResource("attack_2")}], +"loop": false, +"name": &"attack", +"speed": 12.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("jump_0")}, {"duration": 1.0, "texture": SubResource("jump_1")}], +"loop": true, +"name": &"jump", +"speed": 7.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("hurt_0")}], +"loop": false, +"name": &"hurt", +"speed": 10.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("death_0")}, {"duration": 1.0, "texture": SubResource("death_1")}], +"loop": false, +"name": &"death", +"speed": 6.0 +}] diff --git a/enemies/animations/pogo_fan_frames.tres b/enemies/animations/pogo_fan_frames.tres new file mode 100644 index 0000000..6c62e11 --- /dev/null +++ b/enemies/animations/pogo_fan_frames.tres @@ -0,0 +1,116 @@ +[gd_resource type="SpriteFrames" load_steps=18 format=3] + +[ext_resource type="Texture2D" path="res://assets/enemies/pogo_fan.svg" id="atlas"] + +[sub_resource type="AtlasTexture" id="idle_0"] +atlas = ExtResource("atlas") +region = Rect2(0, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="idle_1"] +atlas = ExtResource("atlas") +region = Rect2(64, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_0"] +atlas = ExtResource("atlas") +region = Rect2(128, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_1"] +atlas = ExtResource("atlas") +region = Rect2(192, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_2"] +atlas = ExtResource("atlas") +region = Rect2(0, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_3"] +atlas = ExtResource("atlas") +region = Rect2(64, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_4"] +atlas = ExtResource("atlas") +region = Rect2(128, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_5"] +atlas = ExtResource("atlas") +region = Rect2(192, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_0"] +atlas = ExtResource("atlas") +region = Rect2(0, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_1"] +atlas = ExtResource("atlas") +region = Rect2(64, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_2"] +atlas = ExtResource("atlas") +region = Rect2(128, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="jump_0"] +atlas = ExtResource("atlas") +region = Rect2(192, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="jump_1"] +atlas = ExtResource("atlas") +region = Rect2(0, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="hurt_0"] +atlas = ExtResource("atlas") +region = Rect2(64, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="death_0"] +atlas = ExtResource("atlas") +region = Rect2(128, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="death_1"] +atlas = ExtResource("atlas") +region = Rect2(192, 192, 64, 64) +filter_clip = true + +[resource] +animations = [{ +"frames": [{"duration": 1.0, "texture": SubResource("idle_0")}, {"duration": 1.0, "texture": SubResource("idle_1")}], +"loop": true, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("walk_0")}, {"duration": 1.0, "texture": SubResource("walk_1")}, {"duration": 1.0, "texture": SubResource("walk_2")}, {"duration": 1.0, "texture": SubResource("walk_3")}, {"duration": 1.0, "texture": SubResource("walk_4")}, {"duration": 1.0, "texture": SubResource("walk_5")}], +"loop": true, +"name": &"walk", +"speed": 10.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("attack_0")}, {"duration": 1.0, "texture": SubResource("attack_1")}, {"duration": 1.0, "texture": SubResource("attack_2")}], +"loop": false, +"name": &"attack", +"speed": 12.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("jump_0")}, {"duration": 1.0, "texture": SubResource("jump_1")}], +"loop": true, +"name": &"jump", +"speed": 7.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("hurt_0")}], +"loop": false, +"name": &"hurt", +"speed": 10.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("death_0")}, {"duration": 1.0, "texture": SubResource("death_1")}], +"loop": false, +"name": &"death", +"speed": 6.0 +}] diff --git a/enemies/animations/rival_guitarist_frames.tres b/enemies/animations/rival_guitarist_frames.tres new file mode 100644 index 0000000..5eeb291 --- /dev/null +++ b/enemies/animations/rival_guitarist_frames.tres @@ -0,0 +1,116 @@ +[gd_resource type="SpriteFrames" load_steps=18 format=3] + +[ext_resource type="Texture2D" path="res://assets/enemies/rival_guitarist.svg" id="atlas"] + +[sub_resource type="AtlasTexture" id="idle_0"] +atlas = ExtResource("atlas") +region = Rect2(0, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="idle_1"] +atlas = ExtResource("atlas") +region = Rect2(64, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_0"] +atlas = ExtResource("atlas") +region = Rect2(128, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_1"] +atlas = ExtResource("atlas") +region = Rect2(192, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_2"] +atlas = ExtResource("atlas") +region = Rect2(0, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_3"] +atlas = ExtResource("atlas") +region = Rect2(64, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_4"] +atlas = ExtResource("atlas") +region = Rect2(128, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_5"] +atlas = ExtResource("atlas") +region = Rect2(192, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_0"] +atlas = ExtResource("atlas") +region = Rect2(0, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_1"] +atlas = ExtResource("atlas") +region = Rect2(64, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_2"] +atlas = ExtResource("atlas") +region = Rect2(128, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="jump_0"] +atlas = ExtResource("atlas") +region = Rect2(192, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="jump_1"] +atlas = ExtResource("atlas") +region = Rect2(0, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="hurt_0"] +atlas = ExtResource("atlas") +region = Rect2(64, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="death_0"] +atlas = ExtResource("atlas") +region = Rect2(128, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="death_1"] +atlas = ExtResource("atlas") +region = Rect2(192, 192, 64, 64) +filter_clip = true + +[resource] +animations = [{ +"frames": [{"duration": 1.0, "texture": SubResource("idle_0")}, {"duration": 1.0, "texture": SubResource("idle_1")}], +"loop": true, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("walk_0")}, {"duration": 1.0, "texture": SubResource("walk_1")}, {"duration": 1.0, "texture": SubResource("walk_2")}, {"duration": 1.0, "texture": SubResource("walk_3")}, {"duration": 1.0, "texture": SubResource("walk_4")}, {"duration": 1.0, "texture": SubResource("walk_5")}], +"loop": true, +"name": &"walk", +"speed": 10.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("attack_0")}, {"duration": 1.0, "texture": SubResource("attack_1")}, {"duration": 1.0, "texture": SubResource("attack_2")}], +"loop": false, +"name": &"attack", +"speed": 12.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("jump_0")}, {"duration": 1.0, "texture": SubResource("jump_1")}], +"loop": true, +"name": &"jump", +"speed": 7.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("hurt_0")}], +"loop": false, +"name": &"hurt", +"speed": 10.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("death_0")}, {"duration": 1.0, "texture": SubResource("death_1")}], +"loop": false, +"name": &"death", +"speed": 6.0 +}] diff --git a/enemies/animations/roadie_frames.tres b/enemies/animations/roadie_frames.tres new file mode 100644 index 0000000..b32a3cc --- /dev/null +++ b/enemies/animations/roadie_frames.tres @@ -0,0 +1,116 @@ +[gd_resource type="SpriteFrames" load_steps=18 format=3] + +[ext_resource type="Texture2D" path="res://assets/enemies/roadie.svg" id="atlas"] + +[sub_resource type="AtlasTexture" id="idle_0"] +atlas = ExtResource("atlas") +region = Rect2(0, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="idle_1"] +atlas = ExtResource("atlas") +region = Rect2(64, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_0"] +atlas = ExtResource("atlas") +region = Rect2(128, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_1"] +atlas = ExtResource("atlas") +region = Rect2(192, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_2"] +atlas = ExtResource("atlas") +region = Rect2(0, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_3"] +atlas = ExtResource("atlas") +region = Rect2(64, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_4"] +atlas = ExtResource("atlas") +region = Rect2(128, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_5"] +atlas = ExtResource("atlas") +region = Rect2(192, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_0"] +atlas = ExtResource("atlas") +region = Rect2(0, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_1"] +atlas = ExtResource("atlas") +region = Rect2(64, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="attack_2"] +atlas = ExtResource("atlas") +region = Rect2(128, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="jump_0"] +atlas = ExtResource("atlas") +region = Rect2(192, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="jump_1"] +atlas = ExtResource("atlas") +region = Rect2(0, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="hurt_0"] +atlas = ExtResource("atlas") +region = Rect2(64, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="death_0"] +atlas = ExtResource("atlas") +region = Rect2(128, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="death_1"] +atlas = ExtResource("atlas") +region = Rect2(192, 192, 64, 64) +filter_clip = true + +[resource] +animations = [{ +"frames": [{"duration": 1.0, "texture": SubResource("idle_0")}, {"duration": 1.0, "texture": SubResource("idle_1")}], +"loop": true, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("walk_0")}, {"duration": 1.0, "texture": SubResource("walk_1")}, {"duration": 1.0, "texture": SubResource("walk_2")}, {"duration": 1.0, "texture": SubResource("walk_3")}, {"duration": 1.0, "texture": SubResource("walk_4")}, {"duration": 1.0, "texture": SubResource("walk_5")}], +"loop": true, +"name": &"walk", +"speed": 10.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("attack_0")}, {"duration": 1.0, "texture": SubResource("attack_1")}, {"duration": 1.0, "texture": SubResource("attack_2")}], +"loop": false, +"name": &"attack", +"speed": 12.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("jump_0")}, {"duration": 1.0, "texture": SubResource("jump_1")}], +"loop": true, +"name": &"jump", +"speed": 7.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("hurt_0")}], +"loop": false, +"name": &"hurt", +"speed": 10.0 +}, { +"frames": [{"duration": 1.0, "texture": SubResource("death_0")}, {"duration": 1.0, "texture": SubResource("death_1")}], +"loop": false, +"name": &"death", +"speed": 6.0 +}] diff --git a/enemies/variants/backstage_guard.tscn b/enemies/variants/backstage_guard.tscn index 4d311f5..04ac6c2 100644 --- a/enemies/variants/backstage_guard.tscn +++ b/enemies/variants/backstage_guard.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] [ext_resource type="PackedScene" path="res://enemies/walker/walker.tscn" id="1_walker"] -[ext_resource type="Texture2D" path="res://assets/enemies/backstage_guard.svg" id="2_sprite"] +[ext_resource type="SpriteFrames" path="res://enemies/animations/backstage_guard_frames.tres" id="2_sprite"] [node name="Walker" instance=ExtResource("1_walker")] enemy_display_name = "Guardia del Camerino" @@ -25,4 +25,4 @@ respawn_delay = 0.0 show_debug_hitboxes = false [node name="Visual" parent="." index="0"] -texture = ExtResource("2_sprite") +sprite_frames = ExtResource("2_sprite") diff --git a/enemies/variants/feedback_tech.tscn b/enemies/variants/feedback_tech.tscn index 0797f70..47aebce 100644 --- a/enemies/variants/feedback_tech.tscn +++ b/enemies/variants/feedback_tech.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] [ext_resource type="PackedScene" path="res://enemies/walker/walker.tscn" id="1_walker"] -[ext_resource type="Texture2D" path="res://assets/enemies/feedback_tech.svg" id="2_sprite"] +[ext_resource type="SpriteFrames" path="res://enemies/animations/feedback_tech_frames.tres" id="2_sprite"] [node name="Walker" instance=ExtResource("1_walker")] enemy_display_name = "Tecnico del Feedback" @@ -24,4 +24,4 @@ respawn_delay = 0.0 show_debug_hitboxes = false [node name="Visual" parent="." index="0"] -texture = ExtResource("2_sprite") +sprite_frames = ExtResource("2_sprite") diff --git a/enemies/variants/pogo_fan.tscn b/enemies/variants/pogo_fan.tscn index fe966b2..1976151 100644 --- a/enemies/variants/pogo_fan.tscn +++ b/enemies/variants/pogo_fan.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] [ext_resource type="PackedScene" path="res://enemies/walker/walker.tscn" id="1_walker"] -[ext_resource type="Texture2D" path="res://assets/enemies/pogo_fan.svg" id="2_sprite"] +[ext_resource type="SpriteFrames" path="res://enemies/animations/pogo_fan_frames.tres" id="2_sprite"] [node name="Walker" instance=ExtResource("1_walker")] enemy_display_name = "Fan del Pogo Eterno" @@ -28,4 +28,4 @@ respawn_delay = 0.0 show_debug_hitboxes = false [node name="Visual" parent="." index="0"] -texture = ExtResource("2_sprite") +sprite_frames = ExtResource("2_sprite") diff --git a/enemies/variants/rival_guitarist.tscn b/enemies/variants/rival_guitarist.tscn index d047976..c2fcf4e 100644 --- a/enemies/variants/rival_guitarist.tscn +++ b/enemies/variants/rival_guitarist.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] [ext_resource type="PackedScene" path="res://enemies/walker/walker.tscn" id="1_walker"] -[ext_resource type="Texture2D" path="res://assets/enemies/rival_guitarist.svg" id="2_sprite"] +[ext_resource type="SpriteFrames" path="res://enemies/animations/rival_guitarist_frames.tres" id="2_sprite"] [node name="Walker" instance=ExtResource("1_walker")] enemy_display_name = "Guitarrista Rival" @@ -28,4 +28,4 @@ respawn_delay = 0.0 show_debug_hitboxes = false [node name="Visual" parent="." index="0"] -texture = ExtResource("2_sprite") +sprite_frames = ExtResource("2_sprite") diff --git a/enemies/variants/roadie.tscn b/enemies/variants/roadie.tscn index 7d3ebf6..b95c063 100644 --- a/enemies/variants/roadie.tscn +++ b/enemies/variants/roadie.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] [ext_resource type="PackedScene" path="res://enemies/walker/walker.tscn" id="1_walker"] -[ext_resource type="Texture2D" path="res://assets/enemies/roadie.svg" id="2_sprite"] +[ext_resource type="SpriteFrames" path="res://enemies/animations/roadie_frames.tres" id="2_sprite"] [node name="Walker" instance=ExtResource("1_walker")] enemy_display_name = "Roadie del Mas Alla" @@ -20,4 +20,4 @@ respawn_delay = 0.0 show_debug_hitboxes = false [node name="Visual" parent="." index="0"] -texture = ExtResource("2_sprite") +sprite_frames = ExtResource("2_sprite") diff --git a/enemies/walker/walker.gd b/enemies/walker/walker.gd index 2801fc1..fc16173 100644 --- a/enemies/walker/walker.gd +++ b/enemies/walker/walker.gd @@ -156,7 +156,7 @@ var drops_handled_by_level: bool = false @onready var attack_collision: CollisionShape2D = $AttackHitbox/CollisionShape2D @onready var floor_probe: RayCast2D = $FloorProbe @onready var visibility_notifier: VisibleOnScreenNotifier2D = $VisibleOnScreenNotifier2D -@onready var visual: Sprite2D = $Visual +@onready var visual: AnimatedSprite2D = $Visual # ============================================================================ @@ -222,6 +222,7 @@ func _ready() -> void: _update_facing() _reset_attack_hitbox_position() + visual.play(&"idle") queue_redraw() @@ -242,6 +243,7 @@ func _physics_process(delta: float) -> void: if not is_awake: velocity.x = 0.0 move_and_slide() + _update_actor_animation() queue_redraw() return @@ -249,6 +251,7 @@ func _physics_process(delta: float) -> void: if target == null: velocity.x = 0.0 move_and_slide() + _update_actor_animation() queue_redraw() return @@ -263,6 +266,7 @@ func _physics_process(delta: float) -> void: velocity.x = move_toward(velocity.x, 0.0, knockback_strength * delta) move_and_slide() + _update_actor_animation() queue_redraw() return @@ -273,6 +277,7 @@ func _physics_process(delta: float) -> void: move_and_slide() _update_jump_visual() + _update_actor_animation() queue_redraw() @@ -483,6 +488,27 @@ func _find_jump_landing(destination: Vector2, max_rise: float, gravity_y: float, return best_landing +## Las piernas de los enemigos se animan segun velocidad y estado de la IA. +## Es puramente visual: ataque, hitboxes, navegacion y tiempos permanecen intactos. +func _update_actor_animation() -> void: + var animation: StringName = &"idle" + if is_dead: + animation = &"death" + elif hit_stun_timer > 0.0: + animation = &"hurt" + elif attack_state != AttackState.IDLE: + animation = &"attack" + elif not is_on_floor(): + animation = &"jump" + elif absf(velocity.x) > 7.0: + animation = &"walk" + if visual.sprite_frames == null or not visual.sprite_frames.has_animation(animation): + return + visual.speed_scale = clampf(absf(velocity.x) / maxf(move_speed, 1.0), 0.7, 1.4) if animation == &"walk" else 1.0 + if visual.animation != animation: + visual.play(animation) + + ## Orienta ligeramente el sprite durante el vuelo sin cambiar su colision. func _update_jump_visual() -> void: if not _jump_in_progress: @@ -727,6 +753,7 @@ func _die() -> void: velocity = Vector2(_last_hit_direction * 150.0, -210.0) COMBAT_FX.spawn(get_parent(), global_position, &"death", _last_hit_direction) # La muerte logica y su senal ocurren una sola vez; la animacion no retrasa las recompensas. + _update_actor_animation() died.emit() # Los encuentros de laboratorio entregan su objeto asignado; el resto conserva su tabla aleatoria. diff --git a/enemies/walker/walker.tscn b/enemies/walker/walker.tscn index 38b4965..8532ea8 100644 --- a/enemies/walker/walker.tscn +++ b/enemies/walker/walker.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=5 format=3] [ext_resource type="Script" path="res://enemies/walker/walker.gd" id="1_walker"] -[ext_resource type="Texture2D" path="res://assets/enemies/roadie.svg" id="2_sprite"] +[ext_resource type="SpriteFrames" path="res://enemies/animations/roadie_frames.tres" id="2_sprite"] [sub_resource type="RectangleShape2D" id="BodyShape"] size = Vector2(28, 52) @@ -14,10 +14,10 @@ collision_layer = 4 collision_mask = 1 script = ExtResource("1_walker") -[node name="Visual" type="Sprite2D" parent="."] +[node name="Visual" type="AnimatedSprite2D" parent="."] z_index = -1 -texture_filter = 1 -texture = ExtResource("2_sprite") +texture_filter = 2 +sprite_frames = ExtResource("2_sprite") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2(0, 0) diff --git a/game/run_session.gd b/game/run_session.gd index a1e8f20..1e414ed 100644 --- a/game/run_session.gd +++ b/game/run_session.gd @@ -5,6 +5,8 @@ extends Node ## No guarda vida, buffs, raros pendientes ni escribe en el perfil permanente. var level_path: String = "" var selected_character: CharacterData +## Solo sirve para abrir directamente el selector al abandonar una partida. +var show_levels_on_menu_entry: bool = false func begin_level(path: String, character: CharacterData) -> void: @@ -16,6 +18,7 @@ func begin_level(path: String, character: CharacterData) -> void: func clear() -> void: level_path = "" selected_character = null + show_levels_on_menu_entry = false ## Busca la escena elegida entre los padres, sin depender de current_scene durante _ready. diff --git a/levels/level_00.gd b/levels/level_00.gd index d9355fd..b3b5d64 100644 --- a/levels/level_00.gd +++ b/levels/level_00.gd @@ -5,11 +5,9 @@ extends LevelRoot ## grupos de enemigos y objetos opcionales. Las posiciones y colisiones se editan ## en level_00.tscn; este script solo gestiona el progreso y la meta. ## No interviene en los drops: los Walker usan su sistema habitual. -## La meta conserva el reinicio de pruebas; Menu permite salir en cualquier momento. +## La meta comparte ahora la pantalla de victoria con el resto de niveles. -const FINISH_RESTART_SECONDS: float = 9.0 - @onready var player: CharacterBody2D = $Player @onready var enemies: Node2D = $Enemies @onready var status_label: Label = $LevelHUD/Overlay/Status @@ -18,7 +16,6 @@ const FINISH_RESTART_SECONDS: float = 9.0 var defeated_enemies: int = 0 var completed: bool = false var _finish_pending: bool = false -var _finish_timer: float = 0.0 ## Conecta meta y derrotas; LevelRoot aplica los limites de camara. @@ -34,15 +31,12 @@ func _ready() -> void: _update_status() -## Actualiza el progreso o espera el reinicio tras completar la calle. +## Actualiza el estado hasta alcanzar la meta; el resultado congela el juego. func _process(delta: float) -> void: super._process(delta) if Engine.is_editor_hint(): return if completed: - _finish_timer += delta - if _finish_timer >= FINISH_RESTART_SECONDS: - get_tree().reload_current_scene() return _update_status() @@ -74,7 +68,4 @@ func _complete_finish() -> void: if not complete_level(): return completed = true - finish_message.text = "FIN DE LA GIRA!\nEnemigos derrotados: %d / %d\nReinicio en 9 s" % [ - defeated_enemies, enemies.get_child_count() - ] - finish_message.visible = true + # El panel comun muestra VICTORIA y ofrece el siguiente nivel. diff --git a/levels/level_root.gd b/levels/level_root.gd index 1e0f906..b336991 100644 --- a/levels/level_root.gd +++ b/levels/level_root.gd @@ -7,6 +7,7 @@ extends Node2D ## Los niveles con reglas propias pueden heredar y llamar a super en sus callbacks. signal level_completed +signal level_failed signal rare_items_changed signal progress_notice(message: String) @@ -18,7 +19,7 @@ const NAVIGATION_SCENE: PackedScene = preload("res://ui/menu/level_navigation.ts @export var completion_rewards: Array[RareItemData] = [] @export_category("Level") -## Boton Menu y Escape/atras. No se crea dentro del editor ni altera la escena guardada. +## Boton de pausa y pantallas de resultado. No se crean en el editor ni alteran la escena guardada. @export var enable_level_menu: bool = true ## Limites locales de camara. El rectangulo se puede ver antes de ejecutar el juego. @export var camera_bounds: Rect2 = Rect2(0.0, 0.0, 2400.0, 1280.0): @@ -56,7 +57,7 @@ func _ready() -> void: push_error("LevelRoot necesita una instancia de player/player.tscn llamada Player.") return if _level_player.has_signal("died"): - _level_player.connect("died", discard_pending_items) + _level_player.connect("died", _on_player_died) apply_camera_bounds() if enable_level_menu and not has_node("LevelNavigation"): add_child(NAVIGATION_SCENE.instantiate()) @@ -84,8 +85,7 @@ func _process(_delta: float) -> void: if _level_player.global_position.y > to_global(camera_bounds.end).y + fall_margin: _reload_pending = true discard_pending_items() - # La recarga se difiere para no destruir nodos durante un paso de fisica. - get_tree().call_deferred("reload_current_scene") + level_failed.emit() ## Busca el escenario propietario sin depender de la profundidad de Items/Scenery. @@ -156,6 +156,14 @@ func _can_complete() -> bool: and is_instance_valid(_level_player) and not bool(_level_player.get("is_dead")) +## Muerte por dano: descarta raros y abre la pantalla de derrota. +func _on_player_died() -> void: + if _attempt_lost or _level_completed: + return + discard_pending_items() + level_failed.emit() + + ## Un golpe no pierde un raro pendiente; morir o salir del escenario si. func discard_pending_items() -> void: _attempt_lost = true diff --git a/pickups/pickup.gd b/pickups/pickup.gd index ae97af5..d5311cd 100644 --- a/pickups/pickup.gd +++ b/pickups/pickup.gd @@ -67,7 +67,7 @@ func _ready() -> void: ## Habilita el drop y resuelve un contacto que hubiera ocurrido durante la espera. func _enable_collection_after_delay() -> void: - await get_tree().create_timer(collection_delay_seconds).timeout + await get_tree().create_timer(collection_delay_seconds, false).timeout if not is_inside_tree(): return _can_collect = true diff --git a/player/player.gd b/player/player.gd index 619679e..8ce896b 100644 --- a/player/player.gd +++ b/player/player.gd @@ -849,20 +849,14 @@ func take_damage(amount: int, source_position: Vector2, knockback_multiplier: fl _die() -## Detiene el especial, emite la muerte y solicita la recarga fuera del paso de fisica. +## Detiene el especial y comunica la derrota al LevelRoot (sin reinicio automatico). func _die() -> void: is_dead = true _special_active = false feedback_camera.call("start_solo", 0.0) died.emit() - # La recarga se difiere para no destruir el arbol mientras la fisica procesa un contacto. - call_deferred("_reload_level") - - -## Reinicia la escena actual; no selecciona ni desbloquea niveles. -func _reload_level() -> void: - get_tree().reload_current_scene() + # La pantalla de derrota ofrece reiniciar, selector y titulo. # ============================================================================ @@ -916,6 +910,13 @@ func _update_animation() -> void: elif absf(velocity.x) > 10.0: animation_name = &"walk" + # Cadencia proporcional al desplazamiento real, sin oscilacion artificial de piernas. + if animation_name == &"walk": + var pace: float = absf(velocity.x) / maxf(get_move_speed(), 1.0) + animated_sprite.speed_scale = lerpf(0.65, 1.55, clampf(pace, 0.0, 1.0)) + else: + animated_sprite.speed_scale = 1.0 + # Un personaje personalizado puede aportar menos animaciones; se mantiene una alternativa valida. if not animated_sprite.sprite_frames.has_animation(animation_name): animation_name = &"idle" diff --git a/player/player.tscn b/player/player.tscn index b198f37..6af283e 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -43,7 +43,7 @@ monitorable = false [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1502470275] z_index = -1 -texture_filter = 1 +texture_filter = 2 position = Vector2(0, -2) sprite_frames = ExtResource("2_frames") animation = &"idle" diff --git a/tests/test_band_resources.py b/tests/test_band_resources.py index 7d5ed4e..eb4fde4 100644 --- a/tests/test_band_resources.py +++ b/tests/test_band_resources.py @@ -84,7 +84,7 @@ class BandResourceTests(unittest.TestCase): for role in ROLES: atlas = ET.parse(ROOT / f'assets/characters/band/{role}.svg').getroot() self.assertEqual((atlas.attrib['width'], atlas.attrib['height']), ('512', '320')) - self.assertEqual(atlas.attrib['shape-rendering'], 'crispEdges') + self.assertEqual(atlas.attrib['shape-rendering'], 'geometricPrecision') self.assertFalse(list(atlas.iter(SVG_NS + 'image'))) self.assertFalse(list(atlas.iter(SVG_NS + 'text'))) text = source(f'player/characters/animations/{role}_frames.tres') @@ -101,15 +101,19 @@ class BandResourceTests(unittest.TestCase): self.assertEqual(int(re.search(r'load_steps=(\d+)', text)[1]), 1+len(re.findall(r'^\[(?:ext|sub)_resource ', text, re.M))) - def test_diego_keeps_every_original_cell_except_pound(self): - old = cell_groups('assets/characters/ankarde/player_pixel.svg') - new = cell_groups('assets/characters/band/guitarist.svg') - for name in old: - if name.startswith('ground_pound'): - self.assertNotEqual(ET.tostring(old[name]), ET.tostring(new[name])) - else: - # El texto conserva las celdas, incluidas sus coordenadas de atlas. - self.assertEqual(ET.tostring(old[name]), ET.tostring(new[name]), name) + def test_vector_walk_uses_six_distinct_leg_contacts(self): + # Ninguna celda conserva los rectangulos originales; pasos con tobillo y rodilla. + for role in ROLES: + groups = cell_groups(f'assets/characters/band/{role}.svg') + paths = [] + for i in range(6): + group = groups[f'walk_{i}'] + paths.append(group.find(SVG_NS+'path').attrib['d']) + self.assertTrue(any('url(#jacket)' in str(node.attrib) + for node in group.iter(SVG_NS+'path')), role) + self.assertGreaterEqual(len(set(paths)), 5, role) + self.assertIn('def draw_shoe(', source('tools/generate_vector_character_art.py')) + self.assertIn('def pose_parameters(', source('tools/generate_vector_character_art.py')) def test_punch_uses_identical_timing_in_every_profile(self): expected = [('1.0', 'punch_0'), ('0.75', 'punch_1'), ('1.15', 'punch_2'), @@ -180,8 +184,8 @@ class BandResourceTests(unittest.TestCase): player = source('player/player.gd') self.assertLess(player.index('session.character_for(self)'), player.index('current_health = get_max_health()')) self.assertLess(player.index('character_data = selected'), player.index('_setup_attack_hitboxes()')) - reload = player.split('func _reload_level()', 1)[1].split('\n\n', 1)[0] - self.assertNotIn('session.clear', reload) + self.assertNotIn('reload_current_scene()', player.split('func _die()', 1)[1].split('func _update_timers(', 1)[0]) + self.assertIn('session.begin_level(_next_level_path, character)', source('ui/menu/level_navigation.gd')) self.assertIn('SAVE_VERSION: int = 1', source('game/player_progress.gd')) self.assertIn('res://player/characters/guitarist.tres', source('player/player.tscn')) diff --git a/tests/test_level_01_resources.py b/tests/test_level_01_resources.py index a0d6326..be7bc79 100644 --- a/tests/test_level_01_resources.py +++ b/tests/test_level_01_resources.py @@ -85,7 +85,7 @@ class Level01ResourceTests(unittest.TestCase): self.assertIn('special_radius = 290.0', SCENE) for svg in (ROOT / 'assets/enemies').glob('*.svg'): parsed = ElementTree.parse(svg).getroot() - self.assertEqual(parsed.attrib['viewBox'], '0 0 32 56') + self.assertEqual(parsed.attrib['viewBox'], '0 0 256 256') self.assertIn('path="res://world/triggers/level_exit.tscn"', SCENE) diff --git a/tests/test_menu_resources.py b/tests/test_menu_resources.py index 2bd0b1d..c826905 100644 --- a/tests/test_menu_resources.py +++ b/tests/test_menu_resources.py @@ -42,11 +42,14 @@ class MenuResourceTests(unittest.TestCase): self.assertNotIn('res://player/', scene) def test_return_to_menu_does_not_repeat_boot(self): - for name in ('ui/menu/level_navigation.gd', 'world/triggers/level_exit.gd'): - code = (ROOT / name).read_text() - self.assertIn('res://ui/menu/main_menu.tscn', code) + navigation = (ROOT / 'ui/menu/level_navigation.gd').read_text() + exit_code = (ROOT / 'world/triggers/level_exit.gd').read_text() + self.assertIn('res://ui/menu/main_menu.tscn', navigation) + self.assertIn('call_deferred', navigation) + self.assertIn('complete_level()', exit_code) + self.assertIn('call_deferred', exit_code) + for code in (navigation, exit_code): self.assertNotIn('res://game/main.tscn', code) - self.assertIn('call_deferred', code) level = (ROOT / 'levels/level_root.gd').read_text() self.assertIn('if enable_level_menu and not has_node("LevelNavigation"):', level) diff --git a/tests/test_menu_runtime.gd b/tests/test_menu_runtime.gd index 2b9b44a..908fa10 100644 --- a/tests/test_menu_runtime.gd +++ b/tests/test_menu_runtime.gd @@ -69,14 +69,20 @@ func _run() -> void: _check(session.selected_character == DIEGO, "La doble pulsacion no reemplaza al personaje") # El mismo camino utilizado tras morir conserva al integrante elegido. _check(reload_current_scene() == OK, "Debe poder reiniciar el escenario") - level = await _wait_for_scene(BETA_PATH) + level = await _wait_for_new_scene(BETA_PATH, level) if level == null: quit(1) return _check((level.get_node("Player").get("character_data") as CharacterData) == DIEGO, "Recargar conserva la eleccion del intento") Input.action_press("move_right") - level.get_node("LevelNavigation").call("return_to_menu") + var navigation: Node = level.get_node("LevelNavigation") + navigation.call("pause_game") + _check(paused and navigation.get_node("Overlay/Dialog").visible, "Pausa detiene el juego") + navigation.call("return_to_menu") + _check(navigation.get_node("Overlay/Dialog/Panel/Margin/Options/Confirm").visible, + "Abandonar pide confirmacion") + navigation.call("_confirm_exit") menu = await _wait_for_scene(MENU_PATH) _check(not Input.is_action_pressed("move_right"), "Salir libera los botones virtuales") if menu == null: @@ -96,8 +102,15 @@ func _run() -> void: var exit_area: Node = level.get_node("Triggers/Exit") exit_area.call("_on_body_entered", level.get_node("Player")) exit_area.call("_on_body_entered", level.get_node("Player")) + # La meta no cambia de escena: confirma y muestra el resultado. + await process_frame + _check(current_scene == level and paused, + "La salida muestra victoria sin abandonar el escenario") + _check(level.get_node("LevelNavigation/Overlay/Dialog/Panel/Margin/Options/Next").visible, + "Victoria ofrece pasar al siguiente nivel") + level.get_node("LevelNavigation").call("_select_title") menu = await _wait_for_scene(MENU_PATH) - _check(menu != null, "La salida devuelve al menu") + _check(menu != null, "Desde victoria se puede volver al titulo") # Segunda ruta: vencimiento del temporizador sin pulsar Saltar. _check(change_scene_to_file(BOOT_PATH) == OK, "Debe poder abrirse de nuevo la intro") @@ -116,6 +129,17 @@ func _run() -> void: quit(0 if _failures == 0 else 1) +func _wait_for_new_scene(path: String, previous_scene: Node) -> Node: + var deadline: int = Time.get_ticks_msec() + 15000 + while Time.get_ticks_msec() < deadline: + if current_scene != null and current_scene != previous_scene \ + and current_scene.scene_file_path == path and current_scene.is_node_ready(): + return current_scene + await create_timer(0.02).timeout + _check(false, "No se recargo una instancia nueva de " + path) + return null + + func _wait_for_scene(path: String) -> Node: var deadline: int = Time.get_ticks_msec() + 15000 while Time.get_ticks_msec() < deadline: diff --git a/tests/test_pause_result_runtime.gd b/tests/test_pause_result_runtime.gd new file mode 100644 index 0000000..c326b06 --- /dev/null +++ b/tests/test_pause_result_runtime.gd @@ -0,0 +1,100 @@ +extends SceneTree + +## Integracion: pausa, confirmacion de abandono, muerte, reinicio y siguiente nivel. +## Ejecutar con: godot --headless --path . --script res://tests/test_pause_result_runtime.gd +const BETA: String = "res://levels/level_00.tscn" +const NEXT: String = "res://levels/level_01.tscn" +const MENU: String = "res://ui/menu/main_menu.tscn" +const DIEGO: CharacterData = preload("res://player/characters/guitarist.tres") +var _failures: int = 0 + + +func _initialize() -> void: + call_deferred("_run") + + +func _run() -> void: + preload("res://tests/runtime_test_profile.gd").prepare(self) + var session: RunSessionState = root.get_node("RunSession") as RunSessionState + session.begin_level(BETA, DIEGO) + _check(change_scene_to_file(BETA) == OK, "Abre Level00") + var level: Node = await _wait_for_scene(BETA) + if level == null: + quit(1) + return + var navigation: Node = level.get_node("LevelNavigation") + var controls: Node = navigation.get_node("Overlay/Dialog/Panel/Margin/Options") + (navigation.get_node("Overlay/Pause") as Button).pressed.emit() + _check(paused, "Pausa congela el SceneTree") + _check(controls.get_node("Resume").visible, "Permite reanudar") + (controls.get_node("Levels") as Button).pressed.emit() + _check(controls.get_node("Confirm").visible, "Selector exige confirmacion") + _check((controls.get_node("Description") as Label).text.contains("objetos raros"), + "La advertencia menciona objetos pendientes") + (controls.get_node("Cancel") as Button).pressed.emit() + _check(paused and controls.get_node("Resume").visible, "Cancelar mantiene pausa") + (controls.get_node("Resume") as Button).pressed.emit() + _check(not paused and not navigation.get_node("Overlay/Dialog").visible, "Reanudar descongela") + (level.get_node("Player") as CharacterBody2D).call("take_damage", 1000, Vector2(-100, 0)) + _check(paused and controls.get_node("Restart").visible, "Morir abre pantalla de derrota") + _check((controls.get_node("Heading") as Label).text.contains("HAS MUERTO"), "Texto de derrota") + (controls.get_node("Restart") as Button).pressed.emit() + level = await _wait_for_new_scene(BETA, level) + if level == null: + quit(1) + return + _check(not paused, "Reiniciar reanuda el arbol") + _check(level.get_node("Player").get("character_data") == DIEGO, "Reintento conserva personaje") + _check(level.call("complete_level"), "La meta confirma el nivel") + navigation = level.get_node("LevelNavigation") + controls = navigation.get_node("Overlay/Dialog/Panel/Margin/Options") + _check(paused and controls.get_node("Next").visible, "Victoria muestra siguiente nivel") + _check((controls.get_node("Heading") as Label).text.contains("VICTORIA"), "Texto de victoria") + _check(not (controls.get_node("Next") as Button).disabled, "Level00 conduce a Level01") + (controls.get_node("Next") as Button).pressed.emit() + level = await _wait_for_scene(NEXT) + if level == null: + quit(1) + return + _check(not paused, "Pasar al siguiente nivel reanuda") + _check(level.get_node("Player").get("character_data") == DIEGO, "Avanzar conserva personaje") + _check(level.call("complete_level"), "Level01 tiene salida de victoria") + controls = level.get_node("LevelNavigation/Overlay/Dialog/Panel/Margin/Options") + _check((controls.get_node("Next") as Button).disabled, "En el ultimo nivel no hay siguiente") + (controls.get_node("Levels") as Button).pressed.emit() + var menu: Node = await _wait_for_scene(MENU) + if menu != null: + _check((menu.get_node("Margin/Layout/Levels") as VBoxContainer).visible, + "Selector se abre directamente desde victoria") + _check(session.selected_character == null, "Abandonar limpia el personaje") + if _failures == 0: + print("OK PAUSA/RESULTADO: resume, aviso, derrota, reinicio, victoria y siguiente nivel") + quit(0 if _failures == 0 else 1) + + +func _wait_for_scene(path: String) -> Node: + var deadline: int = Time.get_ticks_msec() + 15000 + while Time.get_ticks_msec() < deadline: + if current_scene != null and current_scene.scene_file_path == path and current_scene.is_node_ready(): + return current_scene + await create_timer(0.02).timeout + _check(false, "No llego a abrirse " + path) + return null + + +func _check(condition: bool, message: String) -> void: + if not condition: + _failures += 1 + push_error(message) + + +## Al recargar la ruta es identica: esperar una instancia distinta evita leer la vieja. +func _wait_for_new_scene(path: String, previous_scene: Node) -> Node: + var deadline: int = Time.get_ticks_msec() + 15000 + while Time.get_ticks_msec() < deadline: + if current_scene != null and current_scene != previous_scene \ + and current_scene.scene_file_path == path and current_scene.is_node_ready(): + return current_scene + await create_timer(0.02).timeout + _check(false, "No se recargo una instancia nueva de " + path) + return null diff --git a/tests/test_pixel_combat_resources.py b/tests/test_pixel_combat_resources.py index f95d872..5a14de9 100644 --- a/tests/test_pixel_combat_resources.py +++ b/tests/test_pixel_combat_resources.py @@ -25,13 +25,13 @@ class PixelCombatResourceTests(unittest.TestCase): self.assertLessEqual(x + w, width) self.assertLessEqual(y + h, height) - def test_player_poses_and_pixel_scale(self): + def test_player_poses_and_vector_scale(self): names = set(re.findall(r'"name": &"([^"]+)"', FRAMES.read_text())) self.assertEqual(names, {"idle", "walk", "jump", "fall", "punch", "ground_pound", "land", "special_start", "special", "special_end", "hurt"}) scene = (ROOT / "player/player.tscn").read_text() self.assertIn("size = Vector2(26, 52)", scene) - self.assertIn("texture_filter = 1", scene) + self.assertIn("texture_filter = 2", scene) self.assertNotIn("scale = Vector2(0.56, 0.56)", scene) self.assertIn("speed_scale = 1.0", scene) diff --git a/tests/test_pixel_combat_runtime.gd b/tests/test_pixel_combat_runtime.gd index 41ded10..b8df6f1 100644 --- a/tests/test_pixel_combat_runtime.gd +++ b/tests/test_pixel_combat_runtime.gd @@ -94,7 +94,7 @@ func _run() -> void: _check(int(player.get("special_charge")) == mini(int(player.get("special_max_charge")), charge_before_death + int(player.get("special_charge_per_kill"))), "Death must grant special charge exactly once") enemy.call("_update_death_animation", 0.20) - var enemy_visual: Sprite2D = enemy.get_node("Visual") as Sprite2D + var enemy_visual: AnimatedSprite2D = enemy.get_node("Visual") as AnimatedSprite2D _check(enemy.visible and not is_zero_approx(enemy_visual.rotation), "Missing collapse animation") enemy.call("_update_death_animation", 1.0) _check(not enemy.visible, "Enemy must hide after the death animation") diff --git a/tests/test_rare_items_resources.py b/tests/test_rare_items_resources.py index 7bfc5f2..e395a5d 100644 --- a/tests/test_rare_items_resources.py +++ b/tests/test_rare_items_resources.py @@ -50,7 +50,8 @@ class RareItemResourceTests(unittest.TestCase): def test_death_and_fall_invalidate_the_attempt(self): level = source('levels/level_root.gd') - self.assertIn('_level_player.connect("died", discard_pending_items)', level) + self.assertIn('_level_player.connect("died", _on_player_died)', level) + self.assertIn('level_failed.emit()', level) self.assertIn('_reload_pending = true\n\t\tdiscard_pending_items()', level) discard = level.split('func discard_pending_items()', 1)[1].split('\nfunc ', 1)[0] self.assertIn('_attempt_lost = true', discard) diff --git a/tools/generate_band_art.py b/tools/generate_band_art.py index b5be6c0..d0654be 100644 --- a/tools/generate_band_art.py +++ b/tools/generate_band_art.py @@ -1,385 +1,11 @@ -"""Genera los cuatro atlas SVG y SpriteFrames a partir del pixel art original. +"""Compatibilidad con el comando historico: ahora genera el nuevo arte vectorial. -Uso: python tools/generate_band_art.py (requiere Pillow solo para regenerar arte). -El juego consume los SVG/.tres ya versionados; nunca ejecuta este programa. -Diego conserva exactamente sus celdas originales salvo la caida ofensiva. -Las demas apariencias reutilizan las poses comunes y el mismo punetazo. + python tools/generate_band_art.py + +Los SpriteFrames de la banda mantienen las mismas 40 regiones; los atlas +pueden regenerarse tambien mediante generate_vector_character_art.py. """ -from __future__ import annotations - -from collections import defaultdict -from pathlib import Path -import math -import re -import xml.etree.ElementTree as ET - -from PIL import Image, ImageDraw - -ROOT = Path(__file__).resolve().parents[1] -SOURCE = ROOT / "assets/characters/ankarde/player_pixel.svg" -DESTINATION = ROOT / "assets/characters/band" -ROLES = ("guitarist", "drummer", "bassist", "singer") -OUTLINE = "#161723" -SKIN = "#ecb78b" -SKIN_LIGHT = "#ffdab0" -SKIN_DARK = "#b57964" -SHIRT = "#252b39" -SHIRT_LIGHT = "#3e475c" -HAIR = ("#30242a", "#543933", "#805345") -CELL = 64 - - -def rgba(color: str) -> tuple[int, int, int, int]: - return tuple(bytes.fromhex(color[1:])) + (255,) - - -def read_source() -> dict[str, Image.Image]: - """Reconstruye las celdas originales sin rasterizadores ni dependencias de SVG.""" - result = {} - for group in ET.parse(SOURCE).getroot().findall("{*}g"): - image = Image.new("RGBA", (CELL, CELL)) - draw = ImageDraw.Draw(image) - for path in group: - if not path.tag.endswith("path"): - continue - commands = path.attrib["d"] - pattern = r"M(-?\d+) (-?\d+)h(\d+)v(\d+)h-\d+z" - if re.sub(pattern, "", commands): - raise ValueError("El atlas original ya no usa rectangulos enteros: " + group.attrib["id"]) - for x, y, width, height in re.findall(pattern, commands): - x, y, width, height = map(int, (x, y, width, height)) - draw.rectangle((x, y, x + width - 1, y + height - 1), fill=path.attrib["fill"]) - result[group.attrib["id"]] = image - return result - - -def appearance(source: Image.Image, role: str, pose_name: str) -> Image.Image: - """Cambia pelo/ropa sin alterar la trayectoria de brazos del punetazo comun.""" - if role == "guitarist": - return source.copy() - image = source.copy() - pixels = image.load() - hair_colors = tuple(rgba(color) for color in HAIR) - hair_points = [(x, y) for y in range(35) for x in range(CELL) if pixels[x, y] in hair_colors] - top = min(y for _, y in hair_points) - 1 - left = min(x for x, _ in hair_points) - right = max(x for x, _ in hair_points) - new_hair = ("#78532b", "#d5a442", "#ffe07c") if role == "singer" else ("#10121a", "#20212c", "#3f4353") - palette = dict(zip(hair_colors, map(rgba, new_hair))) - shirt_palette = {rgba(SHIRT): rgba(SKIN_DARK), rgba(SHIRT_LIGHT): rgba(SKIN), rgba("#667185"): rgba(SKIN_LIGHT)} - for y in range(CELL): - for x in range(CELL): - color = pixels[x, y] - if y < top + 30 and color in palette: - pixels[x, y] = palette[color] - # Las camisetas acaban a mitad del brazo: el antebrazo queda descubierto. - if role in ("singer", "bassist") and color in shirt_palette: - forearm = top + 31 <= y <= top + 41 and (x < 28 or x >= 40) - extended = pose_name.startswith("punch") and x >= 45 and top + 23 <= y <= top + 33 - if forearm or extended: - pixels[x, y] = shirt_palette[color] - if color == rgba("#35576d"): - pixels[x, y] = rgba("#424b36" if role == "singer" else "#363849") - elif color == rgba("#60869c"): - pixels[x, y] = rgba("#7a8664" if role == "singer" else "#686b83") - draw = ImageDraw.Draw(image) - if role == "bassist": - # Rizos a ambos lados hasta los hombros, no solo un cambio de color de Diego. - for side, x in ((-1, left - 1), (1, right + 1)): - for index, y in enumerate(range(top + 6, top + 34, 5)): - cx = x + (index % 2) * side - draw.ellipse((cx - 3, y - 2, cx + 3, y + 3), fill="#10121a") - draw.line((cx - 1, y - 1, cx + 1, y - 1, cx + 1, y + 1), fill="#414454", width=1) - for index in range(5): - x = left + 3 + index * 3 - y = top + 2 + index % 2 - draw.rectangle((x, y, x + 2, y + 2), fill="#20212c") - draw.point((x, y), fill="#454957") - elif role == "drummer": - # Hebras rectas, negras y largas; el brillo no se convierte en rizos. - for x in (left + 1, left + 3): - for y in range(top + 10, top + 25): - if pixels[x, y] in tuple(map(rgba, new_hair)): - pixels[x, y] = rgba("#3b3e4b") - add_wristbands(image, top) - return image - - -def add_wristbands(image: Image.Image, head_top: int) -> None: - """Localiza manos de las poses originales y coloca la munequera junto al punio.""" - skin_colors = {rgba(SKIN), rgba(SKIN_LIGHT), rgba(SKIN_DARK)} - pending = {(x, y) for y in range(head_top + 23, min(head_top + 43, 48)) - for x in range(CELL) if image.getpixel((x, y)) in skin_colors and (x < 29 or x > 39)} - draw = ImageDraw.Draw(image) - while pending: - start = pending.pop() - component, stack = [start], [start] - while stack: - x, y = stack.pop() - for point in ((x - 1, y), (x + 1, y), (x, y - 1), (x, y + 1)): - if point in pending: - pending.remove(point) - stack.append(point) - component.append(point) - if len(component) < 5: - continue - x0, x1 = min(x for x, _ in component), max(x for x, _ in component) - y0, y1 = min(y for _, y in component), max(y for _, y in component) - if x1 - x0 > 10 or y1 - y0 > 9: - continue - if x0 > 44 and y0 < 40: - draw.rectangle((x0 - 2, y0 - 1, x0, y1 + 1), fill="#10121a") - draw.point((x0 - 1, y0 + 1), fill="#a0a5b3") - else: - draw.rectangle((x0 - 1, y0 - 2, x1 + 1, y0), fill="#10121a") - draw.point((x0, y0 - 1), fill="#a0a5b3") - - -def limb(draw: ImageDraw.ImageDraw, points: list[tuple[int, int]], color: str, width: int = 6) -> None: - draw.line(points, fill=OUTLINE, width=width + 2) - draw.line(points, fill=color, width=width) - - -def arm(draw: ImageDraw.ImageDraw, points: list[tuple[int, int]], role: str) -> None: - shoulder, elbow, hand = points - limb(draw, points, SHIRT) - if role in ("singer", "bassist"): - limb(draw, [elbow, hand], SKIN, 5) - sleeve = ((shoulder[0] + elbow[0]) // 2, (shoulder[1] + elbow[1]) // 2) - draw.line([shoulder, sleeve], fill=SHIRT_LIGHT, width=4) - x, y = hand - if role == "drummer": - band = (round(elbow[0] * .22 + x * .78), round(elbow[1] * .22 + y * .78)) - draw.rectangle((band[0] - 3, band[1] - 2, band[0] + 3, band[1] + 2), fill="#10121a") - draw.point((band[0] - 2, band[1] - 1), fill="#b7bfcb") - draw.rectangle((x - 3, y - 3, x + 3, y + 2), fill=OUTLINE) - draw.rectangle((x - 2, y - 2, x + 2, y + 1), fill=SKIN) - draw.line((x - 1, y - 2, x + 2, y - 2), fill=SKIN_LIGHT) - - -def posed_body(idle: Image.Image, role: str, *, shift=(0, 0), hip=44, - legs=None, arms=None) -> Image.Image: - """Poses exclusivas de ataques; el cuerpo de colision no cambia de tamano.""" - dx, dy = shift - image = Image.new("RGBA", (CELL, CELL)) - draw = ImageDraw.Draw(image) - if legs is None: - legs = [[(27, hip), (26, 51), (27, 57)], [(38, hip), (40, 51), (41, 57)]] - shorts = "#424b36" if role == "singer" else "#363849" - for thigh, knee, ankle in legs: - limb(draw, [thigh, knee, ankle], SKIN, 6) - midpoint = ((thigh[0] + knee[0]) // 2, (thigh[1] + knee[1]) // 2) - draw.line([thigh, midpoint], fill=shorts, width=7) - x, y = ankle - draw.rectangle((x - 4, y - 2, x + 7, y + 3), fill=OUTLINE) - draw.rectangle((x - 2, y - 2, x + 3, y), fill=SHIRT_LIGHT) - draw.line((x - 3, y + 3, x + 7, y + 3), fill="#667185") - shoulder_y = 30 + dy - draw.polygon([(25 + dx, shoulder_y - 2), (39 + dx, shoulder_y - 2), - (42 + dx, hip - 1), (23 + dx, hip - 1)], fill=OUTLINE) - draw.polygon([(26 + dx, shoulder_y), (38 + dx, shoulder_y), - (40 + dx, hip - 3), (25 + dx, hip - 3)], fill=SHIRT) - draw.line((27 + dx, shoulder_y, 26 + dx, hip - 4), fill=SHIRT_LIGHT, width=2) - draw.rectangle((25 + dx, hip - 2, 40 + dx, hip + 2), fill=OUTLINE) - draw.rectangle((26 + dx, hip - 1, 39 + dx, hip + 1), fill=shorts) - draw.point((33 + dx, hip - 1), fill="#b4b6bd") - # Pequeno emblema metalero, dibujado en pixeles y sin fuentes externas. - cy = shoulder_y + 3 - draw.rectangle((31 + dx, cy, 35 + dx, cy + 4), fill="#f6ead4") - draw.point((32 + dx, cy + 1), fill=OUTLINE) - draw.point((35 + dx, cy + 1), fill=OUTLINE) - draw.rectangle((32 + dx, cy + 5, 34 + dx, cy + 6), fill="#f6ead4") - head = idle.crop((0, 0, 64, 29)) - image.alpha_composite(head, (dx, dy)) - if arms is None: - arms = [[(24 + dx, shoulder_y), (22 + dx, shoulder_y + 8), (23 + dx, hip - 1)], - [(40 + dx, shoulder_y), (43 + dx, shoulder_y + 8), (43 + dx, hip - 1)]] - for points in arms: - arm(draw, points, role) - return image - - -def instrument(image: Image.Image, body: tuple[int, int], neck: tuple[int, int], *, bass=False) -> None: - """Guitarra roja o bajo de cuatro cuerdas; geometria entera para conservar el pixel art.""" - draw = ImageDraw.Draw(image) - bx, by = body - nx, ny = neck - length = math.hypot(nx - bx, ny - by) - ux, uy = (nx - bx) / length, (ny - by) / length - px, py = -uy, ux - def point(a, b): - return (round(bx + px * a + ux * b), round(by + py * a + uy * b)) - shape = [(-8, -6), (-8, 2), (-3, 9), (1, 6), (7, 8), (6, -7), (2, -4), (-2, -8)] - if bass: - shape = [(-6, -7), (-8, -1), (-6, 6), (-2, 9), (2, 6), (6, 8), (7, -1), (4, -7)] - draw.polygon([point(a, b) for a, b in shape], fill=OUTLINE) - inner = [point(a * .78, b * .80) for a, b in shape] - draw.polygon(inner, fill="#635486" if bass else "#e54f64") - draw.line([point(0, -5), neck], fill=OUTLINE, width=6 if bass else 5) - draw.line([point(0, -4), neck], fill="#b59164", width=3) - draw.line([point(-1, -3), (nx - 1, ny)], fill="#efe0b2", width=1) - draw.line([point(1, -3), (nx + 1, ny)], fill="#f7ecc8", width=1) - draw.polygon([point(-3, length - 2), point(-3, length + 4), point(2, length + 5), - point(3, length - 2)], fill=OUTLINE) - draw.line([point(0, length - 1), point(0, length + 3)], fill="#f0cd7b", width=3) - for index in range(4 if bass else 3): - draw.line([point(-3, length - 1 + index), point(-5, length - 1 + index)], fill="#b5bfca", width=1) - draw.line([point(-4, -2), point(4, -2)], fill="#efe7df", width=2) - draw.point(point(4, -4), fill="#efc45e") - - -def special_pose(idle: Image.Image, role: str, phase: str, index: int) -> Image.Image: - """Sacar instrumento, tocar/gritar y recogerlo conservan las fases comunes del especial.""" - progress = (index + 1) / 3 if phase == "special_start" else (1 - (index + 1) / 3 if phase == "special_end" else 1) - beat = index % 2 if phase == "special" else 0 - if role == "singer": - hand_y = round(42 - 17 * progress) + beat - image = posed_body(idle, role, arms=[[(24, 30), (19, 37), (20, 32 + beat)], - [(40, 30), (47, 35), (47, hand_y)]]) - draw = ImageDraw.Draw(image) - draw.line([(48, hand_y + 3), (52, 48), (49, 56), (39, 58)], fill="#697080", width=1) - draw.line((48, hand_y + 2, 46, hand_y - 5), fill=OUTLINE, width=5) - draw.line((48, hand_y + 1, 46, hand_y - 5), fill="#9ea8b9", width=2) - draw.ellipse((42, hand_y - 10, 49, hand_y - 4), fill=OUTLINE) - draw.rectangle((44, hand_y - 9, 47, hand_y - 5), fill="#c6d1df") - draw.line((44, hand_y - 7, 47, hand_y - 7), fill="#697584") - if phase == "special": - draw.rectangle((37, 21, 40, 23 + beat), fill=OUTLINE) - draw.point((38, 23), fill="#e8868c") - return image - if role == "drummer": - left = (18, round(40 - 18 * progress) + beat * 12) - right = (48, round(40 - 6 * progress) - beat * 12) - image = posed_body(idle, role, arms=[[(24, 30), (18, 29), left], [(40, 30), (47, 29), right]]) - draw = ImageDraw.Draw(image) - for hand, side in ((left, -1), (right, 1)): - tip = (hand[0] + side * 6, max(2, hand[1] - 16)) - draw.line([hand, tip], fill=OUTLINE, width=3) - draw.line([hand, tip], fill="#e7bd76", width=1) - draw.point(tip, fill="#fff0bd") - return image - strum = (3, 2, 0, -1, -1, 0)[index] if phase == "special" else 0 - image = posed_body(idle, role, arms=[[(24, 30), (25, 40), (30, 45 + strum)], - [(40, 30), (44, 35), (46, 30)]]) - instrument(image, (29, 49), (55, round(33 - 12 * progress)), bass=True) - draw = ImageDraw.Draw(image) - draw.rectangle((28, 43 + strum, 33, 45 + strum), fill=SKIN_LIGHT) - draw.rectangle((44, 31, 47, 34), fill=SKIN) - return image - - -def pound_pose(idle: Image.Image, role: str, index: int, *, landing=False) -> Image.Image: - if role == "guitarist": - if landing: - image = posed_body(idle, role, shift=(-1, 4), hip=47, - legs=[[(26, 46), (22, 51), (20, 57)], [(37, 46), (40, 51), (42, 57)]], - arms=[[(23, 34), (29, 39), (38, 38)], [(39, 34), (43, 38), (44, 45)]]) - instrument(image, (50 - index, 53 - max(index - 1, 0) * 5), (37, 26)) - ImageDraw.Draw(image).rectangle((38, 36, 42, 39), fill=SKIN_LIGHT) - else: - image = posed_body(idle, role, arms=[[(24, 30), (24, 18), (40, 22)], - [(40, 30), (47, 30), (48, 21 + index * 3)]]) - instrument(image, (51, 25 + index * 4), (47 - index * 3, 5 + index)) - return image - if role == "singer": - if landing: - image = posed_body(idle, role, shift=(-4, 8 - (2 if index == 2 else 0)), hip=51, - legs=[[(24, 50), (19, 54), (17, 57)], [(35, 50), (39, 52), (36, 57)]], - arms=[[(20, 38), (17, 43), (24, 42)], [(36, 38), (44, 45), (48, 57 - index)]]) - else: - image = posed_body(idle, role, hip=43, - legs=[[(27, 43), (22, 47), (25, 53)], [(38, 43), (43, 46), (46, 51)]], - arms=[[(24, 30), (18, 34), (22, 30)], [(40, 30), (45, 38), (47, 46 + index)]]) - return image - if landing: - return posed_body(idle, role, shift=(-1, 11 - index // 2), hip=55, - legs=[[(27, 55), (35, 54), (39, 57)], [(38, 55), (49, 51), (52, 57)]], - arms=[[(23, 41), (20, 49), (24, 54)], [(39, 41), (45, 47), (44, 52)]]) - return posed_body(idle, role, hip=43, - legs=[[(27, 43), (22, 42), (23, 51)], [(38, 43), (47, 42), (50, 51)]], - arms=[[(24, 30), (20, 36), (23, 41)], [(40, 30), (46, 36), (46, 41)]]) - - -def svg_group(name: str, image: Image.Image, index: int) -> str: - """Agrupa tramos horizontales por color para obtener SVG de texto compacto.""" - paths = defaultdict(list) - for y in range(CELL): - x = 0 - while x < CELL: - color = image.getpixel((x, y)) - end = x + 1 - while end < CELL and image.getpixel((end, y)) == color: - end += 1 - if color[3]: - hex_color = "#%02x%02x%02x" % color[:3] - paths[hex_color].append(f"M{x} {y}h{end-x}v1h-{end-x}z") - x = end - result = [f''] - for color, runs in sorted(paths.items()): - result.append(f'') - result.append("") - return "\n".join(result) - - -def write_frames(role: str, names: list[str]) -> None: - """Los tiempos y duraciones comunes son los mismos que en el atlas original.""" - text = ['[gd_resource type="SpriteFrames" load_steps=42 format=3]', '', - f'[ext_resource type="Texture2D" path="res://assets/characters/band/{role}.svg" id="atlas"]', ''] - for index, name in enumerate(names): - text += [f'[sub_resource type="AtlasTexture" id="{name}"]', 'atlas = ExtResource("atlas")', - f'region = Rect2({index%8*64}, {index//8*64}, 64, 64)', 'filter_clip = true', ''] - animations = { - 'fall': (7, True), 'ground_pound': (12, True), 'hurt': (12, False), 'idle': (5, True), - 'jump': (9, False), 'land': (16, False), 'punch': (18, False), 'special': (12, True), - 'special_end': (7, False), 'special_start': (9, False), 'walk': (10, True), - 'pound_land': (12, False), - } - serialized = [] - for animation, (speed, loop) in animations.items(): - # Fer toca una nota por pulso; Player reinicia la pose, no un bucle visual. - if role == 'bassist' and animation == 'special': - loop = False - cells = [n for n in names if n.rsplit('_', 1)[0] == animation] - durations = [1.0, .75, 1.15, .8, 1.3] if animation == 'punch' else [1.0] * len(cells) - frames = ', '.join('{"duration": %s, "texture": SubResource("%s")}' % (duration, name) - for duration, name in zip(durations, cells)) - serialized.append('{\n"frames": [' + frames + '],\n"loop": ' + str(loop).lower() - + f',\n"name": &"{animation}",\n"speed": {speed}.0\n' + '}') - text += ['[resource]', 'animations = [' + ', '.join(serialized) + ']\n'] - (ROOT/'player/characters/animations').mkdir(parents=True, exist_ok=True) - (ROOT/f'player/characters/animations/{role}_frames.tres').write_text('\n'.join(text), encoding='utf-8') - - -def main() -> None: - originals = read_source() - # Para Diego se conserva tambien el texto SVG de cada celda no modificada. - raw_groups = {name: match.group(0) for name in originals - if (match := re.search(r'', SOURCE.read_text(), re.S))} - DESTINATION.mkdir(parents=True, exist_ok=True) - for role in ROLES: - frames = {name: appearance(image, role, name) for name, image in originals.items()} - idle = frames['idle_0'] - for index in range(2): - if role != 'drummer': - frames[f'ground_pound_{index}'] = pound_pose(idle, role, index) - for index in range(3): - frames[f'pound_land_{index}'] = frames[f'land_{index}'].copy() if role == 'drummer' else pound_pose(idle, role, index, landing=True) - if role != 'guitarist': - for phase, count in (('special_start', 3), ('special', 6), ('special_end', 2)): - for index in range(count): - frames[f'{phase}_{index}'] = special_pose(idle, role, phase, index) - output = ['', - f'{role}: band member animations', - ''] - for index, (name, image) in enumerate(frames.items()): - if role == 'guitarist' and name in originals and not name.startswith('ground_pound'): - output.append(raw_groups[name]) - else: - output.append(svg_group(name, image, index)) - output.append('\n') - (DESTINATION/f'{role}.svg').write_text('\n'.join(output), encoding='utf-8') - write_frames(role, list(frames)) - print('Generados cuatro atlas y cuatro recursos SpriteFrames; no se ha ejecutado Godot.') +from generate_vector_character_art import main if __name__ == '__main__': diff --git a/tools/generate_vector_character_art.py b/tools/generate_vector_character_art.py new file mode 100644 index 0000000..762473d --- /dev/null +++ b/tools/generate_vector_character_art.py @@ -0,0 +1,430 @@ +"""Genera atlas SVG vectoriales de la banda y los cinco enemigos de Mortal Maze. + + python tools/generate_vector_character_art.py + +Sin dependencias externas. Celdas 64x64, anatomia con rodillas, tobillos y brazos +articulados; el movimiento no altera las colisiones de Godot. Se utiliza un +acabado de ilustracion 2D con paleta reducida, contorno y luces tipo pixel-art. +Los atlas se versionan: este script NO se ejecuta durante la partida. +""" +from __future__ import annotations + +from dataclasses import dataclass +from math import cos, sin, pi +from pathlib import Path +from xml.sax.saxutils import escape + +ROOT = Path(__file__).resolve().parents[1] +CELL = 64 + + +@dataclass(frozen=True) +class Look: + label: str + jacket: str + light: str + shadow: str + accent: str + accent_light: str + hair: str + hair_light: str + skin: str + skin_light: str + skin_shadow: str + pants: str + shoe: str + kind: str + + +LOOKS: dict[str, Look] = { + 'guitarist': Look('Diego · Guitarra', '#642c35', '#b14a50', '#311f2c', '#f1bc6a', '#ffe0a1', '#191c2d', '#535167', '#d59a78', '#ffcf9f', '#a36555', '#283044', '#482b34', 'guitar'), + 'drummer': Look('Iván · Batería', '#2f5969', '#65a6ae', '#1d3345', '#f2c879', '#f7e5ae', '#1c202d', '#545565', '#c98c68', '#f0be8e', '#905948', '#293044', '#26333e', 'drums'), + 'bassist': Look('Fer · Bajo', '#493c6b', '#7864a2', '#2a2844', '#92c2af', '#c3ead3', '#161726', '#474057', '#ae7c60', '#e8b58c', '#825044', '#282940', '#433c58', 'bass'), + 'singer': Look('Héctor · Voz', '#304b42', '#597b61', '#202d32', '#ec6251', '#ffa079', '#aa803f', '#ead183', '#d39c75', '#f4c8a0', '#a56f58', '#34333d', '#2d2f37', 'mic'), + 'roadie': Look('Roadie', '#385a5d', '#618c88', '#273c4e', '#dca85e', '#ffda91', '#282c36', '#77777b', '#d1a184', '#f3c8a4', '#996a5f', '#3f4655', '#343d4b', 'roadie'), + 'pogo_fan': Look('Fan del pogo', '#65436a', '#a66394', '#3b2c53', '#f3a14e', '#ffcf79', '#cb346d', '#f58ca9', '#d1a07f', '#f4caa4', '#996858', '#39415a', '#a84e55', 'punk'), + 'backstage_guard': Look('Guarda', '#3b465c', '#74839a', '#252d40', '#e2a851', '#ffe3a1', '#272a34', '#666b7a', '#aa8269', '#d7ae89', '#856455', '#343947', '#303642', 'guard'), + 'rival_guitarist': Look('Guitarrista rival', '#324e66', '#67859b', '#203247', '#d45176', '#f5a5bb', '#8b929b', '#dce0cf', '#c99b80', '#ffe0b0', '#916b58', '#363b52', '#37475c', 'rival'), + 'feedback_tech': Look('Técnico de feedback', '#34545c', '#71a6a8', '#213943', '#bce073', '#ddf4b1', '#303d43', '#7b9998', '#b78c6f', '#e8be9b', '#966a57', '#30454d', '#335b5d', 'tech'), +} + +PLAYER_NAMES = ('guitarist', 'drummer', 'bassist', 'singer') +ENEMY_NAMES = ('roadie', 'pogo_fan', 'backstage_guard', 'rival_guitarist', 'feedback_tech') +PLAYER_POSES = ([('idle', i) for i in range(4)] + [('walk', i) for i in range(6)] + + [('jump', i) for i in range(2)] + [('fall', i) for i in range(2)] + + [('punch', i) for i in range(5)] + [('ground_pound', i) for i in range(2)] + + [('land', i) for i in range(3)] + [('special_start', i) for i in range(3)] + + [('special', i) for i in range(6)] + [('special_end', i) for i in range(2)] + + [('hurt', i) for i in range(2)] + [('pound_land', i) for i in range(3)]) +ENEMY_POSES = ([('idle', i) for i in range(2)] + [('walk', i) for i in range(6)] + + [('attack', i) for i in range(3)] + [('jump', i) for i in range(2)] + + [('hurt', 0)] + [('death', i) for i in range(2)]) +assert len(PLAYER_POSES) == 40 and len(ENEMY_POSES) == 16 + + +class Ink: + def __init__(self) -> None: + self.lines: list[str] = [] + + def add(self, element: str) -> None: + self.lines.append(element) + + def path(self, d: str, fill: str = 'none', stroke: str = 'none', width: float = 1, + extra: str = '') -> None: + self.add(f'' ) + + def ellipse(self, x: float, y: float, rx: float, ry: float, fill: str, + stroke: str = 'none', width: float = 1, extra: str = '') -> None: + self.add(f'' ) + + def circle(self, x: float, y: float, r: float, fill: str, extra: str = '') -> None: + self.add(f'' ) + + def line(self, points: tuple[tuple[float, float], ...], fill: str, width: float, + extra: str = '') -> None: + coords = ' '.join(f'{x:.2f},{y:.2f}' for x, y in points) + self.add(f'' ) + + def output(self) -> str: + return '\n'.join(self.lines) + + +def limb(ink: Ink, start: tuple[float, float], middle: tuple[float, float], + end: tuple[float, float], fabric: str, lit: str, width: float) -> None: + d = f'M {start[0]:.1f} {start[1]:.1f} Q {middle[0]:.1f} {middle[1]:.1f} {end[0]:.1f} {end[1]:.1f}' + ink.path(d, 'none', '#171a29', width + 2.8) + ink.path(d, 'none', fabric, width) + ink.line(((start[0] - 1, start[1] - .2), (middle[0] - .7, middle[1] - .3)), lit, 1.3, 'opacity=".72"') + + +def draw_shoe(ink: Ink, ankle_x: float, ankle_y: float, look: Look, lift: float) -> None: + y = ankle_y + 1 + ink.path(f'M {ankle_x-3.8:.1f} {y-1:.1f} Q {ankle_x+1:.1f} {y-4:.1f} {ankle_x+3.4:.1f} {y-1:.1f} ' + f'L {ankle_x+7:.1f} {y+1:.1f} Q {ankle_x+8.3:.1f} {y+3:.1f} {ankle_x+5:.1f} {y+3:.1f} ' + f'L {ankle_x-3.8:.1f} {y+2:.1f} Z', look.shoe, '#151927', 1.4) + ink.path(f'M {ankle_x-3:.1f} {y+2:.1f} L {ankle_x+6:.1f} {y+2:.1f}', 'none', '#a2abb1', 1.1) + if lift < 1: + ink.path(f'M {ankle_x:.1f} {y-2:.1f} l 3 -.2', 'none', look.accent_light, .6) + + +def pose_parameters(name: str, frame: int): + if name == 'walk': + phase = 2*pi*frame/6 + stride = sin(phase) + bob = -.95 * abs(sin(phase)) + return stride, max(0.0, cos(phase))*4, max(0.0, -cos(phase))*4, bob, 0.8*sin(phase) + if name == 'idle': + return 0, 0, 0, -.35 + .5*sin(pi*frame/2), 0 + if name in ('jump', 'fall', 'ground_pound'): + return .0, 5.0 if frame == 0 else 2.0, 3.0 if frame == 0 else 5, -1.9, -1.5 if name == 'jump' else 2.2 + if name in ('land', 'pound_land'): + return 0, 1.2, 1.2, 2.0 - frame*.55, 1.0 + if name == 'hurt': + return .1, 0, 1, -1, -3.6 + if name in ('punch', 'attack'): + return -.4 if frame == 0 else .8, 0, 1, -.7, -1.5 if frame > 0 else 2 + if name.startswith('special'): + return 0, 0, 0, -.7 - .7*cos(frame*pi/3), -1 + if name == 'death': + return 0, 5, 4, 4 + 2*frame, -7 + return 0, 0, 0, 0, 0 + + +def draw_hair_back(ink: Ink, look: Look, h: float) -> None: + if look.kind == 'bass': + ink.path(f'M 22 {10+h:.1f} Q 15 {14+h:.1f} 20 {30+h:.1f} L 24 {34+h:.1f} ' + f'Q 27 {28+h:.1f} 29 {24+h:.1f} L 40 {25+h:.1f} Q 48 {34+h:.1f} 46 {15+h:.1f} ' + f'Q 39 {6+h:.1f} 22 {10+h:.1f} Z', look.hair, '#151925', 1.5) + for x,y in ((20,21),(20.5,28),(44,25),(43,31)): + ink.path(f'M {x} {y+h:.1f} q -2 3 1 5', 'none', look.hair_light, 1.1) + elif look.kind in ('guitar','rival','roadie'): + ink.path(f'M 25 {11+h:.1f} Q 19 {10+h:.1f} 20 {21+h:.1f} L 23 {32+h:.1f} ' + f'L 26 {27+h:.1f} L 40 {24+h:.1f} L 43 {32+h:.1f} ' + f'Q 48 {13+h:.1f} 38 {8+h:.1f} Z', look.hair, '#121621', 1.2) + + +def draw_hair_front(ink: Ink, look: Look, h: float) -> None: + if look.kind == 'mic': + ink.path(f'M 26 {10+h:.1f} L 29 {2+h:.1f} L 32 {8+h:.1f} L 35 {1+h:.1f} ' + f'L 38 {9+h:.1f} L 41 {5+h:.1f} L 41 {17+h:.1f} Q 32 {13+h:.1f} 26 {18+h:.1f} Z', + look.hair, '#25202a', 1.1) + ink.path(f'M 30 {7+h:.1f} L 35 {3+h:.1f} L 37 {11+h:.1f}', 'none', look.hair_light, 1.4) + elif look.kind == 'punk': + ink.path(f'M 23 {12+h:.1f} L 22 {3+h:.1f} L 27 {8+h:.1f} L 31 {0+h:.1f} L 36 {8+h:.1f} ' + f'L 42 {3+h:.1f} L 40 {15+h:.1f} Q 33 {12+h:.1f} 24 {17+h:.1f} Z', + look.hair, '#2a1c2a', 1.3) + ink.path(f'M 26 {10+h:.1f} L 31 {4+h:.1f} L 32 {10+h:.1f}', 'none', look.hair_light, 1.7) + elif look.kind == 'drums': + ink.path(f'M 22 {13+h:.1f} Q 24 {4+h:.1f} 37 {7+h:.1f} L 42 {14+h:.1f} ' + f'L 38 {17+h:.1f} Q 29 {12+h:.1f} 24 {19+h:.1f} Z', look.hair, '#151925', 1.3) + ink.path(f'M 21 {13+h:.1f} Q 30 {7+h:.1f} 43 {12+h:.1f} L 42 {15+h:.1f} ' + f'Q 30 {11+h:.1f} 22 {16+h:.1f} Z', '#b44e46', '#171b26', 1.1) + ink.path(f'M 25 {13+h:.1f} Q 32 {10+h:.1f} 39 {13+h:.1f}', 'none', '#f1a077', 1.1) + elif look.kind == 'guard': + ink.path(f'M 23 {13+h:.1f} Q 24 {7+h:.1f} 38 {9+h:.1f} L 43 {15+h:.1f} ' + f'L 22 {17+h:.1f} Z', '#242b3b', '#111724', 1.5) + ink.path(f'M 19 {15+h:.1f} Q 29 {12+h:.1f} 44 {16+h:.1f} L 45 {19+h:.1f} ' + f'Q 33 {16+h:.1f} 20 {19+h:.1f} Z', look.light, '#171924', 1.1) + elif look.kind == 'tech': + ink.path(f'M 24 {10+h:.1f} Q 31 {4+h:.1f} 39 {9+h:.1f} L 41 {18+h:.1f} ' + f'Q 33 {14+h:.1f} 24 {17+h:.1f} Z', look.hair, '#1c2630', 1.2) + ink.path(f'M 21 {16+h:.1f} Q 20 {3+h:.1f} 31 {6+h:.1f} Q 43 {4+h:.1f} 44 {16+h:.1f}', + 'none', look.accent, 2.1) + for x in (21,43): + ink.ellipse(x, 18+h, 2.8, 5.0, '#263b47', look.accent, 1.3) + else: + ink.path(f'M 23 {13+h:.1f} Q 21 {7+h:.1f} 30 {6+h:.1f} Q 41 {6+h:.1f} 43 {14+h:.1f} ' + f'L 40 {18+h:.1f} Q 36 {12+h:.1f} 30 {15+h:.1f} L 25 {19+h:.1f} Z', + look.hair, '#161925', 1.4) + ink.path(f'M 25 {12+h:.1f} Q 32 {7+h:.1f} 39 {11+h:.1f}', 'none', look.hair_light, 1.7) + if look.kind == 'bass': + ink.path(f'M 22 {15+h:.1f} Q 25 {6+h:.1f} 33 {8+h:.1f} Q 40 {6+h:.1f} 43 {14+h:.1f} ' + f'L 40 {17+h:.1f} L 29 {13+h:.1f} L 25 {20+h:.1f} Z', look.hair, '#141825', 1.5) + ink.path(f'M 23 {15+h:.1f} Q 26 {10+h:.1f} 33 {10+h:.1f}', 'none', look.hair_light, 1.1) + + +def draw_head(ink: Ink, look: Look, bob: float, tilt: float, pose: str) -> None: + y = bob - tilt*.14 + draw_hair_back(ink, look, y) + ink.path(f'M 26 {13+y:.1f} Q 32 {9+y:.1f} 39 {13+y:.1f} Q 42 {20+y:.1f} 39 {25+y:.1f} ' + f'Q 36 {30+y:.1f} 31 {29+y:.1f} Q 24 {27+y:.1f} 23 {20+y:.1f} ' + f'Q 22 {15+y:.1f} 26 {13+y:.1f} Z', 'url(#skin)', '#171a26', 1.3) + ink.path(f'M 26 {16+y:.1f} Q 24 {19+y:.1f} 26 {23+y:.1f}', 'none', look.skin_light, 1.2, 'opacity=".7"') + ink.ellipse(24, 20+y, 1.6, 3.0, look.skin_shadow, '#191a26', .8) + draw_hair_front(ink, look, y) + # Ojos ligeramente en perfil y cejas expresivas, sin pixeles cuadrados. + ink.path(f'M 29 {19+y:.1f} l 3 -.7 M 36 {19+y:.1f} l 2 .2', 'none', '#312531', 1.3) + ink.ellipse(30.6, 20.8+y, .72, 1.0, '#151822') + ink.ellipse(37.1, 20.9+y, .68, .95, '#151822') + ink.path(f'M 34 {21.6+y:.1f} l .6 2.1 -1.4 .7', 'none', look.skin_shadow, .8) + if look.kind in ('guitar','bass','rival','roadie'): + ink.path(f'M 29 {24+y:.1f} Q 34 {28.6+y:.1f} 38 {24+y:.1f}', 'none', look.hair, 1.1) + ink.path(f'M 32 {25+y:.1f} l 4 .2', 'none', '#f4d9bf', .7) + elif pose == 'hurt': + ink.path(f'M 32 {26+y:.1f} q 2 -1 4 .4', 'none', '#612c33', 1.1) + else: + ink.path(f'M 31 {25+y:.1f} Q 35 {26.5+y:.1f} 37 {25+y:.1f}', 'none', '#6a4142', 1.0) + if look.kind == 'mic': + ink.path(f'M 27 {22+y:.1f} q 1 7 8 6', 'none', '#704b36', .8, 'opacity=".6"') + ink.circle(39.7, 22+y, 1.0, '#ded7b9') + elif look.kind == 'guard': + ink.path(f'M 27 {20+y:.1f} L 39 {20+y:.1f}', 'none', '#2b3440', 2.1, 'opacity=".8"') + + +def draw_torso(ink: Ink, look: Look, bob: float, tilt: float, is_enemy: bool) -> None: + y = bob + widen = 2 if look.kind == 'guard' else 0 + ink.path(f'M {24-widen} {30+y:.1f} Q 32 {27+y:.1f} {40+widen} {30+y:.1f} ' + f'L {40+widen+tilt*.3:.1f} {42+y:.1f} Q 32 {46+y:.1f} {24-widen+tilt*.3:.1f} {42+y:.1f} Z', + 'url(#jacket)', '#141824', 1.8) + ink.path(f'M 26 {30+y:.1f} L 30 {36+y:.1f} L 29 {42+y:.1f}', 'none', look.light, 1.6, 'opacity=".75"') + ink.path(f'M 38 {31+y:.1f} Q 35 {36+y:.1f} 38 {43+y:.1f}', 'none', look.shadow, 1.9) + ink.path(f'M 25 {43+y:.1f} Q 32 {44+y:.1f} 39 {43+y:.1f}', 'none', '#1a1d29', 2.1) + ink.circle(32.2, 43.7+y, 1.15, look.accent_light) + # Logo de escenario y costuras dibujados sin fuentes ni texto rasterizado. + if look.kind in ('guitar','rival','punk','mic'): + ink.path(f'M 29 {33+y:.1f} l 3 -1 3 1 -1 3 -1 -1 -1 3 -1 -3 Z', '#e2dfd0', '#1e2532', .45) + ink.circle(30.8, 34+y, .55, '#292c36') + ink.circle(33.3, 34+y, .55, '#292c36') + elif look.kind in ('drums','bass','tech'): + ink.path(f'M 28 {34+y:.1f} L 36 {34+y:.1f} L 34 {37+y:.1f} L 30 {37+y:.1f} Z', look.accent, '#25303b', .8) + ink.path(f'M 32 {33+y:.1f} L 32 {39+y:.1f}', 'none', look.accent_light, .9) + else: + ink.path(f'M 36 {33+y:.1f} l 3 0 -1 4 -3 0 Z', look.accent, '#222a31', .6) + if look.kind == 'guard': + ink.path(f'M 24 {29+y:.1f} l -5 3 4 7 4 -3 Z M 40 {29+y:.1f} l 5 3 -4 7 -4 -3 Z', + look.light, '#161a26', 1.4) + ink.path(f'M 28 {39+y:.1f} l 9 0', 'none', look.accent, 1.0) + if look.kind == 'tech': + ink.path(f'M 36 {32+y:.1f} l 4 1 -2 5 -4 -1 Z', look.accent_light, '#1a2329', .6) + if is_enemy: + ink.path(f'M 28 {40+y:.1f} l 9 0', 'none', look.accent, .75, 'opacity=".65"') + + +def draw_arms(ink: Ink, look: Look, bob: float, stride: float, pose: str, + frame: int, foreground: bool) -> None: + if foreground: + shoulder = (40.0, 31.5 + bob) + elbow = (43 + 2.0*stride, 38+bob) + wrist = (45 + 3.4*stride, 43+bob) + if pose in ('punch','attack'): + extent = [0, 5, 11, 13, 6][min(frame,4)] if pose == 'punch' else [0, 11, 5][frame] + elbow = (43+extent*.4, 33.5+bob) + wrist = (45+extent, 32+bob) + elif pose in ('special_start', 'special', 'special_end'): + wrist = (45, 21 + 2*sin(frame*pi/3)+bob) + elbow = (46, 31+bob) + elif pose in ('jump', 'fall', 'ground_pound'): + elbow = (46, 29+bob) + wrist = (50, 25+bob) if pose != 'ground_pound' else (47,17+bob) + elif pose in ('land','pound_land','death'): + wrist = (42, 43+bob) + elbow = (43, 40+bob) + elif pose == 'hurt': + elbow = (38, 30+bob) + wrist = (39, 25+bob) + else: + shoulder = (24.0, 31.5+bob) + elbow = (21 - 2*stride, 38+bob) + wrist = (20 - 3.4*stride, 43+bob) + if pose in ('punch','attack'): + elbow, wrist = (22, 37+bob), (25, 43+bob) + elif pose in ('special_start','special','special_end'): + elbow, wrist = (19, 29+bob), (20, 23+bob) + elif pose in ('jump','fall','ground_pound'): + elbow, wrist = (18, 30+bob), (15, 23+bob) + elif pose in ('land','pound_land','death'): + elbow, wrist = (21, 42+bob), (20, 46+bob) + elif pose == 'hurt': + elbow, wrist = (23, 27+bob), (24, 22+bob) + limb(ink, shoulder, elbow, wrist, look.jacket, look.light, 5.5 if look.kind!='guard' else 7) + ink.ellipse(wrist[0], wrist[1], 2.7, 3.2, look.skin, '#1b1c28', 1) + ink.path(f'M {wrist[0]-2.5:.1f} {wrist[1]-1:.1f} l 3 -1.2', 'none', look.skin_light, .8) + if look.kind in ('drums','punk','mic','rival'): + ink.line(((wrist[0]-1.8, wrist[1]-4), (wrist[0]+1.2, wrist[1]-4)), '#1b1d29', 2.6) + ink.line(((wrist[0]-1, wrist[1]-4.1), (wrist[0]+.4, wrist[1]-4.1)), look.accent, .7) + + +def draw_instrument(ink: Ink, look: Look, pose: str, frame: int, bob: float) -> None: + # Accesorios con lectura clara y volumen, visibles sin alterar las hitboxes. + if look.kind in ('guitar', 'bass','rival'): + if pose not in ('special','special_start','special_end','attack'): + return + body = '#d84d53' if look.kind == 'guitar' else ('#5daa88' if look.kind == 'bass' else '#9e5cba') + light = '#ff9c81' if look.kind == 'guitar' else ('#c5e5a5' if look.kind == 'bass' else '#e3a9db') + wobble = .7*sin(frame*pi/3) + ink.add(f'') + ink.path('M 30 37 Q 24 36 24 42 Q 21 48 26 50 Q 31 53 35 48 ' + 'Q 40 52 44 45 Q 46 38 40 36 L 37 39 Z', body, '#1a1d2c', 2.3) + ink.path('M 28 43 Q 31 39 36 42 Q 41 39 41 45', 'none', light, 1.3) + ink.path('M 34 42 L 42 15 L 46 14 L 39 43 Z', '#ab885e', '#201f2b', 1.25) + for offset in (0,1.5,3): + ink.path(f'M {36+offset*.5:.1f} 43 L {43+offset*.35:.1f} 17', 'none', '#efe2c1', .38) + ink.ellipse(35, 46, 2, 1.5, '#1b1c2a') + ink.path('M 39 36 L 42 36', 'none', '#e9d4a2', .85) + ink.add('') + elif look.kind == 'mic' and pose in ('special','special_start','special_end'): + ink.path(f'M 45 {20+bob:.1f} L 45 {9+bob:.1f}', 'none', '#171c28', 2.8) + ink.path(f'M 45 {20+bob:.1f} L 45 {10+bob:.1f}', 'none', '#a5bbc4', 1.4) + ink.ellipse(45, 7.5+bob, 3.5, 4.4, '#cfd6d4', '#222432', 1.2) + ink.path(f'M 42.5 {7+bob:.1f} q 2 -3 5 0', 'none', '#f8f1e0', .8) + ink.path(f'M 45 {23+bob:.1f} Q 49 {38+bob:.1f} 48 {45+bob:.1f}', 'none', '#232b33', 1) + elif look.kind == 'drums' and pose in ('special','special_start','special_end','ground_pound'): + ink.path(f'M 18 {22+bob:.1f} L 12 {6+bob:.1f} M 45 {22+bob:.1f} L 51 {6+bob:.1f}', + 'none', '#d6b47c', 2.3) + ink.path(f'M 12 {7+bob:.1f} l -1 -3 M 51 {7+bob:.1f} l 1 -3', 'none', '#fff0c5', 1.0) + elif look.kind == 'roadie': + ink.path(f'M 24 {42+bob:.1f} L 41 {42+bob:.1f}', 'none', '#c39a5c', 2) + ink.path(f'M 38 {40+bob:.1f} l 4 0 0 6 -4 0 Z', look.shadow, '#1a1c29', 1) + ink.circle(40, 43+bob, 1.1, '#c9e4d8') + elif look.kind == 'guard': + ink.path(f'M 40 {38+bob:.1f} l 4 -2 2 5 -4 3 Z', '#1c232c', look.accent, 1) + elif look.kind == 'tech': + ink.path(f'M 25 {34+bob:.1f} l 4 0 1 4 -3 2 Z', '#242c37', '#131a23', .8) + ink.circle(27, 36+bob, 1.0, look.accent_light) + + +def draw_pose(look: Look, pose: str, frame: int, enemy: bool = False) -> str: + ink = Ink() + stride, lift_l, lift_r, bob, tilt = pose_parameters(pose, frame) + if look.kind == 'guard': + stride *= .6 + if pose in ('land','pound_land'): + lift_l += 1 + lift_r += 1 + # Pierna lejana primero: rodillas y pies mantienen una trayectoria coherente. + if pose == 'walk': + left_x, right_x = 28+7*stride, 36-7*stride + elif pose in ('jump','fall','ground_pound'): + left_x, right_x = 25, 39 + elif pose in ('punch','attack'): + left_x, right_x = 29, 41 + else: + left_x, right_x = 28.8, 37.5 + for hip, foot_x, lift, back in ((27.5,left_x,lift_l,True),(36.5,right_x,lift_r,False)): + hip_y = 43+bob + knee_x = (hip+foot_x)*.5 + (-2 if back else 2) + lift*.35 + knee_y = 50 + bob*.4 - lift*.35 + ankle_y = 55.6-lift + limb(ink, (hip, hip_y), (knee_x,knee_y), (foot_x,ankle_y), + look.pants, '#68758a' if back else look.light, 6.1) + ink.path(f'M {hip-2:.1f} {hip_y+2:.1f} l 5 0', 'none', look.shadow, 2.2) + draw_shoe(ink, foot_x, ankle_y, look, lift) + draw_arms(ink, look, bob, stride, pose, frame, False) + draw_torso(ink, look, bob, tilt, enemy) + # Cuello y collar como capas independientes. + ink.path(f'M 29 {28+bob:.1f} Q 32 {32+bob:.1f} 35 {28+bob:.1f}', 'none', look.skin_shadow, 3) + ink.path(f'M 27 {29+bob:.1f} l 5 4 5 -4', 'none', look.accent, 1.2) + draw_head(ink, look, bob, tilt, pose) + draw_arms(ink, look, bob, stride, pose, frame, True) + draw_instrument(ink, look, pose, frame, bob) + return ink.output() + + +def svg_atlas(name: str, poses: list[tuple[str, int]], cols: int) -> str: + look = LOOKS[name] + width = cols*CELL + height = (len(poses)+cols-1)//cols*CELL + defs = f''' + + + + + + + + + + +''' + lines = [f'', + f'{escape(look.label)} · ilustración vectorial animada', defs] + for i, (pose, frame) in enumerate(poses): + x, y = i%cols * CELL, i//cols * CELL + lines.append(f'') + lines.append(draw_pose(look, pose, frame, name in ENEMY_NAMES)) + lines.append('') + return '\n'.join(lines + ['', '']) + + +def enemy_spriteframes(name: str) -> str: + result = ['[gd_resource type="SpriteFrames" load_steps=18 format=3]', '', + f'[ext_resource type="Texture2D" path="res://assets/enemies/{name}.svg" id="atlas"]', ''] + for i, (pose, frame) in enumerate(ENEMY_POSES): + result.append(f'[sub_resource type="AtlasTexture" id="{pose}_{frame}"]') + result.append('atlas = ExtResource("atlas")') + result.append(f'region = Rect2({i%4*64}, {i//4*64}, 64, 64)') + result.append('filter_clip = true') + result.append('') + result.append('[resource]') + frames = [] + for anim, speed, loop in [('idle',5.0,True),('walk',10.0,True),('attack',12.0,False), + ('jump',7.0,True),('hurt',10.0,False),('death',6.0,False)]: + items = ', '.join('{"duration": 1.0, "texture": SubResource("%s_%s")}' % (n,i) + for n,i in ENEMY_POSES if n==anim) + frames.append('{\n"frames": [' + items + '],\n"loop": '+str(loop).lower() + +',\n"name": &"'+anim+'",\n"speed": '+str(speed)+'\n}') + result.append('animations = ['+', '.join(frames)+']') + return '\n'.join(result)+'\n' + + +def main() -> None: + for name in PLAYER_NAMES: + dest = ROOT / f'assets/characters/band/{name}.svg' + dest.write_text(svg_atlas(name, PLAYER_POSES, 8), encoding='utf-8') + print('written', dest.relative_to(ROOT)) + (ROOT/'enemies/animations').mkdir(exist_ok=True) + for name in ENEMY_NAMES: + dest = ROOT / f'assets/enemies/{name}.svg' + dest.write_text(svg_atlas(name, ENEMY_POSES, 4), encoding='utf-8') + frames = ROOT / f'enemies/animations/{name}_frames.tres' + frames.write_text(enemy_spriteframes(name), encoding='utf-8') + print('written', dest.relative_to(ROOT), 'and', frames.relative_to(ROOT)) + + +if __name__ == '__main__': + main() diff --git a/ui/menu/level_navigation.gd b/ui/menu/level_navigation.gd index 650c52d..a518495 100644 --- a/ui/menu/level_navigation.gd +++ b/ui/menu/level_navigation.gd @@ -1,60 +1,285 @@ extends CanvasLayer -## Salida minima de los escenarios de prueba. Abandonar no confirma los raros encontrados. -## Se usa una escena compartida para que el boton se pueda editar visualmente. +## Pausa y resultados compartidos por todos los LevelRoot. No modifica las reglas de combate. +## Los hallazgos de raros solo se confirman al superar el nivel. const MENU_PATH: String = "res://ui/menu/main_menu.tscn" +const MENU_SCRIPT: Script = preload("res://ui/menu/main_menu.gd") + +enum Screen { PLAYING, PAUSED, CONFIRM_EXIT, DEFEAT, VICTORY } + +var _screen: Screen = Screen.PLAYING +var _exit_to_levels: bool = false var _leaving: bool = false var _notice_seconds: float = 0.0 +var _next_level_path: String = "" + +@onready var pause_button: Button = $Overlay/Pause +@onready var scrim: ColorRect = $Overlay/Scrim +@onready var dialog: CenterContainer = $Overlay/Dialog +@onready var heading: Label = $Overlay/Dialog/Panel/Margin/Options/Heading +@onready var description: Label = $Overlay/Dialog/Panel/Margin/Options/Description +@onready var resume_button: Button = $Overlay/Dialog/Panel/Margin/Options/Resume +@onready var restart_button: Button = $Overlay/Dialog/Panel/Margin/Options/Restart +@onready var next_button: Button = $Overlay/Dialog/Panel/Margin/Options/Next +@onready var levels_button: Button = $Overlay/Dialog/Panel/Margin/Options/Levels +@onready var title_button: Button = $Overlay/Dialog/Panel/Margin/Options/Title +@onready var confirm_button: Button = $Overlay/Dialog/Panel/Margin/Options/Confirm +@onready var cancel_button: Button = $Overlay/Dialog/Panel/Margin/Options/Cancel func _ready() -> void: - $Overlay/Menu.pressed.connect(return_to_menu) - # No referencia LevelRoot por tipo: esta escena se precarga desde esa clase. + pause_button.pressed.connect(pause_game) + resume_button.pressed.connect(resume_game) + restart_button.pressed.connect(_restart_level) + next_button.pressed.connect(_load_next_level) + levels_button.pressed.connect(_select_levels) + title_button.pressed.connect(_select_title) + confirm_button.pressed.connect(_confirm_exit) + cancel_button.pressed.connect(_cancel_exit) var level: Node = get_parent() if level.has_signal("progress_notice"): level.connect("progress_notice", _show_notice) if level.has_signal("rare_items_changed"): level.connect("rare_items_changed", _refresh_pending) + if level.has_signal("level_failed"): + level.connect("level_failed", show_defeat) + if level.has_signal("level_completed"): + level.connect("level_completed", show_victory) _refresh_pending() + _update_screen() func _unhandled_input(event: InputEvent) -> void: - if event.is_action_pressed("ui_cancel"): - return_to_menu() + if event.is_action_pressed("ui_cancel") and not event.is_echo(): + _handle_back() get_viewport().set_input_as_handled() func _notification(what: int) -> void: if what == NOTIFICATION_WM_GO_BACK_REQUEST and is_node_ready(): - return_to_menu() + _handle_back() -func return_to_menu() -> void: +func _exit_tree() -> void: + # No deja el SceneTree pausado si otro sistema descarga el nivel. + if not Engine.is_editor_hint(): + get_tree().paused = false + + +func _handle_back() -> void: + match _screen: + Screen.PLAYING: + pause_game() + Screen.PAUSED: + resume_game() + Screen.CONFIRM_EXIT: + _cancel_exit() + # No es posible cerrar una pantalla de resultado sin elegir destino. + Screen.DEFEAT, Screen.VICTORY: + pass + + +func pause_game() -> void: + if _leaving or _screen != Screen.PLAYING: + return + _release_virtual_actions() + _screen = Screen.PAUSED + _update_screen() + get_tree().paused = true + resume_button.grab_focus() + + +func resume_game() -> void: + if _leaving or _screen != Screen.PAUSED: + return + _screen = Screen.PLAYING + get_tree().paused = false + _update_screen() + pause_button.grab_focus() + + +func show_defeat() -> void: + if _leaving or _screen == Screen.DEFEAT or _screen == Screen.VICTORY: + return + _release_virtual_actions() + _screen = Screen.DEFEAT + _update_screen() + get_tree().paused = true + restart_button.grab_focus() + + +func show_victory() -> void: + if _leaving or _screen == Screen.VICTORY or _screen == Screen.DEFEAT: + return + _release_virtual_actions() + _next_level_path = _get_next_level_path() + _screen = Screen.VICTORY + _update_screen() + get_tree().paused = true + (next_button if not _next_level_path.is_empty() else levels_button).grab_focus() + + +func _get_next_level_path() -> String: + var level: Node = get_parent() + var current: String = level.scene_file_path + if current.is_empty(): + return "" + var paths: PackedStringArray = MENU_SCRIPT.discover_level_paths() + var index: int = paths.find(current) + if index < 0 or index >= paths.size() - 1: + return "" + return paths[index + 1] + + +func _update_screen() -> void: + var playing: bool = _screen == Screen.PLAYING + pause_button.visible = playing + scrim.visible = not playing + dialog.visible = not playing + $Overlay/Pending.visible = playing and int(get_parent().call("get_pending_rare_count")) > 0 + $Overlay/Notice.visible = playing and _notice_seconds > 0.0 + if playing: + return + resume_button.visible = _screen == Screen.PAUSED + restart_button.visible = _screen == Screen.DEFEAT + next_button.visible = _screen == Screen.VICTORY + levels_button.visible = _screen != Screen.CONFIRM_EXIT + title_button.visible = _screen != Screen.CONFIRM_EXIT + confirm_button.visible = _screen == Screen.CONFIRM_EXIT + cancel_button.visible = _screen == Screen.CONFIRM_EXIT + match _screen: + Screen.PAUSED: + heading.add_theme_color_override("font_color", Color(0.9, 0.96, 0.61)) + heading.text = "PAUSA" + description.text = "Partida en pausa. Puedes continuar o abandonar el intento." + Screen.CONFIRM_EXIT: + heading.add_theme_color_override("font_color", Color(1.0, 0.78, 0.48)) + heading.text = "¿ABANDONAR NIVEL?" + description.text = "Perderás el avance de esta pantalla y los objetos raros aún no confirmados." + confirm_button.text = "SI, IR AL SELECTOR" if _exit_to_levels else "SI, IR AL TITULO" + Screen.DEFEAT: + heading.add_theme_color_override("font_color", Color(1.0, 0.52, 0.49)) + heading.text = "HAS MUERTO..." + description.text = "El intento ha terminado. Puedes volver a empezar o elegir otro nivel." + Screen.VICTORY: + heading.add_theme_color_override("font_color", Color(0.82, 0.97, 0.57)) + heading.text = "¡VICTORIA!" + if _next_level_path.is_empty(): + description.text = "¡Nivel completado! No quedan mas niveles disponibles por ahora." + else: + description.text = "¡Nivel completado! Continúa la aventura o vuelve al menú." + next_button.disabled = _next_level_path.is_empty() + next_button.text = "NO HAY MAS NIVELES" if _next_level_path.is_empty() else "SIGUIENTE NIVEL" + + +func _select_levels() -> void: + _request_exit(true) + + +func _select_title() -> void: + _request_exit(false) + + +func _request_exit(to_levels: bool) -> void: + if _leaving: + return + _exit_to_levels = to_levels + if _screen == Screen.PAUSED: + _screen = Screen.CONFIRM_EXIT + _update_screen() + cancel_button.grab_focus() + else: + # Los resultados ya han concluido el intento; no hay progreso que perder. + _confirm_exit() + + +func _cancel_exit() -> void: + if _screen != Screen.CONFIRM_EXIT: + return + _screen = Screen.PAUSED + _update_screen() + resume_button.grab_focus() + + +func _confirm_exit() -> void: + if _leaving: + return + var session: RunSessionState = get_node_or_null("/root/RunSession") as RunSessionState + if session != null: + session.show_levels_on_menu_entry = _exit_to_levels + _change_scene(MENU_PATH) + + +func _restart_level() -> void: + if _screen != Screen.DEFEAT or _leaving: + return + _leaving = true + get_tree().paused = false + _release_virtual_actions() + call_deferred("_reload_scene") + + +func _reload_scene() -> void: + var error: Error = get_tree().reload_current_scene() + if error != OK: + _leaving = false + push_error("No se pudo reiniciar el nivel: " + error_string(error)) + get_tree().paused = true + restart_button.grab_focus() + + +func _load_next_level() -> void: + if _screen != Screen.VICTORY or _leaving or _next_level_path.is_empty(): + return + var session: RunSessionState = get_node_or_null("/root/RunSession") as RunSessionState + var level: Node = get_parent() + var player: Node = level.get_node_or_null("Player") + if session != null and player != null: + var character: CharacterData = player.get("character_data") as CharacterData + if character != null: + session.begin_level(_next_level_path, character) + _change_scene(_next_level_path) + + +func _change_scene(path: String) -> void: if _leaving: return _leaving = true - # Tambien es seguro si se solicita desde el callback de un area de fisica. - call_deferred("_change_scene") + get_tree().paused = false + _release_virtual_actions() + call_deferred("_change_scene_deferred", path) -func _change_scene() -> void: - var error: Error = get_tree().change_scene_to_file(MENU_PATH) +func _change_scene_deferred(path: String) -> void: + var error: Error = get_tree().change_scene_to_file(path) if error != OK: _leaving = false - push_error("No se pudo volver al menu: " + error_string(error)) + push_error("No se pudo cambiar de escena: " + error_string(error)) + get_tree().paused = true + _update_screen() + + +## Alias util para escenas existentes y pruebas antiguas: ahora confirma antes de salir. +func return_to_menu() -> void: + _select_title() + + +func _release_virtual_actions() -> void: + for action: StringName in [&"move_left", &"move_right", &"jump", &"attack", &"ground_pound", &"special_attack"]: + Input.action_release(action) func _refresh_pending() -> void: var level: Node = get_parent() var count: int = int(level.call("get_pending_rare_count")) if level.has_method("get_pending_rare_count") else 0 $Overlay/Pending.text = "RAROS PENDIENTES: %d\nCompleta el nivel para guardarlos" % count - $Overlay/Pending.visible = count > 0 + $Overlay/Pending.visible = count > 0 and _screen == Screen.PLAYING func _show_notice(message: String) -> void: $Overlay/Notice.text = message - $Overlay/Notice.show() _notice_seconds = 8.0 + $Overlay/Notice.visible = _screen == Screen.PLAYING func _process(delta: float) -> void: diff --git a/ui/menu/level_navigation.tscn b/ui/menu/level_navigation.tscn index 865cd10..d69a32d 100644 --- a/ui/menu/level_navigation.tscn +++ b/ui/menu/level_navigation.tscn @@ -1,10 +1,29 @@ -[gd_scene load_steps=4 format=3] +[gd_scene load_steps=5 format=3] [ext_resource type="Script" path="res://ui/menu/level_navigation.gd" id="script"] [ext_resource type="Script" path="res://ui/editor_ui_visibility.gd" id="editor_ui_visibility"] [ext_resource type="Theme" path="res://ui/menu/menu_theme.tres" id="theme"] +[sub_resource type="StyleBoxFlat" id="ResultPanel"] +content_margin_left = 0.0 +content_margin_top = 0.0 +content_margin_right = 0.0 +content_margin_bottom = 0.0 +bg_color = Color(0.095, 0.115, 0.145, 0.98) +border_width_left = 3 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 3 +border_color = Color(0.56, 0.67, 0.49, 1) +corner_radius_top_left = 12 +corner_radius_top_right = 12 +corner_radius_bottom_left = 12 +corner_radius_bottom_right = 12 +shadow_color = Color(0, 0, 0, 0.55) +shadow_size = 12 + [node name="LevelNavigation" type="CanvasLayer"] +process_mode = 3 layer = 110 script = ExtResource("script") @@ -19,7 +38,8 @@ anchor_bottom = 1.0 mouse_filter = 2 theme = ExtResource("theme") -[node name="Menu" type="Button" parent="Overlay"] +[node name="Pause" type="Button" parent="Overlay"] +custom_minimum_size = Vector2(148, 60) layout_mode = 1 anchor_left = 1.0 anchor_right = 1.0 @@ -28,9 +48,7 @@ offset_top = 16.0 offset_right = -16.0 offset_bottom = 76.0 grow_horizontal = 0 -focus_mode = 0 -text = "MENU" - +text = "II PAUSA" [node name="Pending" type="Label" parent="Overlay"] visible = false @@ -68,3 +86,97 @@ theme_override_constants/shadow_offset_y = 2 theme_override_font_sizes/font_size = 20 horizontal_alignment = 1 autowrap_mode = 3 + +[node name="Scrim" type="ColorRect" parent="Overlay"] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +mouse_filter = 0 +color = Color(0.015, 0.02, 0.028, 0.85) + +[node name="Dialog" type="CenterContainer" parent="Overlay"] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 20.0 +offset_top = 12.0 +offset_right = -20.0 +offset_bottom = -12.0 +mouse_filter = 2 + +[node name="Panel" type="PanelContainer" parent="Overlay/Dialog"] +custom_minimum_size = Vector2(540, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +theme_override_styles/panel = SubResource("ResultPanel") + +[node name="Margin" type="MarginContainer" parent="Overlay/Dialog/Panel"] +layout_mode = 2 +theme_override_constants/margin_left = 28 +theme_override_constants/margin_top = 24 +theme_override_constants/margin_right = 28 +theme_override_constants/margin_bottom = 24 + +[node name="Options" type="VBoxContainer" parent="Overlay/Dialog/Panel/Margin"] +layout_mode = 2 +theme_override_constants/separation = 10 + +[node name="Heading" type="Label" parent="Overlay/Dialog/Panel/Margin/Options"] +layout_mode = 2 +theme_override_font_sizes/font_size = 34 +theme_override_colors/font_color = Color(0.9, 0.96, 0.61, 1) +horizontal_alignment = 1 +autowrap_mode = 3 +text = "PAUSA" + +[node name="Description" type="Label" parent="Overlay/Dialog/Panel/Margin/Options"] +layout_mode = 2 +custom_minimum_size = Vector2(0, 70) +theme_override_font_sizes/font_size = 17 +horizontal_alignment = 1 +vertical_alignment = 1 +autowrap_mode = 3 + +[node name="Resume" type="Button" parent="Overlay/Dialog/Panel/Margin/Options"] +custom_minimum_size = Vector2(0, 58) +layout_mode = 2 +text = "REANUDAR" + +[node name="Restart" type="Button" parent="Overlay/Dialog/Panel/Margin/Options"] +visible = false +custom_minimum_size = Vector2(0, 58) +layout_mode = 2 +text = "REINICIAR NIVEL" + +[node name="Next" type="Button" parent="Overlay/Dialog/Panel/Margin/Options"] +visible = false +custom_minimum_size = Vector2(0, 58) +layout_mode = 2 +text = "SIGUIENTE NIVEL" + +[node name="Levels" type="Button" parent="Overlay/Dialog/Panel/Margin/Options"] +custom_minimum_size = Vector2(0, 58) +layout_mode = 2 +text = "SELECTOR DE NIVELES" + +[node name="Title" type="Button" parent="Overlay/Dialog/Panel/Margin/Options"] +custom_minimum_size = Vector2(0, 58) +layout_mode = 2 +text = "TITULO PRINCIPAL" + +[node name="Confirm" type="Button" parent="Overlay/Dialog/Panel/Margin/Options"] +visible = false +custom_minimum_size = Vector2(0, 58) +layout_mode = 2 +text = "SI, ABANDONAR" + +[node name="Cancel" type="Button" parent="Overlay/Dialog/Panel/Margin/Options"] +visible = false +custom_minimum_size = Vector2(0, 58) +layout_mode = 2 +text = "CANCELAR" diff --git a/ui/menu/main_menu.gd b/ui/menu/main_menu.gd index 5d15081..7352cef 100644 --- a/ui/menu/main_menu.gd +++ b/ui/menu/main_menu.gd @@ -28,6 +28,7 @@ func _ready() -> void: set_process(false) # Volver desde una meta o abandonar exige una nueva eleccion, no un guardado de personaje. var session: RunSessionState = get_node_or_null("/root/RunSession") as RunSessionState + var open_levels: bool = session != null and session.show_levels_on_menu_entry if session != null: session.clear() characters_panel.connect("back_requested", _show_levels) @@ -39,7 +40,10 @@ func _ready() -> void: quit_button.pressed.connect(_quit_game) # En web no se puede cerrar la pestana desde el juego. quit_button.visible = not OS.has_feature("web") - _show_home() + if open_levels: + _show_levels() + else: + _show_home() ## ResourceLoader conserva los nombres originales tambien dentro del paquete exportado. diff --git a/world/triggers/level_exit.gd b/world/triggers/level_exit.gd index bc72a17..a0250de 100644 --- a/world/triggers/level_exit.gd +++ b/world/triggers/level_exit.gd @@ -1,6 +1,6 @@ extends Area2D -## Meta reutilizable: confirma los raros del intento antes de volver al menu. +## Meta reutilizable: confirma los raros del intento y muestra el resultado de victoria. ## No es el boton MENU (abandonar). Las reglas futuras deben llamar a complete_level. var _triggered: bool = false @@ -13,10 +13,10 @@ func _on_body_entered(body: Node2D) -> void: if _triggered or not body.is_in_group("player"): return _triggered = true - call_deferred("_return_to_menu") + call_deferred("_complete_finish") -func _return_to_menu() -> void: +func _complete_finish() -> void: var level: LevelRoot = LevelRoot.find_for(self) if level == null: push_warning("LevelExit necesita estar dentro de un escenario con LevelRoot.") @@ -26,7 +26,4 @@ func _return_to_menu() -> void: if not level.complete_level(): _triggered = false return - var error: Error = get_tree().change_scene_to_file("res://ui/menu/main_menu.tscn") - if error != OK: - _triggered = false - push_error("No se pudo abrir el menu desde la salida: " + error_string(error)) + # LevelRoot emite level_completed y LevelNavigation abre VICTORIA.