diff --git a/README.md b/README.md index 43a6bff..6ad0a95 100644 --- a/README.md +++ b/README.md @@ -1887,6 +1887,8 @@ Actualizar esta sección conforme avance el proyecto. guardia y guitarrista rival) con SVG originales y estadisticas propias. - Level 01 ampliado a 8500 unidades, 17 encuentros de recompensa fija sin respawn y varias plataformas opcionales para probar la movilidad. +- Level 02: alfa urbana de 11.000 unidades, 29 enemigos, 14 pickups colocados, + 11 plataformas, ocho tramos de calle y cuatro capas de parallax. - Hurtboxes y zonas de ataque visibles en modo debug con rojo semitransparente. - Sala levels/test/combat_test.tscn para probar el combate. - Objetos recolectables configurables, curacion y siete buffs/cargas distintos. @@ -1902,8 +1904,8 @@ Actualizar esta sección conforme avance el proyecto. - Probar y ajustar tamaños/offsets de hurtboxes e hitboxes jugando la sala de combate. - Sustituir las animaciones provisionales cuando exista arte para cada integrante. - Probar tamaños y colocación de los controles táctiles en varios teléfonos. -- Validar la ruta de Level 01 en una APK real: todos los 17 objetos y el - acceso a las plataformas elevadas. +- Validar las rutas de Level 01 (laboratorio) y Level 02 (campo) en Android, + con plataformas, drops y rendimiento gráfico. - Ajustar posicion/tamano de los HUDs y controles para distintas pantallas. ``` @@ -2010,9 +2012,36 @@ una mejora se muestran su porcentaje, velocidad efectiva (px/s) y tiempo. La prueba Godot `tests/test_pickup_runtime.gd` incluye estos escenarios; sigue pendiente la comprobacion en un telefono real. -La escena de inicio del proyecto ya es `levels/level_01.tscn`. +La escena de inicio del proyecto es `levels/level_02.tscn`. El laboratorio +`levels/level_01.tscn` sigue disponible y no se ha eliminado. Para exportar una APK de pruebas, revisa las instrucciones de `scripts/export_android_debug.sh` y el preset de Android (requiere SDK y plantillas Godot configuradas localmente). > Importante: el proyecto contiene un prototipo jugable y arte provisional; la implementación no sustituye una prueba real en Godot ni garantiza una clasificación por edades concreta. + + +--- + +## Alfa urbana — Level 02 (octubre de 2026) + +**Implementado en escena:** `levels/level_02.tscn` y `levels/level_02.gd`, +con 11.000 unidades de recorrido, calles a ocho alturas, 11 plataformas +(opcionales, varias encadenadas), 29 enemigos en encuentros individuales y +grupos, 14 objetos repartidos y barreras al principio/final. Meta con resumen. + +**Arte original:** 15 PNG pixel art en `assets/city/`, incluidas seis fachadas +reutilizadas, textura de asfalto y cuatro capas `Parallax2D` (cielo, nubes, +edificios lejanos e intermedios). Generador reproducible en +`tools/generate_city_art.py`; Pillow solo se requiere para regenerar imágenes. + +**Nuevo equilibrio compartido:** 50 HP para los cuatro integrantes, enemigos +entre 11 y 21 HP y ground pound de 7–12 de daño, máximo 12 incluso con buffs. +Los drops y el inventario de Level 01 se conservan. + +**Pendiente:** comprobar el nivel real en Godot/Android, especialmente el +renderizado parallax, los saltos en cadena y el balance con varios enemigos. +Las comprobaciones Python de estructura pasan, pero no sustituyen una partida. + +Guía del recorrido, arte, parámetros y checklist: +**[docs/level_02.md](docs/level_02.md)**. diff --git a/assets/city/asphalt.png b/assets/city/asphalt.png new file mode 100644 index 0000000..c6ba2e1 Binary files /dev/null and b/assets/city/asphalt.png differ diff --git a/assets/city/barrier.png b/assets/city/barrier.png new file mode 100644 index 0000000..4a0e3ab Binary files /dev/null and b/assets/city/barrier.png differ diff --git a/assets/city/clouds.png b/assets/city/clouds.png new file mode 100644 index 0000000..2422496 Binary files /dev/null and b/assets/city/clouds.png differ diff --git a/assets/city/curb.png b/assets/city/curb.png new file mode 100644 index 0000000..6497ab4 Binary files /dev/null and b/assets/city/curb.png differ diff --git a/assets/city/facade_01.png b/assets/city/facade_01.png new file mode 100644 index 0000000..74bab32 Binary files /dev/null and b/assets/city/facade_01.png differ diff --git a/assets/city/facade_02.png b/assets/city/facade_02.png new file mode 100644 index 0000000..169a509 Binary files /dev/null and b/assets/city/facade_02.png differ diff --git a/assets/city/facade_03.png b/assets/city/facade_03.png new file mode 100644 index 0000000..1478608 Binary files /dev/null and b/assets/city/facade_03.png differ diff --git a/assets/city/facade_04.png b/assets/city/facade_04.png new file mode 100644 index 0000000..df982af Binary files /dev/null and b/assets/city/facade_04.png differ diff --git a/assets/city/facade_05.png b/assets/city/facade_05.png new file mode 100644 index 0000000..729a132 Binary files /dev/null and b/assets/city/facade_05.png differ diff --git a/assets/city/facade_06.png b/assets/city/facade_06.png new file mode 100644 index 0000000..e6cc000 Binary files /dev/null and b/assets/city/facade_06.png differ diff --git a/assets/city/sky.png b/assets/city/sky.png new file mode 100644 index 0000000..cd8dd16 Binary files /dev/null and b/assets/city/sky.png differ diff --git a/assets/city/skyline_far.png b/assets/city/skyline_far.png new file mode 100644 index 0000000..9295cc9 Binary files /dev/null and b/assets/city/skyline_far.png differ diff --git a/assets/city/skyline_mid.png b/assets/city/skyline_mid.png new file mode 100644 index 0000000..942456f Binary files /dev/null and b/assets/city/skyline_mid.png differ diff --git a/assets/city/streetlamp.png b/assets/city/streetlamp.png new file mode 100644 index 0000000..478e4fe Binary files /dev/null and b/assets/city/streetlamp.png differ diff --git a/assets/city/walkway.png b/assets/city/walkway.png new file mode 100644 index 0000000..8242028 Binary files /dev/null and b/assets/city/walkway.png differ diff --git a/docs/items.md b/docs/items.md index 9bf1c8a..2f1ed11 100644 --- a/docs/items.md +++ b/docs/items.md @@ -84,3 +84,13 @@ No uses `Color("#ffcd5b")` en un `.tres`: esa forma es valida en codigo GDScript, pero el parser de recursos de Godot no la admite. Es lo que impedia cargar los objetos y hacia que apareciese el cuadro blanco llamado `Item`. La prueba `tests/test_pickup_resources.py` impide volver a introducirlo. + +## Objetos colocados en Level 02 + +`levels/level_02.tscn` es una **alfa de campo**, no otra prueba de 17 drops +fijos. Hay 14 objetos en `Items/PickupXX`, con curaciones, especial, +movimiento, escudo, defensa y daño aéreo. Parte de ellos se sitúa en +plataformas altas. Además, los 29 enemigos comparten su sistema normal de +drops ponderados; tres tienen curación garantizada para sostener el recorrido. +Al tener los cuatro protagonistas 50 HP, los valores de curación se limitan +al HP que realmente falte. Ver [guía del Level 02](level_02.md). diff --git a/docs/level_02.md b/docs/level_02.md new file mode 100644 index 0000000..9607658 --- /dev/null +++ b/docs/level_02.md @@ -0,0 +1,149 @@ +# Level 02 — Calle del Feedback (alfa urbana) + +**Estado:** implementado en recursos/escena; faltan pruebas con Godot y en Android. +Este es el nivel de inicio (`run/main_scene` en `project.godot`), para que la +siguiente APK entre directamente en esta prueba de campo. El laboratorio de los +17 drops sigue accesible en `levels/level_01.tscn`. + +## Recorrido + +- **11.000 unidades** de izquierda a derecha, con meta en x=10.850. +- **8 calles consecutivas** (sin agujeros obligatorios). Hay ascensos por + escalones de 85–105 px y descensos de 55–175 px. Se puede completar + recorriendo el suelo, saltando los escalones; los tejados son opcionales. +- **11 plataformas unidireccionales**, incluidas tres rutas de dos alturas + (x≈800–1065, x≈3070–3500 y x≈5680–6090). Hay que usar la plataforma + inferior antes de subir a la superior; puedes atravesarlas desde abajo. +- **29 enemigos** distribuidos por el recorrido: cinco variantes humanoides + con la misma IA Walker. Hay encuentros individuales y grupos de 2 o 3. + No reaparecen. En este nivel se usa **el drop normal aleatorio**; + tres enemigos tienen un drop fijo de curación como ayuda para la alfa. +- **14 pickups colocados en el escenario**, algunos en lugares elevados. + 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. +- El especial tiene un radio de 290 unidades **solo en este nivel**, para no + matar enemigos de zonas enteras a la vez. + +### Calle principal + +| Tramo x | Altura del suelo (y) | Mecánica | +|---|---:|---| +| 0–1.480 | 845 | Introducción, primer tejado con recompensa | +| 1.480–2.810 | 755 | Subir un escalón, combate por parejas | +| 2.810–4.150 | 890 | Bajada y primera triple pelea | +| 4.150–5.500 | 805 | Segundo ascenso | +| 5.500–6.800 | 700 | Zona alta, tejados dobles y tres enemigos | +| 6.800–8.080 | 875 | Gran descenso y otro grupo de tres | +| 8.080–9.360 | 785 | Ascenso, plataforma alta opcional | +| 9.360–11.000 | 845 | Última pelea triple y meta | + +Todas las alturas son coordenadas `y` de Godot (menor `y` equivale a mayor +altura en pantalla). El personaje tiene doble salto; el camino principal no +requiere un salto potenciado ni recoger un objeto específico. + +## Arte y parallax + +Los 15 PNG originales de `assets/city/` comparten una paleta de azules, +malvas y ocres apagados. Son pixel art pintado sobre cuadrícula y exportado +con escalado *nearest neighbour*, no imágenes de terceros. + +| Arte | Destino | +|---|---| +| `sky.png` | Cielo nocturno de 1024×1280, parallax 0.00 | +| `clouds.png` | Nubes que se mueven solas, parallax 0.12 | +| `skyline_far.png` | Perfil de la ciudad lejana, parallax 0.23 | +| `skyline_mid.png` | Edificios intermedios, parallax 0.46 | +| `facade_01.png` … `facade_06.png` | 34 fachadas distribuidas en toda la calle | +| `asphalt.png`, `curb.png` | Suelo urbano con textura repetida | +| `walkway.png` | Pasarelas metálicas, editables en la escena | +| `barrier.png` | Barreras en los dos extremos | +| `streetlamp.png` | Farolas decorativas | + +Las cuatro capas `Parallax2D` repiten cada 1.024 px. La vertical permanece +anclada al mundo (`scroll_scale.y = 1`), incluso al saltar. El PNG del cielo +cubre la altura de cámara. No se crea una imagen de 11.000 píxeles de ancho, +lo que facilita mantener el escenario ligero para Android. + +Para regenerar el arte de forma reproducible: + +```bash +python -m pip install Pillow +python tools/generate_city_art.py +``` + +Pillow solo es necesario para **regenerar** el PNG, no para abrir Godot, +jugar, ejecutar los tests ni exportar Android. Los PNG ya están versionados. + +## Equilibrio inicial + +Este cambio afecta a ambos niveles porque usa los recursos compartidos: + +- **Personajes:** los cuatro `CharacterData` tienen **50 HP** (antes 100). +- **Puñetazo normal:** 5 de daño base (sin cambios). +- **Ground pound:** 7 de daño mínimo, aumenta con la altura hasta **12 de + daño máximo**, incluso con multiplicadores de objetos. Los buffs ayudan + a llegar antes al límite, pero no lo sobrepasan. +- **Enemigos:** Fan 11 HP / 2 daño; Roadie 14 HP / 2 daño; Técnico 16 HP / + 2 daño; Guitarrista Rival 17 HP / 3 daño; Guardia 21 HP / 3 daño. +- La probabilidad de drops normales y las funciones de recogida que ya + funcionan **no se han modificado**. + +Con 50 HP, las curaciones de 45 o 70 HP siguen funcionando: recuperan solo +los puntos faltantes hasta el máximo. El resto del catálogo no se reequilibra +aún para evitar cambiar demasiadas variables simultáneamente. + +## Modificar el nivel + +- **Terreno:** editar colisiones `World/Ground/StreetXX` o + `World/Walkways/WalkwayXX` en Godot. El script + `levels/level_02.gd::_draw()` lee los mismos rectángulos para renderizar + asfalto, bordillos y pasarelas: no hay geometría duplicada en código. +- **Enemigos:** instancias `Enemies/EnemyXX`. Se puede mover cualquiera, + sustituir su variante, editar `max_health` individual o establecer + `guaranteed_drop` si se quiere un objeto fijo. +- **Pickups:** instancias `Items/PickupXX`, editando `pickup_data` por + cualquier recurso `.tres` existente. +- **Decoración:** `Facades` y `StreetProps` son visuales sin colisión; las + calles y plataformas son la fuente de verdad de la geometría. +- **Cámara y meta:** `levels/level_02.gd` y `FinishZone`. + +## Pruebas pendientes en Godot / APK + +- [ ] En Android se inicia `Level02` y aparecen cielo, edificios y nubes. +- [ ] Las nubes se desplazan más lentamente que los edificios al correr. +- [ ] El fondo no deja franjas vacías al avanzar hasta x=11.000. +- [ ] El dibujo del suelo coincide con las colisiones en los ocho tramos. +- [ ] Se puede subir los cuatro escalones sin necesitar un buff. +- [ ] Los dos saltos encadenados de los tejados son posibles con controles táctiles. +- [ ] Se puede bajar a la calle y los enemigos no atraviesan el suelo. +- [ ] Varios enemigos atacan juntos y los 50 HP son jugables; ajustar después. +- [ ] Ground pound muestra daño entre 7 y 12, nunca más de 12 con buffs. +- [ ] Las curaciones, carga y velocidad se pueden recoger en el campo. +- [ ] Las dos barreras detienen al jugador y la meta muestra el resultado. +- [ ] Se puede completar, morir y reiniciar correctamente en Android. + +### Arrancar otra vez Level 01 + +En `project.godot`, cambiar temporalmente: + +```ini +run/main_scene="res://levels/level_01.tscn" +``` + +O abrir `levels/level_01.tscn` directamente en Godot y pulsar **F6** para +jugar esa escena sin modificar la escena de inicio del proyecto. + +### Comprobaciones automáticas + +```bash +python -m unittest discover -s tests -v +godot --headless --path . --editor --quit +godot --headless --path . --script res://tests/test_level_02_runtime.gd +``` + +Las pruebas Python verifican la estructura, recursos y continuidad del +camino, **no sustituyen una partida**. Las dos últimas líneas requieren +Godot 4.7 y sus importaciones; la validación visual de parallax y colisiones +se debe completar en el motor/dispositivo. diff --git a/docs/test_level_01.md b/docs/test_level_01.md index af19b19..fd9e4b7 100644 --- a/docs/test_level_01.md +++ b/docs/test_level_01.md @@ -3,8 +3,8 @@ **Implementado en escena / pendiente de validar jugando en Godot y Android.** `levels/level_01.tscn` es un recorrido deliberadamente largo para probar una -APK sin alterar el codigo entre partidas. Es la escena inicial configurada en -`project.godot`. +APK sin alterar el codigo entre partidas. Desde Level 02, **ya no es la escena inicial**: ábrelo con F6 o cambia +`run/main_scene` temporalmente como se indica en [Level 02](level_02.md). - **17 enemigos / 17 objetos diferentes**, uno por enemigo, en este orden. - Un **pickup de control adicional** (x=270) aparece sin matar a nadie: @@ -63,7 +63,7 @@ APK sin alterar el codigo entre partidas. Es la escena inicial configurada en un pickup (salvo que ya se haya recogido). `Senales` es un diagnostico adicional, no controla los drops. -- [ ] La APK abre directamente `level_01`, se puede caminar a derecha durante +- [ ] Con `level_01` seleccionado como escena de inicio, la APK lo abre y se puede caminar a derecha durante todo el nivel y la camara no se detiene en x=4000. - [ ] Los 17 enemigos tienen apariencia humanoide visible y ataques legibles. - [ ] Cada muerte deja el objeto esperado (no uno aleatorio), una sola vez. diff --git a/enemies/variants/backstage_guard.tscn b/enemies/variants/backstage_guard.tscn index 3596465..1ab7961 100644 --- a/enemies/variants/backstage_guard.tscn +++ b/enemies/variants/backstage_guard.tscn @@ -6,8 +6,8 @@ [node name="Walker" instance=ExtResource("1_walker")] enemy_display_name = "Guardia del Camerino" move_speed = 70.0 -max_health = 30 -attack_damage = 4 +max_health = 21 +attack_damage = 3 chase_radius = 135.0 respawn_delay = 0.0 show_debug_hitboxes = false diff --git a/enemies/variants/feedback_tech.tscn b/enemies/variants/feedback_tech.tscn index 01960a7..324e698 100644 --- a/enemies/variants/feedback_tech.tscn +++ b/enemies/variants/feedback_tech.tscn @@ -6,8 +6,8 @@ [node name="Walker" instance=ExtResource("1_walker")] enemy_display_name = "Tecnico del Feedback" move_speed = 55.0 -max_health = 25 -attack_damage = 3 +max_health = 16 +attack_damage = 2 chase_radius = 135.0 respawn_delay = 0.0 show_debug_hitboxes = false diff --git a/enemies/variants/pogo_fan.tscn b/enemies/variants/pogo_fan.tscn index 5f7e230..c8b5121 100644 --- a/enemies/variants/pogo_fan.tscn +++ b/enemies/variants/pogo_fan.tscn @@ -6,7 +6,7 @@ [node name="Walker" instance=ExtResource("1_walker")] enemy_display_name = "Fan del Pogo Eterno" move_speed = 105.0 -max_health = 15 +max_health = 11 attack_damage = 2 chase_radius = 135.0 respawn_delay = 0.0 diff --git a/enemies/variants/rival_guitarist.tscn b/enemies/variants/rival_guitarist.tscn index d1134f7..aa17f6c 100644 --- a/enemies/variants/rival_guitarist.tscn +++ b/enemies/variants/rival_guitarist.tscn @@ -6,7 +6,7 @@ [node name="Walker" instance=ExtResource("1_walker")] enemy_display_name = "Guitarrista Rival" move_speed = 87.0 -max_health = 20 +max_health = 17 attack_damage = 3 chase_radius = 135.0 respawn_delay = 0.0 diff --git a/enemies/variants/roadie.tscn b/enemies/variants/roadie.tscn index 8edaa72..9dd6fab 100644 --- a/enemies/variants/roadie.tscn +++ b/enemies/variants/roadie.tscn @@ -6,8 +6,8 @@ [node name="Walker" instance=ExtResource("1_walker")] enemy_display_name = "Roadie del Mas Alla" move_speed = 65.0 -max_health = 20 -attack_damage = 3 +max_health = 14 +attack_damage = 2 chase_radius = 135.0 respawn_delay = 0.0 show_debug_hitboxes = false diff --git a/levels/level_02.gd b/levels/level_02.gd new file mode 100644 index 0000000..670e891 --- /dev/null +++ b/levels/level_02.gd @@ -0,0 +1,102 @@ +extends Node2D + +## Alpha de campo: recorrido urbano con suelo a distintas alturas, plataformas, +## grupos de enemigos y objetos opcionales. Las posiciones y colisiones se editan +## en level_02.tscn; este script solo dibuja las superficies y gestiona la meta. +## No interviene en los drops: los Walker usan su sistema habitual. + +signal level_completed + +const WORLD_WIDTH: int = 11000 +const FINISH_RESTART_SECONDS: float = 9.0 + +# El dibujo utiliza directamente los CollisionShape2D del escenario. Así no +# hay una segunda lista de coordenadas visuales que pueda desincronizarse. +const ASPHALT: Texture2D = preload("res://assets/city/asphalt.png") +const CURB: Texture2D = preload("res://assets/city/curb.png") +const WALKWAY: Texture2D = preload("res://assets/city/walkway.png") +const BARRIER: Texture2D = preload("res://assets/city/barrier.png") + +@onready var player: CharacterBody2D = $Player +@onready var enemies: Node2D = $Enemies +@onready var status_label: Label = $LevelHUD/Overlay/Status +@onready var finish_message: Label = $LevelHUD/Overlay/FinishMessage + +var defeated_enemies: int = 0 +var completed: bool = false +var _finish_timer: float = 0.0 + + +func _ready() -> void: + # Camera2D configura un límite provisional de 4000 en su propio _ready(). + # El nivel lo sustituye después de que el jugador haya entrado en el árbol. + var camera: Camera2D = player.get_node("Camera2D") as Camera2D + camera.limit_left = 0 + camera.limit_top = 0 + camera.limit_right = WORLD_WIDTH + camera.limit_bottom = 1280 + + $FinishZone.body_entered.connect(_on_finish_entered) + finish_message.visible = false + for enemy: Node in enemies.get_children(): + if enemy.has_signal(&"died"): + enemy.connect(&"died", _on_enemy_died) + _update_status() + + +func _process(delta: float) -> void: + if completed: + _finish_timer += delta + if _finish_timer >= FINISH_RESTART_SECONDS: + get_tree().reload_current_scene() + return + _update_status() + + +func _on_enemy_died() -> void: + defeated_enemies += 1 + + +func _update_status() -> void: + var sector: int = clampi(int(player.global_position.x / (WORLD_WIDTH / 8.0)) + 1, 1, 8) + status_label.text = "CALLE DEL FEEDBACK %02d/08\nKOs: %02d/%02d" % [ + sector, defeated_enemies, enemies.get_child_count() + ] + + +func _on_finish_entered(body: Node2D) -> void: + if body != player or completed: + return + completed = true + level_completed.emit() + 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 + + +func _draw() -> void: + # Tiling GPU: dos pequeños PNG para miles de unidades de calle. + for collision: CollisionShape2D in $World/Ground.get_children(): + var bounds: Rect2 = _collision_rect(collision) + if bounds.has_area(): + draw_texture_rect(ASPHALT, bounds, true) + draw_texture_rect(CURB, Rect2(bounds.position.x, bounds.position.y, bounds.size.x, 24), true) + + # Plataformas de una sola dirección: se atraviesan desde abajo, se aterriza + # sobre ellas desde arriba y un segundo salto abre rutas opcionales. + for collision: CollisionShape2D in $World/Walkways.get_children(): + var bounds: Rect2 = _collision_rect(collision) + if bounds.has_area(): + draw_texture_rect(WALKWAY, bounds, true) + + # Barreras visibles y sólidas; el jugador no puede abandonar el mapa. + for wall_x: float in [0.0, WORLD_WIDTH - 48.0]: + draw_texture_rect(BARRIER, Rect2(wall_x, 280.0, 48.0, 820.0), true) + + +func _collision_rect(collision: CollisionShape2D) -> Rect2: + var shape: RectangleShape2D = collision.shape as RectangleShape2D + if shape == null: + return Rect2() + return Rect2(collision.position - shape.size * 0.5, shape.size) diff --git a/levels/level_02.tscn b/levels/level_02.tscn new file mode 100644 index 0000000..d238ebb --- /dev/null +++ b/levels/level_02.tscn @@ -0,0 +1,904 @@ +[gd_scene load_steps=57 format=3] + +[ext_resource type="Script" path="res://levels/level_02.gd" id="script"] +[ext_resource type="PackedScene" path="res://player/player.tscn" id="player"] +[ext_resource type="PackedScene" path="res://ui/mobile_controls/mobile_controls.tscn" id="mobile"] +[ext_resource type="PackedScene" path="res://pickups/pickup.tscn" id="pickup"] +[ext_resource type="PackedScene" path="res://enemies/variants/roadie.tscn" id="enemy_roadie"] +[ext_resource type="PackedScene" path="res://enemies/variants/pogo_fan.tscn" id="enemy_pogo_fan"] +[ext_resource type="PackedScene" path="res://enemies/variants/feedback_tech.tscn" id="enemy_feedback_tech"] +[ext_resource type="PackedScene" path="res://enemies/variants/backstage_guard.tscn" id="enemy_backstage_guard"] +[ext_resource type="PackedScene" path="res://enemies/variants/rival_guitarist.tscn" id="enemy_rival_guitarist"] +[ext_resource type="Texture2D" path="res://assets/city/sky.png" id="art_sky"] +[ext_resource type="Texture2D" path="res://assets/city/clouds.png" id="art_clouds"] +[ext_resource type="Texture2D" path="res://assets/city/skyline_far.png" id="art_skyline_far"] +[ext_resource type="Texture2D" path="res://assets/city/skyline_mid.png" id="art_skyline_mid"] +[ext_resource type="Texture2D" path="res://assets/city/streetlamp.png" id="art_streetlamp"] +[ext_resource type="Texture2D" path="res://assets/city/facade_01.png" id="facade_01"] +[ext_resource type="Texture2D" path="res://assets/city/facade_02.png" id="facade_02"] +[ext_resource type="Texture2D" path="res://assets/city/facade_03.png" id="facade_03"] +[ext_resource type="Texture2D" path="res://assets/city/facade_04.png" id="facade_04"] +[ext_resource type="Texture2D" path="res://assets/city/facade_05.png" id="facade_05"] +[ext_resource type="Texture2D" path="res://assets/city/facade_06.png" id="facade_06"] +[ext_resource type="Resource" path="res://pickups/data/amplificador_11.tres" id="item_amplificador_11"] +[ext_resource type="Resource" path="res://pickups/data/baqueta_sismica.tres" id="item_baqueta_sismica"] +[ext_resource type="Resource" path="res://pickups/data/beer.tres" id="item_beer"] +[ext_resource type="Resource" path="res://pickups/data/bocata_roadie.tres" id="item_bocata_roadie"] +[ext_resource type="Resource" path="res://pickups/data/botas_doble_bombo.tres" id="item_botas_doble_bombo"] +[ext_resource type="Resource" path="res://pickups/data/casete_demo.tres" id="item_casete_demo"] +[ext_resource type="Resource" path="res://pickups/data/cinta_americana.tres" id="item_cinta_americana"] +[ext_resource type="Resource" path="res://pickups/data/coffee.tres" id="item_coffee"] +[ext_resource type="Resource" path="res://pickups/data/muelles_stage.tres" id="item_muelles_stage"] +[ext_resource type="Resource" path="res://pickups/data/pedal_distorsion.tres" id="item_pedal_distorsion"] +[ext_resource type="Resource" path="res://pickups/data/pizza_post_bolo.tres" id="item_pizza_post_bolo"] +[ext_resource type="Resource" path="res://pickups/data/setlist_fin.tres" id="item_setlist_fin"] +[ext_resource type="Resource" path="res://pickups/data/tapones_tecnico.tres" id="item_tapones_tecnico"] +[ext_resource type="Resource" path="res://pickups/data/tupper_bateria.tres" id="item_tupper_bateria"] +[ext_resource type="FontFile" path="res://assets/fonts/PixelOperator8.ttf" id="font"] + +[sub_resource type="RectangleShape2D" id="Ground01"] +size = Vector2(1480, 500) + +[sub_resource type="RectangleShape2D" id="Ground02"] +size = Vector2(1330, 500) + +[sub_resource type="RectangleShape2D" id="Ground03"] +size = Vector2(1340, 500) + +[sub_resource type="RectangleShape2D" id="Ground04"] +size = Vector2(1350, 500) + +[sub_resource type="RectangleShape2D" id="Ground05"] +size = Vector2(1300, 500) + +[sub_resource type="RectangleShape2D" id="Ground06"] +size = Vector2(1280, 500) + +[sub_resource type="RectangleShape2D" id="Ground07"] +size = Vector2(1280, 500) + +[sub_resource type="RectangleShape2D" id="Ground08"] +size = Vector2(1640, 500) + +[sub_resource type="RectangleShape2D" id="Walkway01"] +size = Vector2(270, 20) + +[sub_resource type="RectangleShape2D" id="Walkway02"] +size = Vector2(230, 20) + +[sub_resource type="RectangleShape2D" id="Walkway03"] +size = Vector2(230, 20) + +[sub_resource type="RectangleShape2D" id="Walkway04"] +size = Vector2(220, 20) + +[sub_resource type="RectangleShape2D" id="Walkway05"] +size = Vector2(190, 20) + +[sub_resource type="RectangleShape2D" id="Walkway06"] +size = Vector2(260, 20) + +[sub_resource type="RectangleShape2D" id="Walkway07"] +size = Vector2(200, 20) + +[sub_resource type="RectangleShape2D" id="Walkway08"] +size = Vector2(190, 20) + +[sub_resource type="RectangleShape2D" id="Walkway09"] +size = Vector2(220, 20) + +[sub_resource type="RectangleShape2D" id="Walkway10"] +size = Vector2(230, 20) + +[sub_resource type="RectangleShape2D" id="Walkway11"] +size = Vector2(270, 20) + +[sub_resource type="RectangleShape2D" id="BarrierShape"] +size = Vector2(60, 920) + +[sub_resource type="RectangleShape2D" id="FinishShape"] +size = Vector2(110, 240) + +[node name="Level02" type="Node2D" parent="."] +script = ExtResource("script") +texture_filter = 1 +texture_repeat = 2 + +[node name="Sky" type="Parallax2D" parent="."] +z_index = -18 +scroll_scale = Vector2(0, 1) +repeat_size = Vector2(1024, 0) +repeat_times = 2 + +[node name="Strip" type="Sprite2D" parent="Sky"] +centered = false +texture_filter = 1 +texture = ExtResource("art_sky") + +[node name="HighClouds" type="Parallax2D" parent="."] +z_index = -17 +scroll_scale = Vector2(0.12, 1) +repeat_size = Vector2(1024, 0) +repeat_times = 2 +autoscroll = Vector2(3, 0) + +[node name="Strip" type="Sprite2D" parent="HighClouds"] +centered = false +texture_filter = 1 +texture = ExtResource("art_clouds") + +[node name="FarBuildings" type="Parallax2D" parent="."] +z_index = -16 +scroll_scale = Vector2(0.23, 1) +repeat_size = Vector2(1024, 0) +repeat_times = 2 + +[node name="Strip" type="Sprite2D" parent="FarBuildings"] +centered = false +texture_filter = 1 +texture = ExtResource("art_skyline_far") + +[node name="NearBuildings" type="Parallax2D" parent="."] +z_index = -15 +scroll_scale = Vector2(0.46, 1) +repeat_size = Vector2(1024, 0) +repeat_times = 2 + +[node name="Strip" type="Sprite2D" parent="NearBuildings"] +centered = false +texture_filter = 1 +texture = ExtResource("art_skyline_mid") + +[node name="Facades" type="Node2D" parent="."] +z_index = -8 + +[node name="Facade01" type="Sprite2D" parent="Facades"] +position = Vector2(35, 480) +centered = false +texture_filter = 1 +texture = ExtResource("facade_01") + +[node name="Facade02" type="Sprite2D" parent="Facades"] +position = Vector2(394, 556) +centered = false +texture_filter = 1 +texture = ExtResource("facade_02") + +[node name="Facade03" type="Sprite2D" parent="Facades"] +position = Vector2(705, 426) +centered = false +texture_filter = 1 +texture = ExtResource("facade_03") + +[node name="Facade04" type="Sprite2D" parent="Facades"] +position = Vector2(1016, 524) +centered = false +texture_filter = 1 +texture = ExtResource("facade_04") + +[node name="Facade05" type="Sprite2D" parent="Facades"] +position = Vector2(1327, 380) +centered = false +texture_filter = 1 +texture = ExtResource("facade_05") + +[node name="Facade06" type="Sprite2D" parent="Facades"] +position = Vector2(1686, 366) +centered = false +texture_filter = 1 +texture = ExtResource("facade_06") + +[node name="Facade07" type="Sprite2D" parent="Facades"] +position = Vector2(1997, 390) +centered = false +texture_filter = 1 +texture = ExtResource("facade_01") + +[node name="Facade08" type="Sprite2D" parent="Facades"] +position = Vector2(2308, 466) +centered = false +texture_filter = 1 +texture = ExtResource("facade_02") + +[node name="Facade09" type="Sprite2D" parent="Facades"] +position = Vector2(2619, 336) +centered = false +texture_filter = 1 +texture = ExtResource("facade_03") + +[node name="Facade10" type="Sprite2D" parent="Facades"] +position = Vector2(2978, 569) +centered = false +texture_filter = 1 +texture = ExtResource("facade_04") + +[node name="Facade11" type="Sprite2D" parent="Facades"] +position = Vector2(3289, 425) +centered = false +texture_filter = 1 +texture = ExtResource("facade_05") + +[node name="Facade12" type="Sprite2D" parent="Facades"] +position = Vector2(3600, 501) +centered = false +texture_filter = 1 +texture = ExtResource("facade_06") + +[node name="Facade13" type="Sprite2D" parent="Facades"] +position = Vector2(3911, 525) +centered = false +texture_filter = 1 +texture = ExtResource("facade_01") + +[node name="Facade14" type="Sprite2D" parent="Facades"] +position = Vector2(4222, 516) +centered = false +texture_filter = 1 +texture = ExtResource("facade_02") + +[node name="Facade15" type="Sprite2D" parent="Facades"] +position = Vector2(4581, 386) +centered = false +texture_filter = 1 +texture = ExtResource("facade_03") + +[node name="Facade16" type="Sprite2D" parent="Facades"] +position = Vector2(4892, 484) +centered = false +texture_filter = 1 +texture = ExtResource("facade_04") + +[node name="Facade17" type="Sprite2D" parent="Facades"] +position = Vector2(5203, 340) +centered = false +texture_filter = 1 +texture = ExtResource("facade_05") + +[node name="Facade18" type="Sprite2D" parent="Facades"] +position = Vector2(5514, 311) +centered = false +texture_filter = 1 +texture = ExtResource("facade_06") + +[node name="Facade19" type="Sprite2D" parent="Facades"] +position = Vector2(5873, 335) +centered = false +texture_filter = 1 +texture = ExtResource("facade_01") + +[node name="Facade20" type="Sprite2D" parent="Facades"] +position = Vector2(6184, 411) +centered = false +texture_filter = 1 +texture = ExtResource("facade_02") + +[node name="Facade21" type="Sprite2D" parent="Facades"] +position = Vector2(6495, 281) +centered = false +texture_filter = 1 +texture = ExtResource("facade_03") + +[node name="Facade22" type="Sprite2D" parent="Facades"] +position = Vector2(6806, 554) +centered = false +texture_filter = 1 +texture = ExtResource("facade_04") + +[node name="Facade23" type="Sprite2D" parent="Facades"] +position = Vector2(7165, 410) +centered = false +texture_filter = 1 +texture = ExtResource("facade_05") + +[node name="Facade24" type="Sprite2D" parent="Facades"] +position = Vector2(7476, 486) +centered = false +texture_filter = 1 +texture = ExtResource("facade_06") + +[node name="Facade25" type="Sprite2D" parent="Facades"] +position = Vector2(7787, 510) +centered = false +texture_filter = 1 +texture = ExtResource("facade_01") + +[node name="Facade26" type="Sprite2D" parent="Facades"] +position = Vector2(8098, 496) +centered = false +texture_filter = 1 +texture = ExtResource("facade_02") + +[node name="Facade27" type="Sprite2D" parent="Facades"] +position = Vector2(8409, 366) +centered = false +texture_filter = 1 +texture = ExtResource("facade_03") + +[node name="Facade28" type="Sprite2D" parent="Facades"] +position = Vector2(8768, 464) +centered = false +texture_filter = 1 +texture = ExtResource("facade_04") + +[node name="Facade29" type="Sprite2D" parent="Facades"] +position = Vector2(9079, 320) +centered = false +texture_filter = 1 +texture = ExtResource("facade_05") + +[node name="Facade30" type="Sprite2D" parent="Facades"] +position = Vector2(9390, 456) +centered = false +texture_filter = 1 +texture = ExtResource("facade_06") + +[node name="Facade31" type="Sprite2D" parent="Facades"] +position = Vector2(9701, 480) +centered = false +texture_filter = 1 +texture = ExtResource("facade_01") + +[node name="Facade32" type="Sprite2D" parent="Facades"] +position = Vector2(10060, 556) +centered = false +texture_filter = 1 +texture = ExtResource("facade_02") + +[node name="Facade33" type="Sprite2D" parent="Facades"] +position = Vector2(10371, 426) +centered = false +texture_filter = 1 +texture = ExtResource("facade_03") + +[node name="Facade34" type="Sprite2D" parent="Facades"] +position = Vector2(10682, 524) +centered = false +texture_filter = 1 +texture = ExtResource("facade_04") + +[node name="World" type="Node2D" parent="."] + +[node name="Ground" type="StaticBody2D" parent="World"] +collision_layer = 1 +collision_mask = 0 + +[node name="Street01" type="CollisionShape2D" parent="World/Ground"] +position = Vector2(740, 1095) +shape = SubResource("Ground01") + +[node name="Street02" type="CollisionShape2D" parent="World/Ground"] +position = Vector2(2145, 1005) +shape = SubResource("Ground02") + +[node name="Street03" type="CollisionShape2D" parent="World/Ground"] +position = Vector2(3480, 1140) +shape = SubResource("Ground03") + +[node name="Street04" type="CollisionShape2D" parent="World/Ground"] +position = Vector2(4825, 1055) +shape = SubResource("Ground04") + +[node name="Street05" type="CollisionShape2D" parent="World/Ground"] +position = Vector2(6150, 950) +shape = SubResource("Ground05") + +[node name="Street06" type="CollisionShape2D" parent="World/Ground"] +position = Vector2(7440, 1125) +shape = SubResource("Ground06") + +[node name="Street07" type="CollisionShape2D" parent="World/Ground"] +position = Vector2(8720, 1035) +shape = SubResource("Ground07") + +[node name="Street08" type="CollisionShape2D" parent="World/Ground"] +position = Vector2(10180, 1095) +shape = SubResource("Ground08") + +[node name="Walkways" type="StaticBody2D" parent="World"] +collision_layer = 1 +collision_mask = 0 + +[node name="Walkway01" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(690, 720) +shape = SubResource("Walkway01") +one_way_collision = true + +[node name="Walkway02" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(950, 625) +shape = SubResource("Walkway02") +one_way_collision = true + +[node name="Walkway03" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(2135, 638) +shape = SubResource("Walkway03") +one_way_collision = true + +[node name="Walkway04" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(3180, 775) +shape = SubResource("Walkway04") +one_way_collision = true + +[node name="Walkway05" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(3405, 665) +shape = SubResource("Walkway05") +one_way_collision = true + +[node name="Walkway06" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(4720, 685) +shape = SubResource("Walkway06") +one_way_collision = true + +[node name="Walkway07" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(5780, 585) +shape = SubResource("Walkway07") +one_way_collision = true + +[node name="Walkway08" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(5995, 485) +shape = SubResource("Walkway08") +one_way_collision = true + +[node name="Walkway09" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(7360, 755) +shape = SubResource("Walkway09") +one_way_collision = true + +[node name="Walkway10" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(8705, 655) +shape = SubResource("Walkway10") +one_way_collision = true + +[node name="Walkway11" type="CollisionShape2D" parent="World/Walkways"] +position = Vector2(10035, 735) +shape = SubResource("Walkway11") +one_way_collision = true + +[node name="Barriers" type="StaticBody2D" parent="World"] +collision_layer = 1 +collision_mask = 0 + +[node name="Left" type="CollisionShape2D" parent="World/Barriers"] +position = Vector2(0, 690) +shape = SubResource("BarrierShape") + +[node name="Right" type="CollisionShape2D" parent="World/Barriers"] +position = Vector2(11000, 690) +shape = SubResource("BarrierShape") + +[node name="StreetProps" type="Node2D" parent="."] +z_index = 0 + +[node name="Lamp01" type="Sprite2D" parent="StreetProps"] +position = Vector2(187, 493) +centered = false +texture_filter = 1 +texture = ExtResource("art_streetlamp") +modulate = Color(0.9, 0.86, 0.88, 1) + +[node name="Lamp02" type="Sprite2D" parent="StreetProps"] +position = Vector2(1362, 493) +centered = false +texture_filter = 1 +texture = ExtResource("art_streetlamp") +modulate = Color(0.9, 0.86, 0.88, 1) + +[node name="Lamp03" type="Sprite2D" parent="StreetProps"] +position = Vector2(2642, 403) +centered = false +texture_filter = 1 +texture = ExtResource("art_streetlamp") +modulate = Color(0.9, 0.86, 0.88, 1) + +[node name="Lamp04" type="Sprite2D" parent="StreetProps"] +position = Vector2(4012, 538) +centered = false +texture_filter = 1 +texture = ExtResource("art_streetlamp") +modulate = Color(0.9, 0.86, 0.88, 1) + +[node name="Lamp05" type="Sprite2D" parent="StreetProps"] +position = Vector2(5312, 453) +centered = false +texture_filter = 1 +texture = ExtResource("art_streetlamp") +modulate = Color(0.9, 0.86, 0.88, 1) + +[node name="Lamp06" type="Sprite2D" parent="StreetProps"] +position = Vector2(6702, 348) +centered = false +texture_filter = 1 +texture = ExtResource("art_streetlamp") +modulate = Color(0.9, 0.86, 0.88, 1) + +[node name="Lamp07" type="Sprite2D" parent="StreetProps"] +position = Vector2(7982, 523) +centered = false +texture_filter = 1 +texture = ExtResource("art_streetlamp") +modulate = Color(0.9, 0.86, 0.88, 1) + +[node name="Lamp08" type="Sprite2D" parent="StreetProps"] +position = Vector2(9252, 433) +centered = false +texture_filter = 1 +texture = ExtResource("art_streetlamp") +modulate = Color(0.9, 0.86, 0.88, 1) + +[node name="Lamp09" type="Sprite2D" parent="StreetProps"] +position = Vector2(10722, 493) +centered = false +texture_filter = 1 +texture = ExtResource("art_streetlamp") +modulate = Color(0.9, 0.86, 0.88, 1) + +[node name="Player" parent="." instance=ExtResource("player")] +position = Vector2(125, 795) +show_debug_hitboxes = false +special_radius = 290.0 + + +[node name="Enemies" type="Node2D" parent="."] + +[node name="Enemy01" parent="Enemies" instance=ExtResource("enemy_roadie")] +position = Vector2(410, 811) +show_debug_enemy_info = true + + +[node name="Enemy02" parent="Enemies" instance=ExtResource("enemy_pogo_fan")] +position = Vector2(915, 811) +show_debug_enemy_info = true + + +[node name="Enemy03" parent="Enemies" instance=ExtResource("enemy_rival_guitarist")] +position = Vector2(970, 581) +show_debug_enemy_info = true + + +[node name="Enemy04" parent="Enemies" instance=ExtResource("enemy_feedback_tech")] +position = Vector2(1770, 721) +show_debug_enemy_info = true + + +[node name="Enemy05" parent="Enemies" instance=ExtResource("enemy_pogo_fan")] +position = Vector2(1880, 721) +show_debug_enemy_info = true + + +[node name="Enemy06" parent="Enemies" instance=ExtResource("enemy_backstage_guard")] +position = Vector2(2260, 721) +show_debug_enemy_info = true + + +[node name="Enemy07" parent="Enemies" instance=ExtResource("enemy_roadie")] +position = Vector2(2450, 721) +show_debug_enemy_info = true + + +[node name="Enemy08" parent="Enemies" instance=ExtResource("enemy_pogo_fan")] +position = Vector2(3030, 856) +show_debug_enemy_info = true + + +[node name="Enemy09" parent="Enemies" instance=ExtResource("enemy_roadie")] +position = Vector2(3170, 856) +show_debug_enemy_info = true + + +[node name="Enemy10" parent="Enemies" instance=ExtResource("enemy_rival_guitarist")] +position = Vector2(3320, 856) +show_debug_enemy_info = true +guaranteed_drop = ExtResource("item_beer") + + +[node name="Enemy11" parent="Enemies" instance=ExtResource("enemy_feedback_tech")] +position = Vector2(3900, 856) +show_debug_enemy_info = true + + +[node name="Enemy12" parent="Enemies" instance=ExtResource("enemy_roadie")] +position = Vector2(4430, 771) +show_debug_enemy_info = true + + +[node name="Enemy13" parent="Enemies" instance=ExtResource("enemy_pogo_fan")] +position = Vector2(4530, 771) +show_debug_enemy_info = true + + +[node name="Enemy14" parent="Enemies" instance=ExtResource("enemy_backstage_guard")] +position = Vector2(5180, 771) +show_debug_enemy_info = true + + +[node name="Enemy15" parent="Enemies" instance=ExtResource("enemy_feedback_tech")] +position = Vector2(5670, 666) +show_debug_enemy_info = true + + +[node name="Enemy16" parent="Enemies" instance=ExtResource("enemy_pogo_fan")] +position = Vector2(5810, 666) +show_debug_enemy_info = true + + +[node name="Enemy17" parent="Enemies" instance=ExtResource("enemy_roadie")] +position = Vector2(5960, 666) +show_debug_enemy_info = true + + +[node name="Enemy18" parent="Enemies" instance=ExtResource("enemy_rival_guitarist")] +position = Vector2(6500, 666) +show_debug_enemy_info = true + + +[node name="Enemy19" parent="Enemies" instance=ExtResource("enemy_pogo_fan")] +position = Vector2(7010, 841) +show_debug_enemy_info = true + + +[node name="Enemy20" parent="Enemies" instance=ExtResource("enemy_feedback_tech")] +position = Vector2(7150, 841) +show_debug_enemy_info = true + + +[node name="Enemy21" parent="Enemies" instance=ExtResource("enemy_roadie")] +position = Vector2(7320, 841) +show_debug_enemy_info = true +guaranteed_drop = ExtResource("item_pizza_post_bolo") + + +[node name="Enemy22" parent="Enemies" instance=ExtResource("enemy_backstage_guard")] +position = Vector2(7780, 841) +show_debug_enemy_info = true + + +[node name="Enemy23" parent="Enemies" instance=ExtResource("enemy_rival_guitarist")] +position = Vector2(8380, 751) +show_debug_enemy_info = true + + +[node name="Enemy24" parent="Enemies" instance=ExtResource("enemy_pogo_fan")] +position = Vector2(8510, 751) +show_debug_enemy_info = true + + +[node name="Enemy25" parent="Enemies" instance=ExtResource("enemy_feedback_tech")] +position = Vector2(8950, 751) +show_debug_enemy_info = true + + +[node name="Enemy26" parent="Enemies" instance=ExtResource("enemy_roadie")] +position = Vector2(9660, 811) +show_debug_enemy_info = true + + +[node name="Enemy27" parent="Enemies" instance=ExtResource("enemy_pogo_fan")] +position = Vector2(9780, 811) +show_debug_enemy_info = true + + +[node name="Enemy28" parent="Enemies" instance=ExtResource("enemy_rival_guitarist")] +position = Vector2(9940, 811) +show_debug_enemy_info = true +guaranteed_drop = ExtResource("item_bocata_roadie") + + +[node name="Enemy29" parent="Enemies" instance=ExtResource("enemy_backstage_guard")] +position = Vector2(10420, 811) +show_debug_enemy_info = true + + +[node name="Items" type="Node2D" parent="."] + +[node name="Pickup01" parent="Items" instance=ExtResource("pickup")] +position = Vector2(710, 670) +pickup_data = ExtResource("item_beer") + + +[node name="Pickup02" parent="Items" instance=ExtResource("pickup")] +position = Vector2(945, 575) +pickup_data = ExtResource("item_pedal_distorsion") + + +[node name="Pickup03" parent="Items" instance=ExtResource("pickup")] +position = Vector2(1550, 715) +pickup_data = ExtResource("item_cinta_americana") + + +[node name="Pickup04" parent="Items" instance=ExtResource("pickup")] +position = Vector2(2140, 588) +pickup_data = ExtResource("item_casete_demo") + + +[node name="Pickup05" parent="Items" instance=ExtResource("pickup")] +position = Vector2(3410, 615) +pickup_data = ExtResource("item_muelles_stage") + + +[node name="Pickup06" parent="Items" instance=ExtResource("pickup")] +position = Vector2(3840, 850) +pickup_data = ExtResource("item_pizza_post_bolo") + + +[node name="Pickup07" parent="Items" instance=ExtResource("pickup")] +position = Vector2(4700, 635) +pickup_data = ExtResource("item_coffee") + + +[node name="Pickup08" parent="Items" instance=ExtResource("pickup")] +position = Vector2(5760, 535) +pickup_data = ExtResource("item_baqueta_sismica") + + +[node name="Pickup09" parent="Items" instance=ExtResource("pickup")] +position = Vector2(5980, 435) +pickup_data = ExtResource("item_amplificador_11") + + +[node name="Pickup10" parent="Items" instance=ExtResource("pickup")] +position = Vector2(6920, 835) +pickup_data = ExtResource("item_bocata_roadie") + + +[node name="Pickup11" parent="Items" instance=ExtResource("pickup")] +position = Vector2(7380, 705) +pickup_data = ExtResource("item_tapones_tecnico") + + +[node name="Pickup12" parent="Items" instance=ExtResource("pickup")] +position = Vector2(8500, 745) +pickup_data = ExtResource("item_tupper_bateria") + + +[node name="Pickup13" parent="Items" instance=ExtResource("pickup")] +position = Vector2(8740, 605) +pickup_data = ExtResource("item_botas_doble_bombo") + + +[node name="Pickup14" parent="Items" instance=ExtResource("pickup")] +position = Vector2(10030, 685) +pickup_data = ExtResource("item_setlist_fin") + + +[node name="FinishZone" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 2 +position = Vector2(10850, 780) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="FinishZone"] +shape = SubResource("FinishShape") + +[node name="Sign01" type="Label" parent="."] +offset_left = 300 +offset_top = 715 +offset_right = 560 +offset_bottom = 755 +theme_override_fonts/font = ExtResource("font") +theme_override_font_sizes/font_size = 16 +theme_override_colors/font_color = Color(0.96, 0.80, 0.60, 1) +theme_override_colors/font_shadow_color = Color(0.09, 0.1, 0.17, 1) +theme_override_constants/shadow_offset_x = 2 +theme_override_constants/shadow_offset_y = 2 +text = "SALA RUIDO >>" + + +[node name="Sign02" type="Label" parent="."] +offset_left = 1610 +offset_top = 641 +offset_right = 1870 +offset_bottom = 681 +theme_override_fonts/font = ExtResource("font") +theme_override_font_sizes/font_size = 16 +theme_override_colors/font_color = Color(0.96, 0.80, 0.60, 1) +theme_override_colors/font_shadow_color = Color(0.09, 0.1, 0.17, 1) +theme_override_constants/shadow_offset_x = 2 +theme_override_constants/shadow_offset_y = 2 +text = "SUBE AL BARRIO ALTO" + + +[node name="Sign03" type="Label" parent="."] +offset_left = 2890 +offset_top = 793 +offset_right = 3150 +offset_bottom = 833 +theme_override_fonts/font = ExtResource("font") +theme_override_font_sizes/font_size = 16 +theme_override_colors/font_color = Color(0.96, 0.80, 0.60, 1) +theme_override_colors/font_shadow_color = Color(0.09, 0.1, 0.17, 1) +theme_override_constants/shadow_offset_x = 2 +theme_override_constants/shadow_offset_y = 2 +text = "BAJADA SIN FRENOS" + + +[node name="Sign04" type="Label" parent="."] +offset_left = 5420 +offset_top = 564 +offset_right = 5680 +offset_bottom = 604 +theme_override_fonts/font = ExtResource("font") +theme_override_font_sizes/font_size = 16 +theme_override_colors/font_color = Color(0.96, 0.80, 0.60, 1) +theme_override_colors/font_shadow_color = Color(0.09, 0.1, 0.17, 1) +theme_override_constants/shadow_offset_x = 2 +theme_override_constants/shadow_offset_y = 2 +text = "ESCALERA A LOS TEJADOS" + + +[node name="Sign05" type="Label" parent="."] +offset_left = 6850 +offset_top = 745 +offset_right = 7110 +offset_bottom = 785 +theme_override_fonts/font = ExtResource("font") +theme_override_font_sizes/font_size = 16 +theme_override_colors/font_color = Color(0.96, 0.80, 0.60, 1) +theme_override_colors/font_shadow_color = Color(0.09, 0.1, 0.17, 1) +theme_override_constants/shadow_offset_x = 2 +theme_override_constants/shadow_offset_y = 2 +text = "POGO MULTITUDINARIO" + + +[node name="Sign06" type="Label" parent="."] +offset_left = 10680 +offset_top = 659 +offset_right = 10940 +offset_bottom = 699 +theme_override_fonts/font = ExtResource("font") +theme_override_font_sizes/font_size = 16 +theme_override_colors/font_color = Color(0.96, 0.80, 0.60, 1) +theme_override_colors/font_shadow_color = Color(0.09, 0.1, 0.17, 1) +theme_override_constants/shadow_offset_x = 2 +theme_override_constants/shadow_offset_y = 2 +text = "FIN DE LA GIRA!" + + +[node name="LevelHUD" type="CanvasLayer" parent="."] +layer = 87 + +[node name="Overlay" type="Control" parent="LevelHUD"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +mouse_filter = 2 + +[node name="Status" type="Label" parent="LevelHUD/Overlay"] +layout_mode = 1 +anchors_preset = 1 +anchor_left = 1.0 +anchor_right = 1.0 +offset_left = -360.0 +offset_top = 16.0 +offset_right = -14.0 +offset_bottom = 70.0 +grow_horizontal = 0 +theme_override_fonts/font = ExtResource("font") +theme_override_font_sizes/font_size = 17 +theme_override_colors/font_color = Color(0.98, 0.87, 0.68, 1) +theme_override_colors/font_shadow_color = Color(0.07, 0.06, 0.13, 1) +theme_override_constants/shadow_offset_x = 2 +theme_override_constants/shadow_offset_y = 2 +text = "CALLE DEL FEEDBACK" +horizontal_alignment = 2 + +[node name="FinishMessage" type="Label" parent="LevelHUD/Overlay"] +layout_mode = 1 +anchor_left = 0.5 +anchor_top = 0.32 +anchor_right = 0.5 +anchor_bottom = 0.32 +offset_left = -330.0 +offset_top = -35.0 +offset_right = 330.0 +offset_bottom = 95.0 +theme_override_fonts/font = ExtResource("font") +theme_override_colors/font_color = Color(1.0, 0.88, 0.48, 1) +theme_override_colors/font_shadow_color = Color(0.05, 0.05, 0.12, 1) +theme_override_constants/shadow_offset_x = 3 +theme_override_constants/shadow_offset_y = 3 +theme_override_font_sizes/font_size = 32 +horizontal_alignment = 1 +vertical_alignment = 1 +visible = false + + +[node name="MobileControls" parent="." instance=ExtResource("mobile")] diff --git a/player/characters/bassist.tres b/player/characters/bassist.tres index 58eeff8..f5864c1 100644 --- a/player/characters/bassist.tres +++ b/player/characters/bassist.tres @@ -8,7 +8,7 @@ script = ExtResource("1_data") id = &"bassist" display_name = "Bassist" sprite_frames = ExtResource("2_frames") -max_health = 100 +max_health = 50 move_speed = 390.0 jump_velocity = -600.0 basic_attack_damage = 5 diff --git a/player/characters/drummer.tres b/player/characters/drummer.tres index 044551c..cb27943 100644 --- a/player/characters/drummer.tres +++ b/player/characters/drummer.tres @@ -8,7 +8,7 @@ script = ExtResource("1_data") id = &"drummer" display_name = "Drummer" sprite_frames = ExtResource("2_frames") -max_health = 100 +max_health = 50 move_speed = 390.0 jump_velocity = -600.0 basic_attack_damage = 5 diff --git a/player/characters/guitarist.tres b/player/characters/guitarist.tres index 9d97e57..28fe385 100644 --- a/player/characters/guitarist.tres +++ b/player/characters/guitarist.tres @@ -8,7 +8,7 @@ script = ExtResource("1_data") id = &"guitarist" display_name = "Guitarist" sprite_frames = ExtResource("2_frames") -max_health = 100 +max_health = 50 move_speed = 390.0 jump_velocity = -600.0 basic_attack_damage = 5 diff --git a/player/characters/singer.tres b/player/characters/singer.tres index 6a47e82..82e9c2e 100644 --- a/player/characters/singer.tres +++ b/player/characters/singer.tres @@ -8,7 +8,7 @@ script = ExtResource("1_data") id = &"singer" display_name = "Singer" sprite_frames = ExtResource("2_frames") -max_health = 100 +max_health = 50 move_speed = 390.0 jump_velocity = -600.0 basic_attack_damage = 5 diff --git a/player/player.gd b/player/player.gd index e9d1651..3d9313d 100644 --- a/player/player.gd +++ b/player/player.gd @@ -127,10 +127,11 @@ const ENEMY_HURTBOX_MASK: int = 1 << 4 @export var ground_pound_radius: float = 54.0 @export var ground_pound_offset: Vector2 = Vector2(0.0, 18.0) -## Damage per pixel of jump height. Higher jumps deal more damage, up to the max. -@export var ground_pound_damage_per_pixel: float = 0.03 -@export_range(1, 100, 1) var ground_pound_min_damage: int = 1 -@export_range(1, 100, 1) var ground_pound_max_damage: int = 10 +## From 7 damage on a small jump to 12 on a high one; always stronger +## than a standard 5-point punch, even without any pickup. +@export var ground_pound_damage_per_pixel: float = 0.065 +@export_range(1, 100, 1) var ground_pound_min_damage: int = 7 +@export_range(1, 100, 1) var ground_pound_max_damage: int = 12 # ============================================================================ @@ -475,8 +476,14 @@ func _ground_pound_impact() -> void: var hit_targets: Dictionary = {} + # The final damage is capped too: active buffs make the 12-point ceiling + # easier to reach, rather than turning an alpha attack into a one-shot. + var final_damage: int = mini( + roundi(damage * (1.0 + _damage_boost_multiplier + _air_damage_boost_multiplier)), + ground_pound_max_damage + ) for area in ground_pound_hitbox.get_overlapping_areas(): - _damage_target(area, roundi(damage * (1.0 + _damage_boost_multiplier + _air_damage_boost_multiplier)), hit_targets) + _damage_target(area, final_damage, hit_targets) # ============================================================================ diff --git a/project.godot b/project.godot index b8ba4cb..c38f896 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="Mortal Maze: The Game" -run/main_scene="res://levels/level_01.tscn" +run/main_scene="res://levels/level_02.tscn" config/features=PackedStringArray("4.7", "GL Compatibility") config/icon="res://icon.svg" diff --git a/tests/test_level_02_resources.py b/tests/test_level_02_resources.py new file mode 100644 index 0000000..137937a --- /dev/null +++ b/tests/test_level_02_resources.py @@ -0,0 +1,83 @@ +"""Fast, engine-independent checks of the Level 02 alpha route. + +Run: python -m unittest discover -s tests -v +A Godot playtest is still needed for physics, importing, and Android controls. +""" + +from pathlib import Path +import re +import unittest +import struct + +ROOT = Path(__file__).resolve().parents[1] +LEVEL = (ROOT / "levels/level_02.tscn").read_text(encoding="utf-8") +SCRIPT = (ROOT / "levels/level_02.gd").read_text(encoding="utf-8") + + +class Level02ResourceTests(unittest.TestCase): + def test_asset_references_exist(self): + for path in re.findall(r'path="res://([^"]+)"', LEVEL): + self.assertTrue((ROOT / path).is_file(), path) + for asset in re.findall(r'preload\("res://([^"]+)"\)', SCRIPT): + self.assertTrue((ROOT / asset).is_file(), asset) + + def test_pixel_art_is_real_rgba_png_and_parallax_is_repeated(self): + graphics = list((ROOT / "assets/city").glob("*.png")) + self.assertEqual(len(graphics), 15) + for png in graphics: + content = png.read_bytes() + self.assertTrue(content.startswith(b"\x89PNG\r\n\x1a\n"), png.name) + width, height = struct.unpack(">II", content[16:24]) + self.assertGreater(width, 15) + self.assertGreater(height, 15) + self.assertEqual(LEVEL.count('type="Parallax2D"'), 4) + self.assertEqual(LEVEL.count('repeat_size = Vector2(1024, 0)'), 4) + self.assertIn('autoscroll = Vector2(3, 0)', LEVEL) + self.assertIn('texture_repeat = 2', LEVEL) + + def test_road_is_continuous_and_has_end_walls(self): + widths = [float(w) for w in re.findall( + r'\[sub_resource type="RectangleShape2D" id="Ground\d+"\]\nsize = Vector2\((\d+), 500\)', LEVEL + )] + # Each section uses a native CollisionShape2D with its own width. + sections = re.findall( + r'\[node name="Street\d+" type="CollisionShape2D" parent="World/Ground"\]\n' + r'position = Vector2\((\d+(?:\.\d+)?), (\d+(?:\.\d+)?)\)\n' + r'shape = SubResource\("Ground\d+"\)', LEVEL, + ) + self.assertEqual(len(sections), 8) + self.assertEqual(len(widths), len(sections)) + left_edge = 0 + tops = [] + for w, (center,y) in zip(widths, sections): + self.assertEqual(float(center) - w / 2, left_edge) + left_edge += w + tops.append(float(y) - 250.0) + self.assertEqual(left_edge, 11000) + self.assertTrue(all(a-b <= 110 for a,b in zip(tops, tops[1:])), tops) + for name in ('Left', 'Right'): + self.assertRegex(LEVEL, rf'\[node name="{name}" type="CollisionShape2D" parent="World/Barriers"\]') + self.assertIn('camera.limit_right = WORLD_WIDTH', SCRIPT) + self.assertIn('collision_mask = 2', LEVEL) + + def test_multiple_encounters_and_optional_items(self): + enemies = re.findall(r'\[node name="Enemy\d+" parent="Enemies" instance=ExtResource\("enemy_([^\"]+)"\)\]', LEVEL) + pickups = re.findall(r'\[node name="Pickup\d+" parent="Items" instance=ExtResource\("pickup"\)\]', LEVEL) + self.assertEqual(len(enemies), 29) + self.assertEqual(len(set(enemies)), 5) + self.assertEqual(len(pickups), 14) + self.assertEqual(LEVEL.count('one_way_collision = true'), 11) + self.assertIn('run/main_scene="res://levels/level_02.tscn"', (ROOT / 'project.godot').read_text()) + self.assertIn('respawn_delay = 0.0', (ROOT / 'enemies/variants/roadie.tscn').read_text()) + + def test_50_hp_all_characters_and_12_point_ground_pound(self): + for data in (ROOT / "player/characters").glob("*.tres"): + self.assertIn('max_health = 50', data.read_text(), data.name) + player = (ROOT / 'player/player.gd').read_text() + self.assertIn('ground_pound_min_damage: int = 7', player) + self.assertIn('ground_pound_max_damage: int = 12', player) + self.assertIn('mini(\n\t\troundi(damage', player) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_level_02_runtime.gd b/tests/test_level_02_runtime.gd new file mode 100644 index 0000000..487d5b1 --- /dev/null +++ b/tests/test_level_02_runtime.gd @@ -0,0 +1,83 @@ +extends SceneTree + +## Godot integration smoke test. Engine required; not covered by Python tests. +## Run after importing assets: godot --headless --path . --script res://tests/test_level_02_runtime.gd + + +func _initialize() -> void: + call_deferred("_run") + + +func _run() -> void: + var packed: PackedScene = load("res://levels/level_02.tscn") as PackedScene + if packed == null: + _fail("No se pudo cargar levels/level_02.tscn") + return + + var level: Node2D = packed.instantiate() as Node2D + root.add_child(level) + current_scene = level + await physics_frame + + var player: CharacterBody2D = level.get_node("Player") as CharacterBody2D + if player == null: + _fail("No se ha instanciado el jugador") + return + var character_data: CharacterData = player.get("character_data") as CharacterData + if character_data == null or character_data.max_health != 50: + _fail("El jugador no inicia con los datos de 50 HP") + return + if int(player.get("current_health")) != 50: + _fail("La vida inicial real no es 50") + return + if int(player.get("ground_pound_min_damage")) != 7 or int(player.get("ground_pound_max_damage")) != 12: + _fail("El ground pound no esta configurado entre 7 y 12") + return + + var camera: Camera2D = player.get_node("Camera2D") as Camera2D + if camera.limit_right != 11000: + _fail("La camara todavia se detiene antes del final del mapa") + return + + if level.get_node("Enemies").get_child_count() != 29: + _fail("No se instanciaron los 29 enemigos") + return + if level.get_node("Items").get_child_count() != 14: + _fail("No se instanciaron los 14 objetos colocados") + return + + for node: Node in level.get_node("Items").get_children(): + var pickup: Pickup = node as Pickup + if pickup == null or pickup.pickup_data == null or pickup.get_node("Sprite2D").texture == null: + _fail("Pickup sin datos/icono: " + node.name) + return + + for name: String in ["Sky", "HighClouds", "FarBuildings", "NearBuildings"]: + var layer: Parallax2D = level.get_node(name) as Parallax2D + if layer == null or layer.repeat_size.x != 1024: + _fail("Falta la capa de parallax repetible: " + name) + return + if (layer.get_node("Strip") as Sprite2D).texture == null: + _fail("Falta la textura de la capa: " + name) + return + + if level.get_node("World/Ground").get_child_count() != 8: + _fail("Numero incorrecto de calles") + return + if level.get_node("World/Walkways").get_child_count() != 11: + _fail("Numero incorrecto de plataformas") + return + + # Las paredes son colisiones reales, no simples dibujos. + var barriers: Node = level.get_node("World/Barriers") + if barriers.get_child_count() != 2: + _fail("Faltan las barreras de inicio y final") + return + + print("OK LEVEL02: escena, 50 HP, pound 7-12, 29 enemigos, 14 pickups, 4 parallax, calles, plataformas y barreras") + quit(0) + + +func _fail(message: String) -> void: + push_error("Prueba runtime Level02: " + message) + quit(1) diff --git a/tests/test_pickup_runtime.gd b/tests/test_pickup_runtime.gd index fde06b7..e18b213 100644 --- a/tests/test_pickup_runtime.gd +++ b/tests/test_pickup_runtime.gd @@ -103,9 +103,9 @@ func _run() -> void: if not (heal_pickup.get_node("Label") as Label).text.contains("HP LLENO"): _fail("El pickup no explica que la salud esta llena") return - player.set("current_health", 50) + player.set("current_health", 20) await create_timer(0.1).timeout - if is_instance_valid(heal_pickup) or int(player.get("current_health")) <= 50: + if is_instance_valid(heal_pickup) or int(player.get("current_health")) <= 20: _fail("Un objeto solapado debe reintentarse cuando el jugador necesita HP") return diff --git a/tools/generate_city_art.py b/tools/generate_city_art.py new file mode 100644 index 0000000..c2c5d11 --- /dev/null +++ b/tools/generate_city_art.py @@ -0,0 +1,216 @@ +"""Regenerate Level 02's original pixel-art PNGs with Pillow. + +Usage: python tools/generate_city_art.py +Only development-time Pillow is required. Godot uses the exported PNGs directly. +Everything is drawn on a low-resolution pixel grid, then resized with NEAREST. +""" + +from __future__ import annotations + +import random +from pathlib import Path +from PIL import Image, ImageDraw, ImageFont + +ROOT = Path(__file__).resolve().parents[1] / 'assets' / 'city' +ROOT.mkdir(parents=True, exist_ok=True) +SCALE = 2 +W, H = 512, 640 # 1024x1280 world units after nearest-neighbour enlargement. +INK = '#171d31' +SKY = ['#181e38', '#242844', '#32334f', '#4d4159', '#67505d'] +FAR = ['#2b3048', '#30354e', '#353a53', '#3c3c54'] +MID = ['#424358', '#4b495e', '#545065', '#5c5265'] +NEAR = ['#51546a', '#5b576d', '#64596d', '#656273', '#565b70'] +WINDOW_DARK = ['#292f47', '#34384c', '#373a50'] +WINDOW_LIT = ['#e5b878', '#edcf91', '#ad9da0', '#ae8e78'] +FONT_PATH = Path(__file__).resolve().parents[1] / 'assets' / 'fonts' / 'PixelOperator8.ttf' + + +def image(mode='RGBA'): + return Image.new(mode, (W, H), (0, 0, 0, 0)) + + +def save(img, name, multiplier=SCALE): + img.resize((img.width * multiplier, img.height * multiplier), Image.Resampling.NEAREST).save(ROOT / name, optimize=True) + + +def blocks(d, x0, y0, x1, y1, fill, highlight=None, shadow=None): + d.rectangle((x0, y0, x1, y1), fill=fill) + if shadow: + d.rectangle((x1 - 3, y0 + 3, x1, y1), fill=shadow) + if highlight: + d.rectangle((x0 + 2, y0 + 2, x1 - 5, y0 + 4), fill=highlight) + + +def windows(d, x0, top, x1, bottom, rng, lit_probability, tiny=False): + ww, wh = (3, 6) if tiny else (7, 10) + dx, dy = (12, 16) if tiny else (19, 23) + for yy in range(top + 20, bottom - wh - 15, dy): + for xx in range(x0 + 9, x1 - ww - 6, dx): + if rng.random() > .90: + continue + color = rng.choice(WINDOW_LIT) if rng.random() < lit_probability else rng.choice(WINDOW_DARK) + d.rectangle((xx, yy, xx + ww, yy + wh), fill=color) + if not tiny: + d.line((xx + ww // 2, yy, xx + ww // 2, yy + wh), fill='#404057', width=2) + d.rectangle((xx - 1, yy + wh + 1, xx + ww + 1, yy + wh + 2), fill='#35384c') + + +# The base is fully opaque. No transparent gaps appear while jumping high. +sky = Image.new('RGB', (W, H), SKY[-1]); d = ImageDraw.Draw(sky) +for yy in range(H): + s = yy / H + stops = [0, .24, .47, .7, 1] + for i in range(4): + if stops[i] <= s <= stops[i + 1]: + t = (s - stops[i]) / (stops[i + 1] - stops[i]) + ca = tuple(bytes.fromhex(SKY[i][1:])); cb = tuple(bytes.fromhex(SKY[i+1][1:])) + rgb = tuple(round(a * (1 - t) + b * t) for a,b in zip(ca,cb)) + d.line((0,yy,W,yy),fill=rgb) + break +rng = random.Random(8173) +for i in range(110): + x,y = rng.randrange(W), rng.randrange(0,275) + color = rng.choice(('#aaafc8','#888fad','#797f9d')) + d.rectangle((x,y,x+(i%19==0),y+(i%23==0)),fill=color) +# Offset glow and a pale disk: deliberately subdued so it never steals focus. +for rad, col in [(55,'#524b69'), (42,'#655a74'),(30,'#847588'),(22,'#c2a39e')]: + d.ellipse((410-rad,178-rad,410+rad,178+rad), fill=col) +save(sky,'sky.png') + + +# Cloud silhouettes: one independent, slowly drifting parallax layer. +clouds = image(); d=ImageDraw.Draw(clouds); rng=random.Random(97) +for cx,cy,rw,rh in [(90,218,65,18),(300,340,82,19),(482,280,55,17),(196,419,67,17)]: + for k in range(9): + x = cx - rw + k * rw // 4 + by = cy + rng.randint(-4,4) + radius = rng.randint(rh-4,rh+8) + d.rectangle((x,by-radius//2,x+rw//4+15,by+rh),fill='#48465d') + d.ellipse((x,by-radius,x+2*radius,by+radius),fill='#55516a') + d.rectangle((cx-rw+12,cy+rh,cx+rw+4,cy+rh+6), fill='#4e4c63') + for ii in range(4): + xx=cx-rw+25+ii*rw//3 + d.rectangle((xx,cy+rh-3,xx+18,cy+rh-1),fill='#79738b') +save(clouds,'clouds.png') + + +# Silhouette skyline: repeatable at the 1024-unit horizontal seam. +far=image(); d=ImageDraw.Draw(far); rng=random.Random(190) +x=0 +while x85: + d.rectangle((x+ww//2-15,y-17,x+ww//2+23,y-8),fill='#36394e') + d.rectangle((x+ww//2-12,y-24,x+ww//2+20,y-18),fill='#5f6074') + x=xx+1 +save(mid,'skyline_mid.png') + + +# Facades are separate reusable transparent PNGs. They can be moved individually +# in the level editor without needing to regenerate a single huge background. +font=ImageFont.truetype(str(FONT_PATH), 11) if FONT_PATH.exists() else ImageFont.load_default() +styles=[ + ('SALA RUIDO', 108, 245, '#565369', '#8f596a'), + ('GIRA 24H', 94, 207, '#5d5871', '#666e81'), + ('NOISE SHOP', 132, 272, '#595b70', '#7a586e'), + ('LOCAL 404', 112, 223, '#625969', '#af766a'), + ('THRASH FM', 139, 295, '#56596e', '#73778e'), + ('REHEARSAL', 120, 257, '#5d566e', '#86717c'), +] +for idx,(sign,bw,bh,main,accent) in enumerate(styles): + rng=random.Random(900+idx); img=Image.new('RGBA',(bw,bh),(0,0,0,0)); dd=ImageDraw.Draw(img) + # Main mass and pixel masonry. + dd.rectangle((3,11,bw-3,bh-1),fill=main) + dd.rectangle((0,7,bw-1,13),fill='#30364b') + dd.rectangle((4,14,bw-6,17),fill='#787388') + for yy in range(25,bh-19,12): + for xx in range(7+(yy//12%2)*5,bw-7,19): + dd.line((xx, yy,xx+11,yy),fill='#6a657a',width=1) + windows(dd,2,15,bw-3,bh,rng,.45) + # Shop front, rolling shutters, and a neon venue sign. + dd.rectangle((8,bh-49,bw-9,bh-2),fill='#30344b') + dd.rectangle((bw//2-15,bh-45,bw//2+14,bh-3),fill='#515064') + dd.rectangle((bw//2-12,bh-43,bw//2+11,bh-6),fill='#242a40') + dd.line((bw//2,bh-42,bw//2,bh-6),fill='#81798d',width=2) + signw=min(bw-13, len(sign)*7 + 10) + lx=(bw-signw)//2 + dd.rectangle((lx,28,lx+signw,49), fill='#242a41') + dd.rectangle((lx+2,30,lx+signw-2,47), outline=accent, width=2) + if signw>20: + bbox=dd.textbbox((0,0),sign,font=font) + tw=bbox[2]-bbox[0] + # Pixel text is clipped intentionally if a deliberately long sign occurs. + dd.text(((bw-tw)//2,32),sign,font=font,fill='#f7ca85') + # Vent pipe, satellite/radio antenna, fire exit. + dd.rectangle((bw-20,1,bw-16,11),fill='#31384d') + dd.rectangle((bw-26,1,bw-9,3),fill='#747082') + dd.rectangle((bw-10,bh//2,bw-4,bh//2+41),fill='#3a4056') + for yy in range(bh//2,bh//2+41,10): + dd.line((bw-17,yy,bw-3,yy),fill='#777a8a',width=2) + save(img,f'facade_{idx+1:02d}.png') + + +# Game terrain tiles, also authored pixel-by-pixel. Each is seamless in X/Y. +road=Image.new('RGBA',(64,64),'#292f40');d=ImageDraw.Draw(road);rng=random.Random(87) +for gy in range(0,64,16): + for gx in range(0,64,32): + xx=gx+((gy//16)%2)*12 + d.line((xx,gy,xx+27,gy),fill='#3c4153',width=2) + d.line((xx+2,gy+3,xx+2,gy+15),fill='#21283a') +for i in range(33): + x,y=rng.randrange(64),rng.randrange(64) + d.rectangle((x,y,x+rng.randint(1,3),y+1),fill=rng.choice(('#3b3f50','#242b3a','#414456'))) +save(road,'asphalt.png') + +curb=Image.new('RGBA',(64,12),'#777484'); d=ImageDraw.Draw(curb) +d.rectangle((0,0,63,2),fill='#aea1a0');d.rectangle((0,3,63,6),fill='#8d8894');d.rectangle((0,9,63,11),fill='#3c4054') +d.line((31,4,31,10),fill='#47495b',width=2) +save(curb,'curb.png') + +pl=Image.new('RGBA',(64,12),'#51566c'); d=ImageDraw.Draw(pl) +d.rectangle((0,0,63,2),fill='#bab4b3');d.rectangle((0,3,63,8),fill='#74798b') +d.rectangle((0,9,63,11),fill='#30374d') +for x in (4,27,50): + d.rectangle((x,4,x+3,7), fill='#292f43') +save(pl,'walkway.png') + +barrier=Image.new('RGBA',(24,80),'#303447'); d=ImageDraw.Draw(barrier) +d.rectangle((0,0,23,3),fill='#e9be83') +d.rectangle((2,6,21,77),fill='#444958') +for y in (13,34,55): + d.polygon([(2,y),(12,y-10),(22,y-10),(22,y-3),(9,y+6),(2,y+6)], fill='#b77e63') +d.rectangle((0,77,23,79),fill='#202838') +save(barrier,'barrier.png') + +# A compact pavement prop, reused sparingly in the actual scene. +lamp=Image.new('RGBA',(48,176),(0,0,0,0));d=ImageDraw.Draw(lamp) +d.rectangle((25,27,28,175),fill='#373e56') +d.rectangle((17,24,34,31),fill='#4f5267') +d.rectangle((7,11,43,20),fill='#2b344a') +d.rectangle((9,13,40,18),fill='#e4bd83') +d.rectangle((13,20,36,25),fill='#676579') +d.rectangle((19,172,35,175),fill='#353b4d') +save(lamp,'streetlamp.png') + +print(f'Generated {len(list(ROOT.glob("*.png")))} original PNG assets in {ROOT}')