Godot - Mobile App Tutorial Part 2 - Project Setup

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone thank you so much for joining my name is Eric and this video is the second part in a tutorial series for creating a mobile app in Godot in the last video I just showed an overview of what the app will look like just the general idea of what we'll be building in this video we're gonna get started with project configuration setting the project size for a mobile device and outlining some of the basic structure for our project I don't know exactly how long these videos will be I'm gonna try to keep them focused on specific features of the app or specific goals so that it will be a little easier for people to navigate in the future when they come back to the videos but the first thing that we need to do no matter what we do in the future is create a new project so I've launched get though engine if you haven't launched it before download it from I think it's either good though I think it's good though engine org I'll put a link in the description your project list may be blank if you pull it up for the first time but I'm just gonna come over to a new project I'm gonna give it a project name I guess we'll call this mobile app tutorial I'm gonna hit create folder it's basically actually I need to find say I have a folder get those projects and then I'm gonna hit create folder it's gonna create a mobile app store a folder within my other projects and then I'm gonna hit create and edit I don't know why it pulls it up on my other monitor so here's the the blank project if you've never seen this before we'll go over some of the highlights I'm actually gonna reorganize some things to my personal preference if you want to do exactly what I do you're welcome to do that if it's easier for you the way it was you can definitely keep that I'm basically just clicking these little ellipses on these different I don't know these different areas of Godot and kind of moving them because I'm not I'm not the biggest fan of the default structure so let's I'm just gonna move I think I think that's how I generally have a set and then I so I basically you know these eight squares are showing you the different I guess you've got four groups on each side of this main editor window so you could have things beside each other if I wanted to put the final system beside the scene and import I could totally do that and expand this out you can do whatever you want I think that's actually pretty powerful that you can move things around the last thing I'm gonna do is I'm gonna hit this these two little white squares here and Italy expand my final system so I get a little bit more information I basically get two views at my file system which i think is it's pretty helpful so the first thing we're gonna do is create a root node every game every project must have a root node that we'll use to actually load the game will have actually I should say every scene will have a root node but our game will have a main scene identified and it must have a root node as well so we'll just hit 2d scene actually that was pretty cool that switched our game to 2d I think it was in 3d to begin with so you can either hit 2d or just create your 2d node I'm gonna go ahead and rename this to game so we have our root node in our root scene now if I save this it's gonna ask us to say that it's going to just use its name that we gave the node TSC in scene we can save that it'll pop up in our file system I'm gonna go ahead and create a couple folders in the way that I usually structure projects just to help us organize things a little bit so if I right click here and then hit new folder we're gonna have a scenes folder we're going to have a scripts folder sprites and I usually throw one in for Klotz just because we'll get to that later but essentially I like to save my dynamic fonts and in some projects there could be many different fonts of different sizes and different actual actual font types and things so I like to have that in a folder instead of having it mixed in with the scripts or seen so we have the game where we saved it kind of in this root folder and we can just drag that into scenes and now it'll be in our scenes folder right here just to keep things a little more organized when you create scripts and scenes it will automatically try to save them either to the root or possibly to the scenes I think if you try to create a script with a scene it'll put it or with a node it'll put it in the scenes folder but we'll look at that later so a few of the things that we need to change we need to make this into a mobile friendly project right now it's just kind of set up in these default width and height it's not really designed to go onto an iOS or Android device so the first thing we're going to do is click on project up here project settings I don't think we're going to have to change too many things the first thing we needed changes under quality under rendering use pixel snap I think that's it for quality some of these things you can change I definitely don't know everything about all of these force Blin / GG eggs I have no idea what in the world well I guess we can read but we'll do that later and then we need to go to display so right now it's on 1024 600 just kind of a random desktop view so we're gonna put width to 576 and then height to 1024 so this is a I think if I remember how I set this up this is a 16 by 9 ratio I think it works well on a lot of devices and we'll do some things that will make sure that even if the ratio is a little bit different that'll be okay they'll still be able to use it I've had some things pop up like that where someone had just an extremely long screen but we'll go through some simulations of what would happen if your ratios like that so this test width and test height is essentially how our game will pop up when we're testing it when we're debugging it if we launch it in the engine it will launch at whatever resolution we've set if we launch it at this resolution I guess it'll take a little bit longer to load which isn't super important to us but one thing that's kind of annoying it is it's just fairly large and annoying to deal with so we're actually gonna set this to half of the half of the actual values so 288 and 512 for the test width and test height and you'll see exactly what that looks like in just a second because we'll be able to launch it very soon there are a few other things ohso orientation we're gonna go ahead and change this from landscape to portrait this won't be important when we're testing it in the engine but it will be important when we actually either export the apk or load a debug apk on an actual device that'll be really helpful because it's just really annoying to see it launch in landscape if we intend it to being in portrait so two other things to change change this mode from disabled to 2d and then aspect change to keep width actually I think that's everything that we need right now from the settings so we can close this out and you actually see that it resized the project resize to that 576 1024 just to see an example of what it looks like when we run the game we're gonna add a child node to the game scene or the game node in our game scene we're just gonna add another 2d another node 2d so we add child node we search for node here's no 2d or add that we're gonna call this background and then under this we're gonna add a color rectangle I'm still trying to work out how in depth I want to go with each node that we use because I think our time will be better spent trying to get through the amp rather than pausing at every single node because there's definitely a lot to go over and then I'll try to point out relevant videos that have to do with these specific nodes as we go through the tutorials I hope that works if it if it doesn't let me know in the comments let me know kind of how much time you want me to spend on everything but I want to make sure that we're not taking hours and hours and hours to get through this app when it's pretty simple I think we're going to be able to knock it out in just a few videos but we've got this background node with a color rectangle you can see it right here we click on this we're gonna go to the inspector for this color rectangle node click on color and then you can change the color whatever you want you can see it changing over there on the the game view I'm just going to make this a little bit darker than white but not really that much so it's got a little bit of color to it but it's nothing special under the control properties of this color rectangle we're going to change the size to equal the size of our project window and that's pretty straightforward so now we've got this 576 by 1024 background and this is what we're gonna draw everything over so you can play around that color if you want I'd encourage you to do that it's gonna be important to make sure that it meshes well with our button and text colors later so let's run it I think we can run it now so I'm gonna save it and then I'm gonna hit run okay so we hit run no main thing has been defined we've saved this game scene and it's the only scene we have it's here under our scenes folder so game DSC in open we set that as our main scene and then here's our test window at that lower test resolution that we set so if we have things going on in the game you'd be able to play with them here the cool thing about this is that even though it's extremely basic that's really all you need to say that you've launched a mobile app you could set up the android APK export settings right now and you could export this app onto an android device and you could see it live on that device in the real world outside of this game engine and this is so cool I mean it's been just over ten minutes and we're able to theoretically put something on a real device we can change things about it and we're already ready to add the actual game to it I just think that's really exciting I think it makes it really easy easy I think it's pretty intuitive and I think hopefully if this is your first experience with a good though you're really gonna enjoy it so moving on we're going to do a few other kind of housekeeping things and then I'll probably bring the video to a close and then next time we're gonna try to make some good progress a lot faster so I'm just gonna throw in some other node 2d structure basically just parent nodes of the actual elements we'll be using this is mostly just to help organize the game so we're gonna add quite a few node to DS we've already added background I'm gonna add another one for you I know 2d I'm gonna add another one for score so to do another one for the buttons this could probably be renamed and if it's better to do that we'll definitely will definitely evaluate that later I'm kind of working off of a project that I made while I was still learning so I'm kind of excited for this series not only to help teach people that are beginning with Godot but also to see where I have improved and hopefully introduce you to those improvements because I when I was preparing for this video I definitely saw a lot of areas that can be improved and so the other node 2d here emitters these are actually going to be the things if you watch the last video we basically have enemy projectiles coming from the top of the screen these emitters this is where we're going to put three emitters to launch or create and I don't know why I'm stumbling on this they're essentially responsible for creating the enemy projectiles so we're basically just taking their positions and placing scenes that are gonna be the projectiles the last one we're gonna add is Global's okay that's that's a problem that you'll see me do a lot I'll type in what I'm trying to create the node as so I'll type in Global's and then I realize no I actually need a node to D to D and then name it global so this is another thing that we're gonna take a look at how I did this I basically added my save system and global variable right here in the child structure of the main game node I think in the very next video we're probably gonna change that but just for the sake of seeing the whole game right in front of you we'll leave it there for now so I've got game background you are score buttons emitters and Global's or global variables I don't think there's anything else I want to go there actually is one more thing I want to do you won't be able to see a lot of it I'm going to import my images from or my sprites from the from the example project that you saw in the first video and then I'm going to take the result of this videos project I'm gonna put it in github and I'll have it in the description for you to download I don't want us to focus on creating images during all the tutorials I don't think that's the best use of our time so I want to make sure you have access to these resources to use so I just copied them into the sprites folder sprites okay so I've just added I just literally copied in all of the projectile images and all of the button images I had I think that will be everything we need to get started in the next video hopefully the next one's gonna go a little bit faster I think by the in the next video we want to have a little bit of the UI working and definitely at least one of the difficulty versions for the game so we should have a working game that you could export to an apk I think that's really exciting it's not gonna take us very long at all to get something working I hope this video has been helpful I realize this is kind of the boring start to the more exciting stuff I hope you'll stick with it I hope you learned something if you did remember to hit the subscribe button leave me a comment telling me what you think for now that's all I got thanks for watching [Music]
Info
Channel: TheBuffED
Views: 16,296
Rating: undefined out of 5
Keywords: Godot, Tutorial, Beginner, Mobile, Android, iOS, Educational, Godot Development, Gamedev, Game Development, Video Games, Game Design
Id: 6qQxMe8Oy2E
Channel Id: undefined
Length: 16min 5sec (965 seconds)
Published: Wed May 15 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.