+1 vote

I have a pixel game for which I want to add ui. But my ui shouldn't be pixelated. I can use styleboxes for that and the UI looks smooth because I use scale mode 2d and not viewport. Now I created a texture as base of my ui. As the UI shouldn't be pixelated the texture has a high resolution. Sadly this won't work with stylebox texture because the outer margins are at 50px and they take exactly that space in the window (which is nearly the complete area). Recreating the texture with StyleBoxFlat isn't an option either because antialiasing levels can only be given in whole numbers, which make the antialiasing to strong on strength 1 because of the low resolution.

Has anyone already created a pixelgame with high reolution ui and knows how to do that?

Godot version 3.3.stable
in Engine by (300 points)

1 Answer

0 votes

would it be possible to place the game into a viewport like this?
root node (control set to full rect)
|-UI
|-viewport container
||-viewport (optionally with own world enabled to make transforms easier)
|||-instance of your game

this would let you give whatever is in the viewport a specific resolution while keeping everything else responsive

by (27 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.
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.