0 votes

Objective:
The game is a a pinball-like one (vertical).

Problem:
I made my tileset 64x64 and have a 1080p screen.
The game fits fine in fullscreen mode, but is cut-off in windowed mode.

Question:
Is there a way to scale the screen size down including the tilemap?

Bad things happen if I change the display settings or tilemap properties manually.

in Engine by (93 points)
edited by

Node2D > Scale 0.5 perhaps?

Something like:
get_node("Walls/TileMap").scale(.5, .5)

Any have a code sample?

2 Answers

+1 vote
Best answer

Yes, you can do just like that

$TileMap.apply_scale(Vector2(.5, .5))
by (122 points)
selected by
+1 vote

To make the viewport scale up/down automatically as the resolution changes, configure the project to use the 2d or viewport stretch mode in the Project Settings. You will also probably want to define the stretch aspect to keep or expand. See Multiple resolutions in the documentation for more information.

by (12,893 points)
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 Frequently asked questions and 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 [email protected] with your username.