Save all: Fixed blue screen, VibeVoice audio, Tiled setup

This commit is contained in:
2025-12-27 02:11:06 +01:00
parent 6a01731de0
commit 41fc635f3a
8 changed files with 322 additions and 35 deletions

View File

@@ -35,9 +35,16 @@ class PreloadScene extends Phaser.Scene {
// this.load.tilemapTiledJSON('farm_map', 'assets/maps/farm_map.json');
// this.load.tilemapTiledJSON('micro_farm_128x128', 'assets/maps/micro_farm_128x128.json'); // 🌾 Testna farma
// this.load.tilemapTiledJSON('micro_farm_8x8', 'assets/maps/micro_farm_8x8.json'); // 🏕️ Manjša test mapa
this.load.image('grass_tileset_img', 'assets/tilesets/grass.png');
this.load.image('water_tileset_img', 'assets/tilesets/water.png');
this.load.image('decorations_tileset_img', 'assets/tilesets/decorations.png');
// 🗺️ TILED MAP (User's NovaFarma)
this.load.tilemapTiledJSON('NovaFarma', 'assets/maps/NovaFarma.json');
// 🎨 TILED TILESETS (Manual Loading)
const kzPath = 'assets/narezano_in_majhno/krvava_zetev_sprites/';
this.load.image('tileset_01_Ground', kzPath + 'grass_soil_tileset_1766171156780_obdelan.png');
this.load.image('tileset_02_Obstacles', kzPath + 'farm_obstacles_1766171194583_obdelan.png');
this.load.image('tileset_03_Fences', kzPath + 'fence_tileset_1766171177275_obdelan.png');
this.load.image('tileset_04_Buildings', kzPath + 'town_buildings_pack_1766099810580_obdelan.png');
this.load.image('tileset_05_Tools_Items', kzPath + 'tools_items_pack_tiled_1766099926620_obdelan.png');
// New asset packs
this.load.image('objects_pack', 'assets/objects_pack.png');
@@ -771,8 +778,8 @@ class PreloadScene extends Phaser.Scene {
// ✅ Starting main menu (StoryScene)
this.time.delayedCall(500, () => {
console.log('🎮 Starting StoryScene (Main Menu)...');
this.scene.start('StoryScene'); // ← MAIN MENU
console.log('🎮 Starting TiledTestScene (NovaFarma Test)...');
this.scene.start('TiledTestScene'); // ← Direct jump to Tiled Test
});
}

View File

@@ -14,8 +14,8 @@ class TiledTestScene extends Phaser.Scene {
// Try to load the tilemap
try {
// Load the micro farm tilemap
this.map = this.make.tilemap({ key: 'micro_farm_128x128' });
// Load the USER'S NovaFarma tilemap
this.map = this.make.tilemap({ key: 'NovaFarma' });
console.log(`📐 Map size: ${this.map.width}x${this.map.height} tiles`);
console.log(`📐 Tile size: ${this.map.tileWidth}x${this.map.tileHeight}px`);
console.log(`📐 Map dimensions: ${this.map.widthInPixels}x${this.map.heightInPixels}px`);
@@ -33,7 +33,6 @@ class TiledTestScene extends Phaser.Scene {
});
// Add tilesets - mora biti enako kot v .tmx!
// BELEŽKA: Ta imena morajo biti enaka kot v micro_farm_128x128.tmx
const tilesets = {};
// Poskusi dodati tilesets
@@ -81,11 +80,8 @@ class TiledTestScene extends Phaser.Scene {
this.cameras.main.setBounds(0, 0, mapWidth, mapHeight);
// Zoom out to see the whole 128x128 map
// 128 tiles * 48px = 6144px
// Typical screen is ~1920x1080
// Zoom = 1920 / 6144 ≈ 0.3 (adjust for comfort)
const zoomLevel = 0.4;
// Zoom IN for small 8x8 map
const zoomLevel = 2.0;
this.cameras.main.setZoom(zoomLevel);
console.log(`📷 Camera zoom set to ${zoomLevel}`);