Auto scale dynamically created tileset/sprite texture to tilemap tile size

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Soaku

I’m creating an online game which downloads content (including tiles) from the server and loads them into a tileset.

The server sends one image per texture for a tile. Each texture can have a different size. Currently, some textures span more or less than a single tile which is not what is supposed to happen.

The same goes for sprites: the server sends textures of sprites, which should be scaled to tileset tile size.

I can’t find an option to scale a texture to the tilemap’s tile size. How could I do that?

Notice: I want to keep the game “open”, so anyone can make their own client in any engine, so hard-coded Godot-specific files are not really an option.

I hope someone answers this, I am also trying to do something similar in dynamic TileMap scaling per device resolution and full-screen vs windowed mode and various resolution settings.
I want it to scale with the setting.

GodotUser | 2019-07-24 03:33

I’m also specting this

marcelo | 2020-10-03 17:00