Time ago I tried your engine with a million tiles. I was impressed with FPS because doesn't care at all with map size. But, when I tried to zoom in/out it takes too long.
I thought that as tile tilemap is a renderable, the transformations, such scale, could be "global" and no need for per-tile. But, as zoom is slow, seems that it's applied to all tiles. Maybe I'm wrong and not doing it right.
BTW. I'm sad reading that you need to pause this project for a while.
Just take your tile example, increase map size to 1000x1000 and zoom in/out with x/z
After new_scale is changed, in transformable_api.h, transformation_update() is called and applies scale to all tiles and takes some time because there are one million tiles! Is it possible to override set_scale on tile_map (node_map, etc) and keep the transformation as a absolute_transformation or similar?
I don't know about the solution yet but I will figure something up. perhaps what you offered or maybe something more sophisticated (and by more sophisticated I'm talking about a more efficient "need-update" mechanism for all entities, not just tilesmap .
is this a real issue holding you back or just a problem you encountered?
Nooo, don't worry. It's something I figure out and tried. Not a real problem.
Can I ask you why you don't like to use absolute_transformation for scaling? I saw this variable member in tilemap.h and there is no way to modify it, but you use it when calculating transformations.
Another transformations, like blending and color/opacity could benefit with absolute_transformation. I was thinking with a way to change world color to simulate light modulation up to day/night. Maybe there's another way to do that. But this is another question
absolute_transformation is a struct most entities and nodes have, its just a cache of their current transformations including their parent's transformations. just like the node have it, the tiles have it, and the tiles absolute transformations are actually the tile transformation * the tilesmap transformations (i.e. the tile trans * its parent trans). hope it was clear lol.
anyway the problem you raised is relevant to any node containing millions of entities and thus needs to be fixed I already have a general idea I hope I'll come around to implement it soon. if my explanation wasn't clear feel free to ask.
Ok Ness, thanyou very much. As said other times, I'm not in hurry. Just testing diferents engines, APIs, etc. for learning while developing a game. So, don't worry about me.
I must say that I don't like and I won't use big map size. I don't like to mix logic with rendering. So, my idea is to use a "enough to fit screen" time_map size that will move it's sprites to new tileID (tileType) and position following camera position. That way, real map size can be as big as I want, can has any shape (not just a square). Well, maybe I'm completly wrong...