125 lines
4.9 KiB
YAML
125 lines
4.9 KiB
YAML
# Mapa de la piràmide: graella 21×15 de tiles 16×16 sobre tomb.gif.
|
||
# Overscan horitzontal: 8 px per banda (les parets laterals ocupen 2 tiles
|
||
# en el tilemap però només 1.5 visibles al canvas, així que la textura es
|
||
# dibuixa amb un origen de x=-8). Vertical no cal overscan: 15·16 = 240.
|
||
#
|
||
# Format del tilemap:
|
||
# `data` és una llista de files; cada fila és una llista d'índexs del
|
||
# tileset (lineal esq→dre, dalt→baix). Amb un tileset de 512×256 i tiles
|
||
# de 16×16 hi ha 32 tiles per fila. Un valor negatiu (p.ex. -1) deixa
|
||
# la cel·la buida (transparent), útil per caselles que ocuparà un actor.
|
||
|
||
tileset: data/tilesets/tomb.gif
|
||
tile_size: 16
|
||
origin: [-8, 0]
|
||
|
||
# Índex de tile amb què cada jugador deixa rastre en trepitjar un sòl
|
||
# pintable. Un índex per jugador perquè a multijugador local el recorregut
|
||
# es distingeix a simple vista. Provisional fins que l'art del pintat
|
||
# estigui definit; canviar aquí l'índex és tot el que cal. Omet el camp
|
||
# per desactivar el pintat per a aquest jugador.
|
||
player1_paint_tile: 2
|
||
player2_paint_tile: 2
|
||
|
||
# Geometria lògica de la piràmide (separada del render visual del tileset).
|
||
# La graella de sarcòfags, el pitch entre ells i les amplades dels murs
|
||
# decideixen els límits del jugador i les seues caixes de col·lisió. Abans
|
||
# vivien com a `static constexpr` a map.hpp; ara cada piràmide pot definir
|
||
# la seua pròpia forma sense recompilar.
|
||
geometry:
|
||
grid_cols: 4
|
||
grid_rows: 5
|
||
sarc_w: 48
|
||
sarc_h: 16
|
||
pitch_x: 64
|
||
pitch_y: 32
|
||
hud_h: 24
|
||
back_wall_h: 24
|
||
side_wall_w: 24
|
||
|
||
data:
|
||
- [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
||
- [ 1,230,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,231, 1]
|
||
- [ 1,202,292,260,292,292,260,292,292,260,292,292,260,292,260,292,292,260,260,200, 1]
|
||
- [ 1,202, 32, 32, 2, 32, 65, 34, 34, 32, 65, 2, 32, 32, 65, 32, 34, 32, 32,200, 1]
|
||
- [ 1,202, 32, 2, 2, 2, 32, 2, 2, 2, 32, 2, 2, 2, 34, 2, 2, 2, 32,200, 1]
|
||
- [ 1,202, 65, 32, 32, 33, 33, 32, 32, 32, 32, 32, 2, 32, 32, 32, 34, 32, 65,200, 1]
|
||
- [ 1,202, 32, 2, 2, 2, 32, 2, 2, 2, 32, 2, 2, 2, 32, 2, 2, 2, 32,200, 1]
|
||
- [ 1,202, 65, 32, 33, 33, 32, 32, 32, 32, 32, 32, 32, 32, 34, 32, 32, 32, 65,200, 1]
|
||
- [ 1,202, 32, 2, 2, 2, 32, 2, 2, 2, 32, 2, 2, 2, 32, 2, 2, 2, 32,200, 1]
|
||
- [ 1,202, 65, 32, 32, 32, 33, 33, 32, 32, 32, 32, 2, 32,181, 32, 32, 32, 65,200, 1]
|
||
- [ 1,202, 32, 2, 2, 2, 32, 2, 2, 2, 32, 2, 2, 2, 32, 2, 2, 2, 32,200, 1]
|
||
- [ 1,202, 65, 32, 33, 2, 34, 32, 32, 32, 32, 32, 32, 33, 32, 32, 34, 32, 65,200, 1]
|
||
- [ 1,202, 32, 2, 2, 2, 32, 2, 2, 2, 32, 2, 2, 2, 32, 2, 2, 2, 32,200, 1]
|
||
- [ 1,202, 32, 32, 34, 34, 65, 32, 2, 32, 65, 32, 34, 33, 65, 32, 32, 32, 32,200, 1]
|
||
- [ 1,262,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,263, 1]
|
||
|
||
# Spawns d'entitats per a aquest nivell. Es llegeixen des de
|
||
# EntityManager::loadFromLevel al GameScene. Convencions:
|
||
# - sarcophagus → `sarc_position: [sarc_col, sarc_row]` en la graella de
|
||
# sarcòfags (4×5). EntityManager calcula el rect píxel via
|
||
# Map::getSarcRect i l'ancoratge de tile per al perímetre.
|
||
# - la resta (torch, door, mummy, rolling_rock, wall_trap, floor_trap)
|
||
# → `position: [tile_col, tile_row]` en coordenades del tilemap
|
||
# (origen `[-8, 0]` per defecte). Pixel = tile*16 + tilemap_origin.
|
||
#
|
||
# Dos sarcòfags en cantonades oposades → perímetres aïllats (cap tile en
|
||
# comú). La porta va al centre inferior, on el tilemap té els tiles
|
||
# d'obertura (262/263). La momia al corredor central. L'antorxa al costat
|
||
# superior esquerre per verificar render d'una entitat decorativa.
|
||
entities:
|
||
- type: torch
|
||
position: [4, 2]
|
||
- type: torch
|
||
position: [8, 2]
|
||
- type: torch
|
||
position: [12, 2]
|
||
- type: torch
|
||
position: [16, 2]
|
||
- type: sarcophagus
|
||
sarc_position: [0, 0]
|
||
- type: sarcophagus
|
||
sarc_position: [1, 0]
|
||
- type: sarcophagus
|
||
sarc_position: [2, 0]
|
||
- type: sarcophagus
|
||
sarc_position: [3, 0]
|
||
- type: sarcophagus
|
||
sarc_position: [0, 1]
|
||
- type: sarcophagus
|
||
sarc_position: [1, 1]
|
||
- type: sarcophagus
|
||
sarc_position: [2, 1]
|
||
- type: sarcophagus
|
||
sarc_position: [3, 1]
|
||
- type: sarcophagus
|
||
sarc_position: [0, 2]
|
||
- type: sarcophagus
|
||
sarc_position: [1, 2]
|
||
- type: sarcophagus
|
||
sarc_position: [2, 2]
|
||
- type: sarcophagus
|
||
sarc_position: [3, 2]
|
||
- type: sarcophagus
|
||
sarc_position: [0, 3]
|
||
- type: sarcophagus
|
||
sarc_position: [1, 3]
|
||
- type: sarcophagus
|
||
sarc_position: [2, 3]
|
||
- type: sarcophagus
|
||
sarc_position: [3, 3]
|
||
- type: sarcophagus
|
||
sarc_position: [0, 4]
|
||
- type: sarcophagus
|
||
sarc_position: [1, 4]
|
||
- type: sarcophagus
|
||
sarc_position: [2, 4]
|
||
- type: sarcophagus
|
||
sarc_position: [3, 4]
|
||
- type: door
|
||
position: [9, 1]
|
||
- type: mummy
|
||
position: [10, 7]
|
||
- type: mummy
|
||
position: [7, 9]
|