I’ve done a benchmark, and a brute depth ordering of 1.5 million sprites per frame it’s really too heavy. I see some tweaks to reduce CPU-usage but each one would bring to some limitations:
-I have a 100x150x50 tiles map. I could draw each floor separately and limit the sort toa single floor. But this would forbid sprites taller than a floor (if each floor is rendered over the previous one, the tallest sprites of the lower floor would be cut).
- I could also render only a small portion of the map around the player, but this would make impossible the use of the zoom out.
Moreover in each case I would still have a lot of cpu-side work that would steal resources from the real simulation, so I’d like to delegate as much as possible to the GPU.
Now, since I don’t know anything about OpenGL, I’d like to know if it’s actually possible to do this delegation without giving up the use of flat sprites. I’m only interested in alpha blending for full-transparent parts of the sprites, not for translucent parts.
If it were possible I’d be happy to deal with the lower layer and learn everything about it.
Thanks
EDIT:
I’ve found an answer to the question
here. So if I use z-buffering I have to give up translucency (unless I sort the translucent objects) but I can easily keep full-transparency. I can’t figure out what this will entail in the future development, maybe translucency is very important in 2D graphics