Hi there,
I have a couple questions on how to approach an issue I'm having. I have a tilemap that I just designed that draws ~3000 tiles, but slows to a crawl (~35 fps from 200 fps earlier). What I'm doing right now is having a "tile" be represented as a drawable sprite, and in its constructor the sprite is given a pointer to a texture in my resource manager. Because of this, only 1 texture has to be created per type of tile.
Now sf::Sprite is a very lightweight class, but I'm pretty confused as to why it's really bringing down fps, especially since there's an extremely low number of sf::Texture 's being used (Exactly 1, lol).
This brings me to my first question: why is this approach slowing down my program so significantly?
Second question: Would a sf::VertexArray be a much better approach? I'm pretty confused on how to define the vertices because my tile images are not packed into one sprite sheet, they're individual .png files.
Thanks!