Hello.
I have been using SFML while developing a game I have been designing for a long time. I'm still "relatively" new to programming (C++ for about 2 years) so I have several questions with my plans. I should give a bit of background before going straight to the graphics part, because maybe the graphics idea is good but the design concept isn't. More likely, they're both bad.
Here is the design concept:
Have a vector of GameEntities.
Each GameEntity has a draw function.
Every frame, go through the vector and draw them on screen at some location.
A player has "control" over one of those entities in the form of a pointer that points at one of the objects, so when he presses a key, it iterates the GameEntities position by a certain amount (movement). Similar things for the rest of things this GameEntity will be able to do.
HERE IS THE GRAPHICS PART:
The class GameEntity has a myTexture pointer variable that dictates what the GameEntity looks like in game. I was originally going to have a different texture for each animation sequence loaded into an array inside the GameEntity when the game loads. So when an event caused it to change its animation, a function would change what the myTexture pointer is pointing to in the array. But I don't want to go coding anything that is going to be garbage and inefficient. How should I go about this? This game isn't going to be super CPU intensive so I don't need the ABSOLUTE best method, but will this work well enough?
Thanks.