I'm a little fuzzy on exactly how the texture atlas works (behind the scenes, that is) and was wondering which solution would be the best to implement:
For example, in your main form you create an Atlas, and you need to create multiple copies of your Actor class (say five to twenty), each of which will have three or four animations which consist of anywhere between four and fourteen frames contained in the Atlas.
My question is, which would be the most efficient (or least memory-impacting) way to accomplish this, or are they effectively the same since we're referencing an Atlas:
Thanks in advance,
- Richard
For example, in your main form you create an Atlas, and you need to create multiple copies of your Actor class (say five to twenty), each of which will have three or four animations which consist of anywhere between four and fourteen frames contained in the Atlas.
My question is, which would be the most efficient (or least memory-impacting) way to accomplish this, or are they effectively the same since we're referencing an Atlas:
- Pass the Atlas to the Actor class when you initialize and let each instance create its own animation textures for its animations, or...
- Create an "AnimationTextures" class that contains all of the textures and pass that to the Actor and have all instances use the same texture list?
Thanks in advance,
- Richard
Last edited: