Original Post
I'm currently working on a 2d rpg. I'm programming in C++ and using SDL for graphics. Currently I've got a map displayed and a character walking around with no animation. I have the SDL_Surfaces for the map and the character declared global and it works fine. My question is that if I create an object for an object based on my sprite class, would it be a good idea to create a new surface, load the image and all that in the constructor or have them all declared globally. If it's a better idea to create them all in the constructor, how would I go about using that surface(s) elsewhere in my code if I needed to use it, such as the destructor to delete the surface.