Border Adjustments

This commit is contained in:
Brian Fertig 2026-03-07 10:37:38 -07:00
parent ab56b161fa
commit 5cc512d20c
5 changed files with 27 additions and 27 deletions

View File

@ -14,10 +14,10 @@
}, },
"untitled.tmx": { "untitled.tmx": {
"scale": 0.33, "scale": 0.33,
"selectedLayer": 3, "selectedLayer": 0,
"viewCenter": { "viewCenter": {
"x": 60.60606060606062, "x": 1878.7878787878788,
"y": 589.3939393939394 "y": 1004.5454545454545
} }
} }
}, },

View File

@ -8,7 +8,7 @@
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0,
0, 11, 11, 11, 11, 11, 42, 42, 42, 42, 42, 18, 1, 1, 2, 0, 0, 11, 11, 11, 11, 11, 42, 42, 42, 42, 42, 18, 1, 1, 2, 0,
0, 0, 0, 0, 0, 0, 0, 0, 21, 32, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 32, 0, 18, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 21, 32, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 32, 0, 18, 0, 0, 0, 0,
@ -37,12 +37,12 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
18, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 3, 5, 5, 6, 7,
18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 13, 15, 15, 16, 17,
18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 23, 25, 25, 26, 27,
18, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 29, 0, 0, 0, 52, 0, 0, 0, 0, 11, 0, 0, 0,
4, 5, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 4, 5, 5, 5, 6, 7, 0, 0, 0, 0, 11, 0, 0, 0,
14, 15, 14, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 14, 15, 14, 15, 15, 15, 16, 17, 0, 0, 0, 0, 11, 0, 0, 0],
"height":16, "height":16,
"width":16, "width":16,
"x":16, "x":16,
@ -71,9 +71,9 @@
"y":16 "y":16
}, },
{ {
"data":[24, 25, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "data":[24, 25, 24, 25, 25, 25, 26, 27, 3, 4, 5, 6, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,0,0,0,0,0,0,0,0,0,0,0,0,
18,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0, 18,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,
18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 18,0,0,0,0,0,0,0,0,0,52,3,5,5,6,7,
18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 18,0,0,0,0,0,0,0,0,52,0,13,15,15,16,17,
18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 18,0,0,0,0,0,0,0,52,0,0,23,25,25,26,27,
18,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0, 18,0,0,29,0,0,0,52,0,0,0,0,11,0,0,0,
4,5,4,5,6,7,0,0,0,0,0,0,0,0,0,0, 4,5,4,5,5,5,6,7,0,0,0,0,11,0,0,0,
14,15,14,15,16,17,0,0,0,0,0,0,0,0,0,0 14,15,14,15,15,15,16,17,0,0,0,0,11,0,0,0
</chunk> </chunk>
<chunk x="0" y="16" width="16" height="16"> <chunk x="0" y="16" width="16" height="16">
23,24,25,25,25,25,25,25,25,25,25,25,25,25,24,25, 23,24,25,25,25,25,25,25,25,25,25,25,25,25,24,25,
@ -61,9 +61,9 @@
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</chunk> </chunk>
<chunk x="16" y="16" width="16" height="16"> <chunk x="16" y="16" width="16" height="16">
24,25,24,25,26,27,0,0,0,0,0,0,0,0,0,0, 24,25,24,25,25,25,26,27,3,4,5,6,7,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,13,14,15,16,17,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,23,24,25,26,27,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

View File

@ -18,7 +18,7 @@ export default class Player {
// Create physics sprite // Create physics sprite
this._sprite = scene.physics.add.sprite(x, y, 'player', 0); this._sprite = scene.physics.add.sprite(x, y, 'player', 0);
this._sprite.setCollideWorldBounds(false); this._sprite.setCollideWorldBounds(true);
// Body is narrower/shorter than the 128x256 frame to fit the character artwork // Body is narrower/shorter than the 128x256 frame to fit the character artwork
this._sprite.body.setSize(80, 240).setOffset(24, 8); this._sprite.body.setSize(80, 240).setOffset(24, 8);

View File

@ -64,7 +64,7 @@ export default class Level1Scene extends Phaser.Scene {
} }
layer.startx = minX; layer.startx = minX;
layer.starty = minY; layer.starty = minY;
layer.width = maxX - minX; layer.width = maxX - minX;
layer.height = maxY - minY; layer.height = maxY - minY;
} }
} }
@ -72,7 +72,7 @@ export default class Level1Scene extends Phaser.Scene {
// ------------------------- // -------------------------
// Background image // Background image
// ------------------------- // -------------------------
this.add.image(0, 0, 'level1-bg').setOrigin(0, 0).setDisplaySize(30 * 128, 20 * 128).setScrollFactor(0.3); this.add.image(0, 0, 'level1-bg').setOrigin(0, 0).setDisplaySize(15 * 128, 10 * 128).setScrollFactor(0.1);
const map = this.make.tilemap({ key: 'level1' }); const map = this.make.tilemap({ key: 'level1' });
@ -151,7 +151,7 @@ export default class Level1Scene extends Phaser.Scene {
// ------------------------- // -------------------------
// Camera // Camera
// ------------------------- // -------------------------
const worldW = map.width * map.tileWidth; // 30 * 128 = 3840 const worldW = map.width * map.tileWidth + 256; // 30 * 128 = 3840
const worldH = map.height * map.tileHeight; // 20 * 128 = 2560 const worldH = map.height * map.tileHeight; // 20 * 128 = 2560
this.cameras.main this.cameras.main
.setBounds(0, 0, worldW, worldH) .setBounds(0, 0, worldW, worldH)