I made one sprite that is called the "Monster", it has a LOT of animations in it...I see that each animation adds 1mb to memory use..is that good or bad? is there a better way to do this??
How many is a lot? Why would you need tons of animations for a monster? It's up to you, if the memory usage is too high then limit the number of animations.
Develop games in your browser. Powerful, performant & highly capable.
i put all my monster in one sprite like animation1 is for dragon idling, second animation is horse idling, etc.
Each animation adds about 1mb to memory usage
I currently have like 50-60 animations
Right I see, actually that is not a good approach and one I've tried before. You end up with one object containing all the graphics memory. Better to use separate sprite objects for each enemy.
But this project is gonna be an mmo game for browser
You should use separate objects because for example :
You want to spawn a dragon = 60 animations = 60mb
You want to spawn a horse = 60 animations = 60mb
If they are separate you can spawn a dragon with 1mb of memory.
Oh thank you, I will try that :)