Hello.
2d top down 4sidescroller(i don't know how to describe going up and down) game.
I will jump strait to the point because am having trouble getting this true.
What i am making is unit, that is linked with VertexArray.
My goal is not to use sf::Sprite and to get great performance, therefore i was thinking of code going like this.
class Unit : BehaviorInhertiance
{
public:
//Witch vertices is this unit in VertexArray
int StartingVertice;//Position in vertex array that the sprite starts
};
The issue starts when i look what is gonna happen in the game.
I am gonna have units die, units get spawned(created).
That means removing or adding elements or keeping track or elements that are free and when adding new unit populate the free elements instead of adding new ones, the issues with this aproach is that i am thinking about boss battles and at some times i will need to create about 50 units that are gonna be just dummy units. But they need position and textures.
Resizing the array will probably be ok if i dont use references, but using int and storing vertex position is kinda not the thing id like to do.
So any suggestions you would like to pass, what should i so considering the design i am wanting.