Hi. I have a problem with tilemaps, viewport and performance.
rect2 means in context of
Viewport? Is it position and size relative to parent node, or to what is visible in viewport (and if so, in wich coords, global, local, canvaslayer)? What's this?
- Can Viewport.rect2.pos be set to negative value?
set_size_override() set's Rect2, why both
How to set viewport to render needed
Rect2 relative to childrens? I need get an
get_screen_capture()) of given properties. I think I should use Camera2D like:
and use canvas transform, but I can't figure how to do that. Or just use Viewport's canvas transform?
My full situation:
I have few (currently 5)
TileMap's, 32px^2 per tile. I set them to scale = Vector2(2,2).
For map size of 100x100 tiles AND zoom out (to see full map) I have 20 fps. When zoom in, I don't have any performance issues.
Now I have something like this:
--other nodes, UI
I want to update full map every turn, pause, etc (works, c. 850-1000msec), and in runtime by chunk (probably 30-150msec, not sure). I draw on customSprite
LargeTexture where first piece is full map, next are chunks (not VRAM good solution (c. 200MB)). That part is ok (100msec isn't bad) but in my algorithm i need iterate on part of catched image (one row of pixels) to see if all tilemaps are ready. I just set example tile on (-1,-1),(-2,-1) etc. When I update
Viewport and check
!Viewport.get_screen_capture.empty() i can't get changes e.g added entitie to tilemap), because some tilemap updates before other.
I try use
set_rect() but, as I see it don't works as expected...
Hope someone can help me. Thanks in advance.