Replace repeated room tiling with fitted bays

This commit is contained in:
Admin 2026-09-22 02:09:11 +00:00
parent 1cc43040e9
commit 0aeaaabae7

View File

@ -1501,22 +1501,36 @@ class RoomScene extends PlayableLevelScene {
graphics.fillStyle(0xfffbfd, 1) graphics.fillStyle(0xfffbfd, 1)
graphics.fillRect(0, 110, worldWidth, floorBottom - 110) graphics.fillRect(0, 110, worldWidth, floorBottom - 110)
this.add.tileSprite( // Use three large fitted bays instead of TileSprite repetition. The source
worldWidth / 2, // artwork is close to the bay aspect ratio, so this keeps motifs/planks
wallTop + (floorTop - wallTop) / 2, // readable and the joins can be hidden by the room dividers.
worldWidth, const bayCount = 3
floorTop - wallTop, const bayWidth = worldWidth / bayCount
skin.wallpaper const wallHeight = floorTop - wallTop
).setDepth(1) const floorHeight = floorBottom - floorTop
// Long floor strip. for (let bay = 0; bay < bayCount; bay += 1) {
this.add.tileSprite( const x = bayWidth * bay + bayWidth / 2
worldWidth / 2, const flip = bay % 2 === 1
floorTop + (floorBottom - floorTop) / 2,
worldWidth, this.add.image(
floorBottom - floorTop, x,
wallTop + wallHeight / 2,
skin.wallpaper
)
.setDisplaySize(bayWidth + 8, wallHeight)
.setFlipX(flip)
.setDepth(1)
this.add.image(
x,
floorTop + floorHeight / 2,
skin.floor skin.floor
).setDepth(2) )
.setDisplaySize(bayWidth + 8, floorHeight)
.setFlipX(flip)
.setDepth(2)
}
// Rear skirting and front floor edge run the whole stage. // Rear skirting and front floor edge run the whole stage.
this.add.image(worldWidth / 2, floorTop, 'architecture-skirting') this.add.image(worldWidth / 2, floorTop, 'architecture-skirting')
@ -1531,10 +1545,14 @@ class RoomScene extends PlayableLevelScene {
.setDisplaySize(worldWidth, 32) .setDisplaySize(worldWidth, 32)
.setDepth(6) .setDepth(6)
// Break the long room into visible bays without blocking movement. // Architectural joins hide the panel boundaries and make the long level
graphics.lineStyle(5, 0xd7b4c6, 0.42) // read as three connected dollhouse bays rather than repeated tiles.
for (let x = 720; x < worldWidth; x += 720) { for (let x = bayWidth; x < worldWidth; x += bayWidth) {
graphics.lineBetween(x, wallTop + 20, x, floorTop - 10) graphics.fillStyle(0xfff6f0, 1)
graphics.fillRoundedRect(x - 13, wallTop, 26, floorBottom - wallTop, 8)
graphics.lineStyle(4, 0xd7b4c6, 0.9)
graphics.lineBetween(x, wallTop + 8, x, floorBottom - 8)
} }
// Left/right end caps. // Left/right end caps.
@ -1648,7 +1666,7 @@ const game = new Phaser.Game({
}) })
window.__DOLLHOUSE__ = { window.__DOLLHOUSE__ = {
version: '0.12.2', version: '0.12.3',
game, game,
async resetAll() { async resetAll() {
await clearGameState() await clearGameState()