Hey everyone,
this is maybe rather a design problem than a "technical" problem, yet still, I think I lack some technical knowledge about how to deal with it:
Imagine a 200*200 tilemap with 100px*100px tiles. We can do that, probably in a single draw call (even though splitting it up might be helpful?). But that part is not the problem. Now assume that - in the worst case - each tile has an Entity occupying it with its own sprite (or maybe 2-3 Sprites, if they have additional icons displaying their status). Thats 200*200*2 = 80.000 Render Calls. That's a lot. Probably not gonna happen.
So, how to solve? Do I only use a sprite array of screenSize/100 sprites and panning over the map reloads the sprites of different entities into the array? So basically I dont move the view over the tiles, but instead move the index or range of entities for which the sprites should be shown right now.
Or should I just make it 2 giga-large vertex arrays, one for the map and one for all the entity sprites? They might be overlapping though, there's no useful way to quickly generate overlapping textures for tile maps, right?
Also: Given that there could be about 1000 different entity sprites each 80px by 150px, there's not way but to atlas them, is there?