Hello.
Currently i am making 2d top down game.
I made a map using sf::VertexArray, each tile in layer 1 is a tile and it cant be blank so sf::VertexArray is perfect.
Now on layer2 its gonna be used to draw (Trees, bush, Rock)
And then i need enemies/npc movable units as Sprites, my reason posting is that i want to get speed = to VertexArray but also save space if possible, what is optimal solution?
Map syntax
sizeOfMapX sizeOfMapY
Layer1:Layer2
At layer 1: 0-Infinite = tile texture ID;
at layer 2: 0 = nothing, 1-infinite = something
example:
{5 5
1:0 1:0 1:1 1:0 1:1
1:0 1:1 1:0 1:1 1:1
1:1 1:1 1:1 1:0 1:1
1:0 1:0 1:1 1:1 1:0
1:0 1:1 1:0 1:1 1:1 }
So the layer 2 can have full screen of layer 2 or absolutely nothing.
To recap:
Layer 1 = sf::VertexArray because the map cant have empty spots so its perfect.
Layer 2 = Making sf::Sprite for each tile?(I am affraid this is gonna take allot off performace when in rocky place where the whole screen is gonna have layer 2 and drawing (32width x24height, 32width x32height tiles proves to drain much when using sf::Sprites)
Layer 3 = sf::Sprite for sure because it needs to be pixel perfect
Current layer 1 image^^