Hi,
I’m trying to load about 50 images and spritesheets in preload().
Everything is fine when there is about 20 images and spritesheets, but above that number the sprites are not loading.
What can be the issue? Does it matter if I load first images and the spritesheets?
Here is some of the code:
preload() {
this.load.tilemapTiledJSON('battles', 'assets/battles/hexagonMap3.json');
this.load.image('tiles', 'assets/battles/BattleMap3.png');
this.load.image('archer', 'assets/battles/archer.png');
this.load.spritesheet('archerWalk', 'assets/battles/walk/archerWalk.png', { frameWidth: 41, frameHeight: 60 });
this.load.spritesheet('archerDefence', 'assets/battles/defence/archerDefence.png', { frameWidth: 31, frameHeight: 65 });
this.load.spritesheet('archerShoot', 'assets/battles/shoot/archerShoot.png', { frameWidth: 45, frameHeight: 80 });
this.load.image('axemen', 'assets/battles/axemen.png');
this.load.spritesheet('axemenWalk', 'assets/battles/walk/axemenWalk.png', { frameWidth: 41, frameHeight: 60 });
this.load.spritesheet('axemenDefence', 'assets/battles/defence/axemenDefence.png', { frameWidth: 41, frameHeight: 60 });
this.load.spritesheet('axemenAttack', 'assets/battles/attack/axemenAttack.png', { frameWidth: 41, frameHeight: 60 });
this.load.image('ballista', 'assets/battles/ballista.png');
}