Size of tiles/sprites theoretical and practical questions

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

I first start with some theoretical questions:

In order to make a game (imagine game with a map and characters on it), should the tile and the sprites’s have a size fixed in pixels or should depend on the size of the screen?

And, in pratice, is the size (who wouldnt change during the run) set in the editor or in a script file? In the Editor, I saw that tiles’s size can only be set in pixel, so, if I want it to depend on the screen size, I should write it in the code? Same for the sprites except that I didn’t see any field for the size, only the scale, but how is it practical? As it would require to know the size of the image.

Finally, with which portion of code can I get/set the size? So far, I’ve tried something like

$AnimatedSprite.texture.get_size()

but texture is not defined.

EDIT : after more research, I found that if I had a sprite I could use the code above, but what if I have an animated sprite? Modifying each frame of the animation doesn’t seem to be a good solution.

Up? By the way, what happens if nobody answers a question? How can I “refresh” question?

x4rkz | 2019-09-21 11:29