From 0976611f36d953f2dbad1e1566be9783bad70659 Mon Sep 17 00:00:00 2001 From: type-two Date: Mon, 27 Jul 2026 13:42:50 +1000 Subject: [PATCH] =?UTF-8?q?v1.2=20=E2=80=94=20Rob=20walks:=20sprite-sheet?= =?UTF-8?q?=20ego=20(MRPCI=20v0.5=20-sheet2x3=20views)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rob.png → rob-sheet2x3.png: 2 walk frames x front/back/side loops (engine mirrors side for right-facing). gen_sprites.py grows a sheet() assembler with per-cel shape asserts. Golden replay still wins 60/60. Co-Authored-By: Claude Fable 5 --- game.json | 2 +- sprites/rob-sheet2x3.png | Bin 0 -> 478 bytes sprites/rob.png | Bin 202 -> 0 bytes tools/gen_sprites.py | 144 ++++++++++++++++++++++++++++++--------- 4 files changed, 111 insertions(+), 35 deletions(-) create mode 100644 sprites/rob-sheet2x3.png delete mode 100644 sprites/rob.png diff --git a/game.json b/game.json index ff865d5..80fc522 100644 --- a/game.json +++ b/game.json @@ -3,7 +3,7 @@ "start_room": 0, "intro_text": "Victoria, BC. 1979. You are Rob Wright, twenty-five, back from Calgary with a bass guitar and no plan. Your kid brother can really drum. The basement is free after laundry hours. (Right-click cycles verbs. Or just type.)", "max_score": 60, - "ego_sprite": "rob", + "ego_sprite": "rob-sheet2x3", "verbs": { "play": "jam riff shred strum drum", "listen": "hear" diff --git a/sprites/rob-sheet2x3.png b/sprites/rob-sheet2x3.png new file mode 100644 index 0000000000000000000000000000000000000000..323e7b02af6c35dc108f9050dad6d4d55de0221f GIT binary patch literal 478 zcmV<40U`d0P)s9?q|Msjcz-3)H0@fWX#(t?ygoBY*$`2q17HCc|Kb}AxWSt*ZKq^R^A74Owg_HFFbpfW72q3_O1_1;RK;Vc1%!x+}gc)!kfIw$) zmU6T}eN0w5K%4JhfITo;U@j;L7n6E^8@0ygzY+)_fWR2O_#w@m`F;fous*aY6`;-c zFHkSB)~%j1^|$``%9IiT1cZQlO=b{4z^K4hj@eC&z+nXHF=y}Cv-NuMIk8oNU-S=M UtM1jyPXGV_07*qoM6N<$f*~f=j{pDw literal 0 HcmV?d00001 diff --git a/sprites/rob.png b/sprites/rob.png deleted file mode 100644 index e58a09a8b71f5350266149cad89f73922d71e6e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^5s!N!6g{#zopr02&ZO Ai~s-t diff --git a/tools/gen_sprites.py b/tools/gen_sprites.py index 0bfe2cd..3b7fe0b 100755 --- a/tools/gen_sprites.py +++ b/tools/gen_sprites.py @@ -41,40 +41,116 @@ def write_png(path, rows, legend, scale=1): S = {} # name -> (rows, legend) # --- people ------------------------------------------------------------- -# Rob Wright — the ego. Tall, calm, bass slung low. (Feet = bottom center.) -S["rob"] = ( - [ - "....hhhh....", - "....hhhh....", - "....ffff....", - "....f2f2....", - "....ffff....", - ".....ff.....", - "...ssssss...", - "..ssssssss..", - "..s.ssss.s..", - "..s.ssss.s..", - "..b.ssss....", - ".bbbrssss...", - ".bb.ssss....", - "..b.pppp....", - "....pppp....", - "....p..p....", - "....p..p....", - "....p..p....", - "....p..p....", - "...oo..oo...", - ], - { - "h": (72, 52, 36), # hair - "f": (214, 178, 148),# face - "2": (40, 40, 48), # eyes - "s": (52, 56, 64), # dark shirt - "p": (44, 48, 88), # jeans - "o": (30, 30, 34), # boots - "b": (150, 60, 40), # bass body - "r": (220, 200, 160),# bass neck - }, +# Rob Wright — the ego, as an MRPCI sprite sheet (`-sheet2x3`): 2 walk +# frames x 3 direction loops (front, back, side; the engine mirrors side +# for right-facing). Every cel is exactly 12x20; feet = bottom center. +ROB_LEGEND = { + "h": (72, 52, 36), # hair + "f": (214, 178, 148),# face + "2": (40, 40, 48), # eyes + "s": (52, 56, 64), # dark shirt + "p": (44, 48, 88), # jeans + "o": (30, 30, 34), # boots / strap + "b": (150, 60, 40), # bass body + "r": (220, 200, 160),# bass neck +} + +ROB_FRONT0 = [ + "....hhhh....", + "....hhhh....", + "....ffff....", + "....f2f2....", + "....ffff....", + ".....ff.....", + "...ssssss...", + "..ssssssss..", + "..s.ssss.s..", + "..s.ssss.s..", + "..b.ssss....", + ".bbbrssss...", + ".bb.ssss....", + "..b.pppp....", + "....pppp....", + "....p..p....", + "....p..p....", + "....p..p....", + "....p..p....", + "...oo..oo...", +] +# Frame 2: the walk bob — boots swing in. +ROB_FRONT1 = ROB_FRONT0[:19] + ["....oo.oo..."] + +ROB_BACK0 = [ + "....hhhh....", + "....hhhh....", + "....hhhh....", + "....hhhh....", + ".....ff.....", + "...ssssss...", + "..sossssss..", + "..s.osss.s..", + "..s.soss.s..", + "....ssos....", + "....ssso....", + "....sssso...", + "....ssss....", + "....pppp....", + "....pppp....", + "....p..p....", + "....p..p....", + "....p..p....", + "....p..p....", + "...oo..oo...", +] +ROB_BACK1 = ROB_BACK0[:19] + ["....oo.oo..."] + +# Side faces LEFT (MRPCI mirrors it for right); bass rides the front hip. +ROB_SIDE0 = [ + "....hhhh....", + "....hhhh....", + "....ffff....", + "....2fff....", + "....ffff....", + ".....ff.....", + "....ssss....", + "...ssssss...", + "...ssssss...", + "...ssssss...", + "..brssss....", + ".rbbssss....", + "..b.ssss....", + "....pppp....", + "....pppp....", + "....pp......", + "....pp......", + "....pp......", + "....pp......", + "...oooo.....", +] +ROB_SIDE1 = ROB_SIDE0[:15] + [ + "...p..p.....", + "...p..p.....", + "..p....p....", + "..p....p....", + ".oo....oo...", +] + + +def sheet(*loops): + """Stack loops vertically, frames horizontally — the -sheetCxR layout.""" + rows = [] + for cels in loops: + for cel in cels: + assert len(cel) == len(cels[0]), "frames in a loop must share height" + assert all(len(r) == len(cel[0]) for r in cel), "cels must be rectangular" + for y in range(len(cels[0])): + rows.append("".join(c[y] for c in cels)) + return rows + + +S["rob-sheet2x3"] = ( + sheet([ROB_FRONT0, ROB_FRONT1], [ROB_BACK0, ROB_BACK1], [ROB_SIDE0, ROB_SIDE1]), + ROB_LEGEND, ) # John Wright — behind the kit or beside it; sticks in hand.