fix(render): Original pack uses the game's REAL original tileset (tiles.png)

The `original` pack was built on the Kenney sheet, so it didn't match the classic look the
ROT instructions + waiting screens use. Point it at html/tiles.png (32px, the legacy
tileMap sheet) with grid coords = legacy pixel coords / 32: floor [0,0], wall [2,1], door
[1,0], torch [32,1], treasure [30,0], plus the classic @ hero [2,0] and ~ goblin [31,1].
The tiled renderer now prefers a pack's player/monster TILE over the character sprite in the
DUNGEON (tavern keeps sprites), so the Original pack is fully classic. Suite 62/435 green.
This commit is contained in:
jwinterm
2026-07-12 11:37:51 -04:00
parent 277ef72c99
commit 75b0f7acfb
2 changed files with 27 additions and 10 deletions
+17 -10
View File
@@ -136,17 +136,24 @@
'original': {
id: 'original',
label: 'Original Tiles',
tileset: { url: 'assets/kenney/roguelikeSheet.png', tile: 16, spacing: 1 },
// The game's ORIGINAL tileset (html/tiles.png, 32px, no spacing) — the exact tiles the
// ROT instructions + waiting screens use, so the free pack IS the classic look. Grid
// coords = the legacy pixel coords / 32 (see options.js tileMap).
tileset: { url: 'tiles.png', tile: 32, spacing: 0 },
tiles: {
floor: [5, 2], // wood floor
floor2: [6, 2], // stone accent
wall: [13, 12], // masonry
door: [37, 9],
entrance: [37, 9],
exit: [37, 9],
treasure: [42, 15],
torch: [50, 10]
// No furniture kinds → bar/keg/table/chair/shelf/barrel/crate/rug fall back to floor.
floor: [0, 0],
floor2: [32, 0], // alt/dirt floor
wall: [2, 1], // stone brick wall
door: [1, 0], // wooden door
entrance: [0, 1],
exit: [1, 0],
treasure: [30, 0], // $W gold coin
torch: [32, 1],
// Classic entities too (the tiled renderer prefers a pack's player/monster tile over
// the sprite when present) — the blue-robe @ hero and the green ~ goblin.
player: [2, 0],
monster: [31, 1]
// No furniture kinds → tavern furniture falls back to floor (bare, as intended).
}
},
'roguelike-interior': {
+10
View File
@@ -207,6 +207,10 @@
// characters through), falling back to a red orb only if the sprite is unavailable.
if (e.kind === 'monster') {
drawEntityShadow(ctx, e.x * cell + cell / 2, e.y * cell + cell * 0.9, cell * 0.32, cell * 0.13);
// Prefer the active pack's monster TILE (e.g. the Original pack's ~ goblin) so a
// classic tile pack renders classic; else the character sprite; else a red orb.
var mCoord = useAtlas ? pickVariant(tmap.monster, e.x, e.y) : null;
if (mCoord) { atlas.draw(ctx, mCoord[0], mCoord[1], e.x * cell, e.y * cell, cell); continue; }
var mAvatar = e.avatar || 'char-goblin';
if (window.RK && RK.avatarVisuals && RK.avatarVisuals.drawTopdownWorld) {
var mv = RK.avatarVisuals.resolve({ avatar: mAvatar }, { projection: 'topdown', context: 'dungeon', entity: e });
@@ -230,6 +234,12 @@
}
// Character-like entity: soft ground shadow, then the sprite (or fallback circle).
drawEntityShadow(ctx, e.x * cell + cell / 2, e.y * cell + cell * 0.92, cell * 0.34, cell * 0.14);
// In the DUNGEON, prefer the active pack's player TILE (Original pack's @ hero) over the
// sprite so a classic pack is fully classic. The tavern keeps character sprites.
if (scene.isDungeon && (e.you || e.kind === 'player') && useAtlas) {
var pCoord = pickVariant(tmap.player, e.x, e.y);
if (pCoord) { atlas.draw(ctx, pCoord[0], pCoord[1], e.x * cell, e.y * cell, cell); continue; }
}
// Roguelike character sprite, or premium animated skin; else the fallback circle.
if (window.RK && RK.avatarVisuals && RK.avatarVisuals.drawTopdownWorld) {
var visual = RK.avatarVisuals.resolve(e.appearance || { avatar: e.avatar }, {