The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+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 (335 points)

1 Answer

+1 vote

would it be possible to place the game into a viewport like this?
root node (control set to full rect)
|-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 (29 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.