1 decade ago by ShawnSwander
Would it be faster to load entity animation sheets in the preloader as a varriable and set entities to the sheet rather than have a new sheet for each entity?
Essentially is this
before main.init()
then in the enemy entity
faster than this
I'm wanting to initiate up to 200 enemies per level that my database will move around
None of my enemies have animated images each tile represents a different image.
Essentially is this
before main.init()
MyGame = ig.Game.extend({ enemyanimSheet: new ig.AnimationSheet( 'media/mob.png', 60, 60 ), ...
then in the enemy entity
EntityEnemy = ig.Entity.extend({ animSheet: ig.game.enemyanimSheet, ...
faster than this
EntityEnemy = ig.Entity.extend({ animSheet: new ig.AnimationSheet( 'media/mob.png', 60, 60 ), ...
I'm wanting to initiate up to 200 enemies per level that my database will move around
None of my enemies have animated images each tile represents a different image.