I’m working on a 2D “sort-of-game, more-like-a-test” and wanted some ideas on this one thing.
The way I figure, I could very easily and likely have more than one of the same “sprite” onscreen at once. I was thinking of storing all of a sprite’s textures (after loading them) inside the sprite’s class, then call for that address when I need it. If I did this, then I think it would be more efficient to just reuse the same textures over, rather than reload the exact same image. The problem is, I’m not sure how to do this.
I was thinking of having one “queen” type object that would hold the actual textures and stuff, and then it could spawn off the real sprite objects as needed. Can someone help me figure out an implementation for this?
It seems like a lot to actually make a special queen class for every enemy or what-not in the game, but would that be the best way?
