Thanks, setting get_window().content_scale_size = DisplayServer.window_get_size() / 3
works! Now I only have to figure out what 3 stands for
And where should I put that? In a _reaay
or a _process
?
I did set the aspect to expand, but when I set the scaling mode to integer instead of fractional it adds the black bars
Creating a pixel art game for mobile
I am experimenting with creating a pixel-art mobile game in Godot. I am having trouble with the viewport size regarding the pixel art assets. I've learned that I should set the scaling mode to integer, which adds black bars to the screen. My plan to get rid of the black bars is as follows:
- Find a way to resize the main viewport dynamically in runtime
- Calculate, based on the device's size, what size the viewport should be
- Apply that calculation when appropriate
Before I even try to get a calculation like that going, I want to make sure I can change the viewport's size in the code, which I couldn't figure out myself. I have tried the following:
- Changing the project settings in a
_ready
function: Does nothing - Changing the project settings in a
_process
function: Does nothing - Setting
get_viewport().size
in a_ready
function: Does nothing - Setting
get_viewport().size
in a_process
function: Changes the size of the viewport, but without expanding it - Setting
get_window().size
in a_ready
function: Does nothing
What else can I try?
Couldn’t figure out how to add my account to the app, and when I tried to give feedback the app launched a website in French (I presume) which said it encountered an error and that I need to sign in.
The problem is that the dongle I am using to connect the deck to my TV doesn't have a USB port
Can I wake up my Steam Deck using my Xbox One controller?
I want to use my deck as a console in my living room, and to do this I need to be able to wake it up from my controller. The closest I've seen someone do it online is here, but it uses the dangle which I don't have. There was also this tutorial on the same post for PS controllers via Bluetooth but it seems messy and tedious (I have to manually enable each device to test whether it is the controller or not). Is there a way to do this or do I have to get up from the couch each time I want to wake my deck up?