Getting Started with Screen Sizes in Godot 3

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this video is the first one on the channel by dalire Mei is a guru tutor a game developer a young engineer and he's really serious about providing very good quality you can see that to the source code the demo that he made for this tutorial we're starting with a simple tutorial about how to work with different screen sizes in Godot please welcome him hello everyone I know that my voice sounds a little bit different and that is because I'm not actually Natan my name is Gilly I mean you can also call me G if that's easier and you can expect to see me here on different videos on the channel this one we are going to learn how to prepare our game and configure it to work with different screen resolutions now that can affect your gameplay if you don't do it correctly if I play this game you'll notice that we have a really small screen it's 640 by 480 which gives us an aspect ratio of 4 by 3 and the main purpose of the game is to try to avoid these green Goblin's by using the buttons on the screen right now if I try to click on the maximize button here you notice that everything is going to go to the top left of our game screen and our buttons will keep the same places that they were before but everything looks weird we don't have the same that we had before we can also see where the enemies are spawning so the player is seeing more than he actually needs to see and more than we actually want him to see and that is because we never told the engine how to deal with screen or different screen resolutions and to do that I have to go to the project settings go to the bottom until you find a display and select the window and here on the bottom you'll see that on the stretch the mode is disabled and we can select 2d or viewport here if we select 2d the aim when we resize it is going to be rendered on a different resolution but if we select the viewport the resolution is basically going to be the same but is just going to be bigger imagine this as if you had a really small picture and you started to zoom into it that's basically the same effect for now I'm going to like 2d and keep the aspect as ignore and I'm going to plating him and maximize it so you can see what this gives us now as you can see because I'm playing this game on a sixteen by nine monitor widescreen monitor everything is wider that is because we are ignoring the aspect of our game now also I want you to play attention here to the buttons you can see that we don't have anything pixelated but if I go back to the headings and instead of using 2d I decide to use viewport we're going to get the fact that I told you before which was zooming into a small picture if I maximize the game again everything is pixelated so this is basically the difference that we have from 2d to viewport and it's up to you to decide which one works best for your game now if I decide to keep the aspect ratio of our game so if I decide to keep this four by three aspect video I'm also going to change the mode to beauty again the engine is going to keep the four by three aspect ratio doesn't matter in which resolution or which aspect video we are playing our game in and it's going to add black borders to the top and bottom are to left and right depending on the size of our monitor and the size of the screen of the game is being played at right now if instead of using keep I decide to use keep with what's gonna happen is that we'll be able to see more on the vertical axis of our game it's always gonna try to keep the same width that we had when we begin a game and if instead of using keep with we decided to keep the height what's gonna happen is the opposite so we're going to get more resolution on the horizontal pane here we'll be able to see more of the game from the x-axis and depending on the type of game that you have this is going to give an advantage for some players doesn't matter which one you choose for instance here in this game here I can see where the enemy is being found and this gives me more time to respond to this and if I was not using a bigger resolution or a wider resolution I wouldn't be able to see that enemies coming from the right so easily so I would have less time to react to these events and to finish everything the last option that you have is to use instead of keep height or keep width and choose expand and is going to try to keep the same aspect video that we had before but it's going to add more screen either vertically or horizontally as you can see right here so this can lead to some really unexpected behavior right now I can see more of the right of the game but if you had a monitor that it was in widescreen and was actually taller you'd be able to see more of the bottom of the game so you don't really know what's gonna happen when you hand this to a different screen so a little little tricky to use but again this all depends on the type of game that you have and if it's going to really give you a big impact on how it's going to be played so I always keep this in mind sometimes you're giving the player the option to see more of some parts of the game and this can again give some advantages to some of them and some disadvantages for some of the players as well and that's the thing that you should keep in mind when you're dealing with different screen sizes is how your UI elements are going to be set up the touch buttons right here are anchored to the bottom of our game that's why when we played it and we maximized it the game window everything kind of took the same place that it was before but if I change this and I can select all of them here using this touch button the scene and click on the layout go to the anchors only and I decide to anchor them to the center top of our screen it's basically going to try to always keep the same position by using a calculation from the top here of the screen to the bottom and if I play you notice that now when I increase the size of the game they are going they are not going to go neither to the left or the right and if the game was actually tolerate instead of wider they're going to keep the same place that they were before we can play around with this right here I'm not going to go through all of them but each one of them is going to give you a different configuration for the UI when you resize your game so that's also something to keep in mind when you are dealing with different screen resolutions and that was it for this video if you have any questions please feel free to ask me on the comments section and if you want to play around with this project right here and try things on your own you can go to the video description and you'll find a link for the github repository where you'll be able to download it and run it on your machine thank you so much for watching and I hope to see you guys again soon
Info
Channel: GDQuest
Views: 58,281
Rating: undefined out of 5
Keywords: screen size godot, godot display, godot mobile games, godot tutorial, godot game engine, godot engine, gdquest, responsive game design, game creation
Id: gkY6X-bziHQ
Channel Id: undefined
Length: 7min 7sec (427 seconds)
Published: Wed May 09 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.