chore: Update LDtk project with new layers and fixed assets dimensions (using sips)

This commit is contained in:
2026-01-14 23:22:59 +01:00
parent 4ef1adc413
commit bc2225ad64
3494 changed files with 49932 additions and 25218 deletions

View File

@@ -256,19 +256,24 @@ class GameScene extends Phaser.Scene {
if (shineIntensity !== undefined || layer.name === 'Water' || layer.name === 'Voda') {
const intensity = shineIntensity !== undefined ? parseFloat(shineIntensity) : 5;
// Validate intensity
// Validate intensity and apply shader safely
if (!isNaN(intensity) && intensity > 0 && createdLayer.postFX) {
console.log(`💧 Applying Shine to layer '${layer.name}' (Intensity: ${intensity})`);
const shine = createdLayer.postFX.addShine(1, 0.2, intensity);
try {
console.log(`💧 Applying Shine to layer '${layer.name}' (Intensity: ${intensity})`);
const shine = createdLayer.postFX.addShine(1, 0.2, intensity);
// Animate shine speed for 'glimmer' effect
this.tweens.add({
targets: shine,
speed: 0.5,
duration: 2000,
yoyo: true,
repeat: -1
});
// Animate shine speed for 'glimmer' effect
this.tweens.add({
targets: shine,
speed: 0.5,
duration: 2000,
yoyo: true,
repeat: -1
});
} catch (shaderError) {
console.warn(`⚠️ PostFX Shine failed for '${layer.name}':`, shaderError);
console.log('→ Falling back to tile animation only (no shader)');
}
}
}
@@ -2806,42 +2811,4 @@ class GameScene extends Phaser.Scene {
});
}
setupGronk() { }
// 🧛‍♂️ GRONK SPAWN METHOD (Advanced Wander AI)
if(this.gronk.aiState === 'IDLE') {
const rand = Math.random();
if (rand < 0.3) { // 30% Vape
this.gronk.aiState = 'VAPE';
this.gronk.anims.play('gronk_vape');
emitVape();
this.gronk.nextDecisionTime = time + 3000;
setTimeout(() => { if (this.gronk && this.gronk.active) this.gronk.aiState = 'IDLE'; }, 2500);
} else { // 70% Wander
const angle = Math.random() * Math.PI * 2;
const dist = 30 + Math.random() * wanderRadius; // Min 30px move
const tx = this.gronk.homePos.x + Math.cos(angle) * dist;
const ty = this.gronk.homePos.y + Math.sin(angle) * dist;
this.gronk.moveTarget = new Phaser.Math.Vector2(tx, ty);
this.physics.moveToObject(this.gronk, this.gronk.moveTarget, moveSpeed);
this.gronk.aiState = 'MOVE';
this.gronk.nextDecisionTime = time + 5000; // Timeout
}
} else if (this.gronk.aiState === 'MOVE') {
const dist = Phaser.Math.Distance.Between(this.gronk.x, this.gronk.y, this.gronk.moveTarget.x, this.gronk.moveTarget.y);
if (dist < 10) {
this.gronk.body.reset(this.gronk.x, this.gronk.y);
this.gronk.aiState = 'IDLE';
this.gronk.nextDecisionTime = time + 1000 + Math.random() * 2000;
} else if (time >= this.gronk.nextDecisionTime) { // Stuck/Timeout
this.gronk.body.reset(this.gronk.x, this.gronk.y);
this.gronk.aiState = 'IDLE';
this.gronk.nextDecisionTime = time + 1000;
}
}
}
});
}
}

View File

@@ -25,15 +25,18 @@ class IntroScene extends Phaser.Scene {
const introPath = 'assets/references/intro_shots/';
// ALL 20 INTRO SHOTS
this.load.image('intro_family_portrait', introPath + 'family_portrait_punk_complete.png');
this.load.image('intro_otac_longboard', introPath + 'otac_longboard_pier.png');
this.load.image('intro_kai_dreads', introPath + 'kai_first_dreads_family.png');
this.load.image('intro_ana_barbershop', introPath + 'ana_barbershop_dreads.png');
this.load.image('intro_birthday_cake', introPath + 'birthday_cake_rd.png');
// DREAMY INTRO ASSETS (Generated)
const dreamyPath = 'assets/images/intro_sequence/';
this.load.image('intro_family_portrait', dreamyPath + 'family_portrait_complete_dreamy.png');
this.load.image('intro_otac_longboard', dreamyPath + 'otac_longboard_pier_dreamy.png');
this.load.image('intro_kai_dreads', dreamyPath + 'kai_first_dreads_family_dreamy.png');
this.load.image('intro_ana_barbershop', dreamyPath + 'ana_barbershop_dreads_dreamy.png');
this.load.image('intro_birthday_cake', dreamyPath + 'birthday_cake_rd_dreamy.png');
this.load.image('intro_virus', introPath + 'virus_xnoir_microscope.png');
this.load.image('intro_chaos', introPath + 'chaos_streets_apocalypse.png');
this.load.image('intro_zombies', introPath + 'zombie_silhouettes_panic.png');
this.load.image('intro_parents_ghosts', introPath + 'parents_transparent_ghosts.png');
this.load.image('intro_chaos', dreamyPath + 'chaos_streets_apocalypse_dreamy.png');
this.load.image('intro_zombies', dreamyPath + 'zombie_silhouettes_panic_dreamy.png');
this.load.image('intro_parents_ghosts', dreamyPath + 'parents_transparent_ghosts_dreamy.png');
this.load.image('intro_ana_taken', introPath + 'ana_taken_military.png');
this.load.image('intro_kai_alone', introPath + 'kai_alone_basement.png');
this.load.image('intro_kai_young', introPath + 'kai_young_timelapse.png');