0 votes

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

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

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.

asked Jul 24, 2019 in Engine by GodotUser (95 points)
edited Jul 24, 2019 by GodotUser

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))
answered Apr 9 by 1shevelov (76 points)
selected Apr 10 by GodotUser
+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.

answered Jul 26, 2019 by Calinou (6,336 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 How to use this Q&A? before posting your first questions.