+2 votes

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


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.

in Engine by (36 points)
edited by

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

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.