summaryrefslogtreecommitdiff
path: root/scripts/make-jiangnan-art.py
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-29 10:38:53 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-29 10:38:53 +0800
commit328760853c15c44d1de915d6c88e0dfd7ddc5af6 (patch)
treeaa1e570378cfe92b0c4e9f125141a43d0ba89663 /scripts/make-jiangnan-art.py
parent46073814a67598c1a4122d1cb5abaaeb38c94e6d (diff)
downloadliving-village-328760853c15c44d1de915d6c88e0dfd7ddc5af6.tar.gz
p72: 角色行走四向动画帧提升(6 走 + 2 待机)
CharacterArt 运行时点阵图集从 4 走 + 2 待机扩为 6 走(新增左右低过渡步 4/5,由 1/2 镜像)+ 2 待机,格数 *8、图集 5120x48;VillageArt 帧循环 %6、characterSourceRectangle *8、characterAtlasWidth 5120。同步 P45/Prototype 帧断言、新增 P72 帧表完整性回归、脚本与素材重新生成、维护说明动画语义。白天正午村庄行走实跑证据落 docs/evidence/p72-*。Desktop 343/343、Kernel 120/120、digest 与 p70 一致。
Diffstat (limited to 'scripts/make-jiangnan-art.py')
-rw-r--r--scripts/make-jiangnan-art.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/scripts/make-jiangnan-art.py b/scripts/make-jiangnan-art.py
index caf0c01..0c01bd0 100644
--- a/scripts/make-jiangnan-art.py
+++ b/scripts/make-jiangnan-art.py
@@ -3,7 +3,7 @@
Generates three RGBA PNGs into src/LivingVillage.Desktop/Assets:
jiangnan-world.png 1024x32 (32 ground/prop tiles, 32px each)
- jiangnan-characters.png 3840x48 (5 variants x 4 directions x 6 frames, 32x48 cells)
+ jiangnan-characters.png 5120x48 (5 variants x 4 directions x 8 frames, 32x48 cells)
jiangnan-interior.png 392x96 (variable-size bottom-aligned interior cells)
Cell geometry is mirrored in VillageArt.fs; keep both in sync.
@@ -660,7 +660,8 @@ DIRECTIONS = ["north", "south", "west", "east"]
def draw_character_cell(c, ox, variant, direction, frame):
- # frame: 0 neutral stand, 1 left stride, 2 neutral stand (higher torso bob), 3 right stride
+ # frame: 0 neutral stand, 1 left stride, 2 neutral stand (higher torso bob),
+ # 3 right stride, 4 left-low transition, 5 right-low transition.
robe = variant["robe"]
light = variant["light"]
dark = variant["dark"]
@@ -682,11 +683,21 @@ def draw_character_cell(c, ox, variant, direction, frame):
c.rect(ox + 9, 42, 6, 3, SHOE)
c.rect(ox + 18, 36, 3, 5, dark)
c.rect(ox + 18, 39, 6, 3, SHOE)
- else:
+ elif frame == 3:
c.rect(ox + 18, 36, 4, 7, dark)
c.rect(ox + 18, 42, 6, 3, SHOE)
c.rect(ox + 12, 36, 3, 5, dark)
c.rect(ox + 10, 39, 6, 3, SHOE)
+ elif frame == 4:
+ c.rect(ox + 8, 37, 5, 6, dark)
+ c.rect(ox + 7, 43, 6, 2, SHOE)
+ c.rect(ox + 19, 36, 4, 6, dark)
+ c.rect(ox + 19, 41, 6, 3, SHOE)
+ else:
+ c.rect(ox + 12, 36, 4, 6, dark)
+ c.rect(ox + 11, 41, 6, 3, SHOE)
+ c.rect(ox + 7, 37, 4, 6, dark)
+ c.rect(ox + 6, 43, 6, 2, SHOE)
c.rect(ox + 7, 22, 18, 14, robe)
c.rect(ox + 23, 22, 2, 14, dark)
@@ -837,11 +848,11 @@ def draw_character_idle_cell(c, ox, variant, direction, phase):
def build_character_atlas():
- c = Canvas(3840, 48)
+ c = Canvas(5120, 48)
cell = 0
for variant in VARIANTS:
for direction in DIRECTIONS:
- for frame in range(4):
+ for frame in range(6):
draw_character_cell(c, cell * 32, variant, direction, frame)
cell += 1
for phase in range(2):
@@ -1023,7 +1034,7 @@ def main():
ASSET_DIR.mkdir(parents=True, exist_ok=True)
targets = [
("jiangnan-world.png", build_world_atlas(), 1024, 32),
- ("jiangnan-characters.png", build_character_atlas(), 3840, 48),
+ ("jiangnan-characters.png", build_character_atlas(), 5120, 48),
("jiangnan-interior.png", build_interior_atlas(), 392, 96),
]
for name, canvas, w, h in targets: