Update dungeon map to include boss tileset and related logic

- Added boss-tiles.png and boss-tiles.psd files for new boss tileset
- Updated NNDungeon.json to include boss tileset configuration
- Modified main.js to comment out MenuScene and Gulch, keeping NNDungeon
- Updated NNDungeon.js to:
  * Load boss-tiles spritesheet
  * Adjust player starting position
  * Update enemy creation logic to use boss-tiles when gid > 300
  * Added special handling for NNBoss property

These changes prepare the game for implementing boss characters using the new tileset.
This commit is contained in:
Brian Fertig 2025-07-29 16:10:49 -06:00
parent a57c8a0334
commit 6507bda4d1
6 changed files with 64 additions and 10 deletions

View File

@ -781,8 +781,41 @@
"type":"",
"visible":true,
"width":100,
"x":4500,
"y":300
"x":6050.49833041819,
"y":346.500238511687
},
{
"gid":301,
"height":200,
"id":22,
"name":"",
"properties":[
{
"name":"NNBoss",
"type":"bool",
"value":true
},
{
"name":"garbage",
"type":"bool",
"value":true
},
{
"name":"health",
"type":"int",
"value":3
},
{
"name":"patrolY",
"type":"int",
"value":400
}],
"rotation":0,
"type":"",
"visible":true,
"width":200,
"x":4400,
"y":400
}],
"opacity":1,
"type":"objectgroup",
@ -848,7 +881,7 @@
"y":0
}],
"nextlayerid":6,
"nextobjectid":22,
"nextobjectid":23,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.11.2",
@ -1554,6 +1587,19 @@
"tilecount":100,
"tileheight":100,
"tilewidth":100
},
{
"columns":5,
"firstgid":301,
"image":"boss-tiles.png",
"imageheight":1000,
"imagewidth":1000,
"margin":0,
"name":"boss-tiles",
"spacing":0,
"tilecount":25,
"tileheight":200,
"tilewidth":200
}],
"tilewidth":100,
"type":"map",

BIN
assets/boss-tiles.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

BIN
raw/boss-tiles.psd Normal file

Binary file not shown.

View File

@ -21,8 +21,8 @@ const config = {
},
scene: [
MenuScene,
Gulch,
//MenuScene,
//Gulch,
NNDungeon
]
};

View File

@ -29,6 +29,10 @@ export class NNDungeon extends Phaser.Scene {
frameWidth: 100,
frameHeight: 100
});
this.load.spritesheet('boss-tiles', 'assets/boss-tiles.png', {
frameWidth: 100,
frameHeight: 100
});
this.load.spritesheet('99Dungeon-tiles', 'assets/dungeon-tiles.png', {
frameWidth: 100,
frameHeight: 100
@ -58,8 +62,8 @@ export class NNDungeon extends Phaser.Scene {
//const zoneLayer = gulchMap.getObjectLayer('zone');
// Add a player
this.player = new Player(this, 2400, 3450);
//this.player = new Player(this, 3550, 350);
//this.player = new Player(this, 2400, 3450);
this.player = new Player(this, 3550, 350);
this.player.healthBars(true, 1, 3);
// zoneLayer.objects.forEach(object => {
@ -90,7 +94,12 @@ export class NNDungeon extends Phaser.Scene {
runChildUpdate: true
});
enemiesLayer.objects.forEach(object => {
let a99Boy = this.enemies.create(object.x-50, object.y-50, '99boy-tiles', object.gid-201);
let a99Boy;
if (object.gid > 300) {
a99Boy = this.enemies.create(object.x-50, object.y-50, 'boss-tiles', object.gid-301);
} else {
a99Boy = this.enemies.create(object.x-50, object.y-50, '99boy-tiles', object.gid-201);
}
if (object.properties) {
object.properties.forEach(prop => {
if (prop.name === 'patrolX') {
@ -124,7 +133,7 @@ export class NNDungeon extends Phaser.Scene {
a99Boy.bottleReloadVariance = 500;
}
if (prop.name === 'NNBoss' && prop.value === true) {
a99Boy.setScale(2.5);
a99Boy.tiles = 'boss-tiles'
}
if (prop.name === 'health') {
a99Boy.health = prop.value;

View File

@ -69,7 +69,6 @@ export class Gulch extends Phaser.Scene {
runChildUpdate: true
});
enemiesLayer.objects.forEach(object => {
let a99Boy = this.enemies.create(object.x-50, object.y-50, '99boy-tiles', object.gid-101);
if (object.properties) {
object.properties.forEach(prop => {
if (prop.name === 'patrolX') {