Тёмный

Getting Started with Screen Sizes in Godot 3 

GDQuest
Подписаться 268 тыс.
Просмотров 92 тыс.
50% 1

Make your Godot 3 game adapt to different screen sizes with this tutorial! It's Guilherme's first video on the channel.
He made a Godot course for beginners on Udemy: bit.ly/guis-god...
----
LINKS
Godot 3 project on GitHub: bit.ly/screen-s...
Godot 3 course: gdquest.mavens...
This video is supported by:
Gamblify: www.gamblify.com/
Pineapple Works: pineapple.works/
Echo86: www.echo86.com/
Subscribe for more tutorials! ru-vid.com...
Twitter ► / nathangdquest
Instagram ► / prepare
This video is licensed under the CC-By 4.0 license: creativecommon...
You can attribute it to "GDQuest and contributors - www.gdquest.com/"

Опубликовано:

 

20 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 77   
@Gdquest
@Gdquest 6 лет назад
It's Guilherme's first time on the channel. What do you think? He's really open to feedback so he'll be glad to see your replies. And please ask any questions you may have about this topic! He also has a Godot course on Udemy, made for beginners: bit.ly/guis-godot-course Regarding screen sizes now. For one it's an issue we all face as game developers as not only mobile, but computer and TV displays come in different shapes and sizes. Your game and UI doesn't need to scale in realtime like a responsive website, but it does need to adapt to different screens. This means that different players will have a slightly different view of the game. It's important to keep in mind when you create cut-scenes or design challenges as someone with a wider screen might see something they shouldn't. If you're looking for a rule of thumb to pick the right project settings, you can give the 2d mode and expand aspect ratio a try. Expand will smartly expand on the axis that stretches past the game's base aspect ratio. The one that goes with its resolution.
@SilenceStabber
@SilenceStabber 6 лет назад
goooood
@lukostello
@lukostello 4 года назад
I'm so glad I watched this, I might not have ever looked in the project settings and tried to effectively implement the 2d stretch mode using code for my control nodes
@evanhardin
@evanhardin 6 лет назад
This video was super useful. Thanks!
@eduardosanchezbarrios5810
@eduardosanchezbarrios5810 6 лет назад
I agree
@AntonioMarcodaSilva_antomarsi
@AntonioMarcodaSilva_antomarsi 6 лет назад
Wow, a Brazilian, nice
@SaladinoPrince1
@SaladinoPrince1 5 лет назад
iiieeeeiii
@IgorogI1000
@IgorogI1000 4 года назад
hihih é nois
@wuubixz
@wuubixz 4 года назад
Ihu
@thiagooliveira7935
@thiagooliveira7935 3 года назад
i think all of them in this channel are ...
@guustavols
@guustavols 3 года назад
@@IgorogI1000 kkkkkkkkkkkkkkkkkk
@Bright-Fall
@Bright-Fall 9 месяцев назад
BRAVO! I am so happy this fixed my games fullscreen issue you are a hero of the people gentlemen
@laurencebannister
@laurencebannister 6 лет назад
Thank you so much for this. Loved it!
@Sfr047
@Sfr047 Год назад
I thought about how to do it for 3 days and you helped me even though this video is old, but it helped me thanks! :)
@nomoremuda
@nomoremuda 2 года назад
Best explanation of this I’ve seen
@user-mk6lc2tv8u
@user-mk6lc2tv8u 8 дней назад
thank you this fixed all my problems (i'm a beginner)
@Blodyx_
@Blodyx_ 2 года назад
This is exactly what i needed, thank you!
@GoodCraftingYT
@GoodCraftingYT 4 года назад
THANK YOU SO MUCH!!! YOU HAVE NO IDEA HOW MUCH YOU HELPED ME!
@business2024-c9m
@business2024-c9m 5 месяцев назад
Thank you so much..this video was really helpful
@antanaspaskauskas9432
@antanaspaskauskas9432 6 лет назад
Do you know what does option Shrink actually do? Does it reduce internal / rendered resolution or output displayed resolution?
@dheatlyblaze2846
@dheatlyblaze2846 Год назад
This is very helpful! Thank you!
@Lu_Ciel.
@Lu_Ciel. 4 года назад
Hello. Is it possible to force Godot to only scale the window based on integer steps? eg: i have a window with width = 480 pixels, so, the next allowed size is width = 960 pixels? Thank you
@Rin-qj7zt
@Rin-qj7zt 2 года назад
i don't understand. my game isn't doing this. it's squishing and squashing text into unreadability when scaled. buttons become unreasonably thin, and i can't figure out how to force them to remain constant like your buttons do.
@zanyman
@zanyman 3 года назад
THANKS FOR SOLVING MY PROBLEM
@helkat9876
@helkat9876 5 лет назад
i have a question, i am making a game that allows player to turn on full screen mode, but it should allow to turn it off too. and here is the problem , i can't write a code that turns off full screen, can u help me?
@dynomitediamond6296
@dynomitediamond6296 4 года назад
Running "OS.window_fullscreen = !OS.window_fullscreen" allows you to toggle fullscreen. To turn it off, try OS.window_fullscreen = false
@Chevifier
@Chevifier 3 года назад
Best bet is to target 16:9. Aspect ratio and set it to keep
@bucherregaldomi9084
@bucherregaldomi9084 2 года назад
sixteenine noice
@tonywithani
@tonywithani 5 лет назад
Nice tut. Really helpful.
@brucelee7782
@brucelee7782 9 месяцев назад
Should we just design in a 1920x1080 window size so that it looks good for smaller screen sizes? There's too many options it's confusing
@user-js7ud9du2y
@user-js7ud9du2y 2 года назад
unity lacks this black bar feature. though i think the resizable screen should have draggable corners instead
@kolts2026
@kolts2026 Год назад
thanks it worked
@fernandev7879
@fernandev7879 2 года назад
top guilhermão!
@raventhorX
@raventhorX 6 лет назад
But what if you wanted to adjust the viewport size? I am using a tilemap and everything looks to small for what I want it to be for my start screen, however I can't adjust the size of everything in one go and would have to go back through the tilemap to re adjust it's size, a simple fix to this for me is zooming the view in a bit to make everything appear bigger and the only way I can think of to do this is to reduce the size of the viewport but idk how.
@Arkl1te
@Arkl1te 3 года назад
Note to myself: Mode -> 2d Aspect -> keep
@thomaswmedeiros9906
@thomaswmedeiros9906 2 года назад
Omg, thank you so much
3 года назад
thanks
@jrumiak
@jrumiak 6 лет назад
Sadly I must say that I'm a bit disappointed... A couple of points to work on: - Slow down. Please :) - Do not show only the API. It's meant as a tutorial. Tell me more about why and when I should use it. - Switching to Viewport makes things more pixelated... alright... but why? Please explain. It's described better even in original docs: docs.godotengine.org/en/3.0/tutorials/viewports/multiple_resolutions.html#doc-multiple-resolutions - Stretch modes - more or less the same as above. Slow down, explain, add meaningful examples. - Expand mode - if something is "tricky" to use, this is probably the part you should focus on more instead of rushing thrue it. Also don't say "you don't know what is going to happen". You are making this video exactly for this propose - to tell me what is going to happen. Again, it is described in the docs. - What happened to "Shrink" option? Why it's left out? Overall: Good start. Keep up good work but there is still room for improvement. Take a look at this: ru-vid.com/group/PLXkVsacazW2qvdnKNzgBLkUwlgi3FU-VO
@Gdquest
@Gdquest 6 лет назад
Agreed, thanks much for the constructive feedback! I gave a lot to Guilherme already, sent him your comment as well. He has a great attitude so you should see his content improve quickly :)
@joeyallard
@joeyallard 6 лет назад
Very helpful video! Thank you :)
@thecringeybatboy491
@thecringeybatboy491 3 года назад
thx this helped alot
@MrTomas7777
@MrTomas7777 4 года назад
What if I want "expand" aspect mode but expanding to both sides instead of anchoring the viewport to top-left?
@PROJECTJoza100
@PROJECTJoza100 4 года назад
This is exactly what i need and ive been looking for it for hours... Have you found the solution to share?
@MrTomas7777
@MrTomas7777 4 года назад
PROJECT: Joza100 Nope... :/
@PROJECTJoza100
@PROJECTJoza100 4 года назад
@@MrTomas7777 i figured it out. I posed on reddit but then fogured it out and the solution is in the comments. www.reddit.com/r/godot/comments/f39u4w/how_to_use_keep_height_and_show_more_of_left_and/?
@MrTomas7777
@MrTomas7777 4 года назад
Oh nice, thanks 👍
@muhammedemiraysan
@muhammedemiraysan 3 года назад
thx bro
@Zen-rw2fz
@Zen-rw2fz 5 лет назад
you two are different persons? I thought you were just nathan with a younger voice in your older videos
@doniyorkoshimbetov3729
@doniyorkoshimbetov3729 4 года назад
I cant see the difference between 2d and viewport. Can anybody explain, pleasae
@IndividualFreedomNet
@IndividualFreedomNet 4 года назад
It confused me too in the beginning and it is not very well explained here. Both deal differently with the original resolution as defined in the project settings in relation to the resolution of the game running on the actual device. For my explanation let's assume you define a base resolution of 960 x 640 in the project settings (the native resolution of an iPhone 4S for example). Then you run it on that iPhone 4S, a Samsung S7 at 2560 x 1440 and on a PC/Mac desktop running at fullscreen in full HD 1920 x 1080. Let's also assume the game is a 2D game and mainly has several 2D graphics displaying sprites and such, but also draws a HUD on top of it with text and some "vector graphics" like diagonal lines. Now what happens is as follows: "Viewport" renders the game internally at exactly the resolution which you define in the settings (for everything: graphics, text and vector drawing) and then stretches the result to the target resolutions. On the 4S it will look exactly as designed in all aspects (no stretching happens). Both on the S7 and on the desktop versions the 960 x 640 will be scaled up to 2560 x 1440 and 1920 x 1080 respectively. Everything will look scaled up equally, the graphics will probably look good, but the text and vector drawings will probably look a bit uglier than they could and blurry along the edges. "2D" on the other hand, renders your game at the target resolution of the device internally - and NOT what you set in the project settings (but the aspect ratio will be kept if you chose the according setting). So for the 4S there will be no difference at all to "Viewport" - every single pixel will be identical. But for the other devices it renders into a much larger viewport: 2560 x 1440 for the S7 and 1920 x 1080 for the desktop versions. The scaled up sprites and background graphics will probably look the same like with "Viewport", but the text and vector graphics output will be drawn at the higher resolution directly and look much sharper and less blurry with "2D". The larger the difference between the base resolution and the target resolution is, the more you will see the difference. In conclusion, generally "2D" is the better choice for most use cases as the result of graphics/sprites are pretty much the same in both cases, but text and vector drawings look a lot better with "2D". But "2D" also needs more performance to be drawn, so "Viewport" sometimes might be a performance related choice. If you have a "pixel look" game (which you want to use for text/drawing too), you might prefer "Viewport" for aesthetic reasons. PS: Note that if a target device has a smaller resolution than what you define in the project settings, "Viewport" will need more performance and actually scale down. "2D" on the other hand will draw to that smaller resolution directly. (But this is probably a rare case unless you design your game in a kind of "middle resolution"...) Probably my explanation would have been more precise (but also more confusing) if I chose a "middle resolution" (full HD) as the base and made an example with a smaller (4S) and one with a larger resolution (S7). But I hope you get this idea... :-)
@doniyorkoshimbetov3729
@doniyorkoshimbetov3729 4 года назад
@@IndividualFreedomNet Thank you a lot. Now I understand
@auto-fav8969
@auto-fav8969 2 года назад
thanks great
@mamaeluigi2532
@mamaeluigi2532 4 года назад
BRASIL CAMPEÃO DO MUNDO!
@cyberground.
@cyberground. 6 лет назад
Thanks, that help me for a GameJam ;)
@bitmammothOG
@bitmammothOG 4 года назад
Thank You :)
@ТигранЕпремян-й4с
@ТигранЕпремян-й4с 3 года назад
what code in TouchBu..??
@dredan88
@dredan88 Год назад
BRASIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIILLLLLLL
@matthewnewsom5225
@matthewnewsom5225 6 лет назад
So I want to create a 64x64 pixel game, so that's the widht/height set in project setttings. But that means the game window is hellllla small. I can enable stretching so the user can make it bigger, but how can I actually set the default window size to something bigger than 64 pixels?
@Gdquest
@Gdquest 6 лет назад
There should be some function in the OS class. Also for testing check the 'test resolution' project settings
@channelnumber52
@channelnumber52 6 лет назад
You don't want a 64 x 64 pixel game. You want to create a screen with a height and width of 64 units. Each unit will be multiple pixels. I'm much more familiar with how to do this in LibGDX, not Godot, so I can't tell you how to achieve this. Try creating a tilemap that is 64 by 64, and then configure your camera to fit that tilemap on screen properly, then boom, you've got your camera set to a 64x64 world.
@oito20
@oito20 6 лет назад
Eu queria que a godot tivesse uma comunidade brasileira como tem a unity. Vejo que muita gente tá passando a usar ela, porém é muito mais difícil tirar dúvidas.
@somarandtheastronautape6518
@somarandtheastronautape6518 5 лет назад
Sei que posso parecer ignorante, mas inglês no mundo de desenvolvimento de jogos é o mínimo que você pode aprender. Depois, o Discord do Godot é extremamente útil, tem diversas pessoas lá, inclusive o próprio GDquest está sempre lá tirando a dúvida de todos. Desde que comecei a usar o Godot(e sou muito amador ainda) tiro todas as minhas dúvidas lá. E já estou próximo de terminar meu primeiro projeto.
@shinobiinu6920
@shinobiinu6920 5 лет назад
Hello! Does this method make games also mobile optimized automatically?
@tuxuni2587
@tuxuni2587 5 лет назад
Theoretically yes, it does.
@marcelogamer2156
@marcelogamer2156 4 года назад
Eaí Guilherme! Bora Brasil!!!
@rsensato
@rsensato 6 лет назад
Massa!
@Hana_UwU
@Hana_UwU 3 года назад
nice
@peeleandro
@peeleandro 3 года назад
Brasileiro ?????? TOP
@twl148
@twl148 5 лет назад
thank you kanYE
@srlilith7167
@srlilith7167 3 года назад
ta na cara que é BR kkkk, mas ótimo vídeo, vlw adorei seu inglês
@forhadrh
@forhadrh 3 года назад
👍
@WolfsDenShop
@WolfsDenShop 4 года назад
You have to slow down a little, you're like a 'Machine Gun.' Your accent's nice, so don't worry about that.
@kramgamedev995
@kramgamedev995 5 лет назад
seria interessante se houvesse pelo menos uma legenda em pt parabens pelo video
@KidoKatsuragi
@KidoKatsuragi 4 года назад
Video was useless. Nothing more than overview of settings without any real use cases.
Далее
Godot Recipes: Animation States
10:31
Просмотров 106 тыс.
I Made the Same Game in 8 Engines
12:34
Просмотров 4,1 млн
The REAL Truth Behind the DVD Logo
01:00
Просмотров 29 млн
Шок-контент! 😱
00:50
Просмотров 1,3 млн
Кольцо Всевластия от Samsung
01:00
Просмотров 180 тыс.
Godot 4: Switching Levels Made Easy
15:59
Просмотров 22 тыс.
Why you Draw Bad Assets || 2D Game Art
13:00
Просмотров 76 тыс.
Picking a Game Resolution
6:22
Просмотров 26 тыс.
6 Tips to Better Organize your Godot Projects
11:39
Просмотров 135 тыс.
How to Code a Pause in Godot (tutorial)
7:44
Просмотров 50 тыс.
How Persona Combines 2D and 3D Graphics
22:45
Просмотров 357 тыс.
Godot 3.0: 2D Visibility with Ray-casting
22:22
Просмотров 71 тыс.
I Made My First Game in Godot in 3 Weeks...
26:21
Просмотров 396 тыс.
The REAL Truth Behind the DVD Logo
01:00
Просмотров 29 млн