The 4 Essential Building Blocks of Every Godot Game

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
every game engine revolves around abstractions you use to build your applications in godot a game is a tree of nodes that you group together into scenes you can then wire these nodes so they can communicate using signals in this video you will get an overview of four essential concepts to get started with godot scenes nodes the sentry and signals learning these will give you a sense of how the engine works and how you will create games with it you will get to use all of them in practice in upcoming videos in godot you break down your game into reusable scenes a scene is like a character a weapon a menu in the user interface a single house an entire level or anything you can think of guru's scenes are flexible they fill the role of both what's called prefabs and scenes in some other game engines you can also nest scenes for example you can put your character in a level by dragging and dropping the character file into the level scene you coded a weapon and you want to attach it to your character you can drag and drop the weapon onto the character to add it as a child of it that process of adding your character to the level is called instancing scenes are blueprints you can reproduce as many times as you want be it in the editor or by writing code a scene is composed of one or more nodes nodes are your game's smallest building block that you arrange into trees here is an example of a simple character's scene definition it comprises four nodes a kinematic body 2d node named character a sprite a camera 2d and a collision shape 2d notice that the node names end with 2d that is because this is a 2d scene at this point you might say nathan you just told me that this thing you see in the editor was a scene but now you're saying it's a node and you would be right here you are seeing the contents of the character scene it is a blueprint we can use to make multiple characters in our game when we use it like when we create an instance of our character in the level gudu presents it as if it was a note hiding the scenes hierarchy and its contents notice that camera clap icon next to it this is what's telling us that we are dealing with a scene instance and not a node the important part is that scenes are made of multiple nodes and those are the smallest building blocks of your good game guru provides an extensive library of base note types you can combine and extend to build more powerful ones 2d 3d or user interface you will do most things with these nodes you don't have to worry about how you create nodes or scenes at this point you will learn all that in upcoming videos all your game's notes and scene instances come together in the scene tree literally a tree of scene instances we just saw that the content of the scene like our character was a bunch of notes as a result you're good at games will be a big note tree but it's easier to think of your project in terms of scenes as nodes are really bite-sized components while scenes represent more meaningful game entities like characters weapons a level an inventory and more we have one last concept to talk about signals nodes emit signals when some event occurs this feature allows you to make nodes communicate without hard wiring them in code gives you a lot of flexibility in how you structure your scenes signals are good as version of the observer pattern a technique commonly used in many programming languages and frameworks for example buttons emit a signal when you press them you can connect to the signal to run code in reaction to a button press like selecting an item in an inventory or making a choice in a dialogue system other built-in signals can tell you when two objects collided when a character or monster entered a given area and much more you can also define new signals tailored to your game by writing code and that's it for our quick look at four essential gooder concepts when working with godot you will use them all the time here is a super quick recap nodes are your game's smallest building block you combine them to create scenes that you instantiate and nest into the scene tree in programming to instantiate means making reproductions of a blueprint or template you can then use signals to make nodes react to other nodes events like a weapon touching an enemy's hitbox while getting to the end of this video and you probably have many questions bear with me as you will get many answers throughout the getting started series in the next part we'll go through the editor's interface to get a good sense of how it works this will make the process of creating your first game from scratch much smoother later on be sure to subscribe and turn on the notification bell so you don't miss the next parts if you are impatient to get more good content we created a lot already and you can get a selection of our best tutorials in your inbox by going to our website you can find the link in the description below enter your email and we'll send you tutorials
Info
Channel: GDQuest
Views: 62,841
Rating: undefined out of 5
Keywords: godot nodes, godot tutorial for beginners, godot engine getting started, godot scenes, godot signals, godot scene tree, godot basics
Id: lGZ4RaC4O2w
Channel Id: undefined
Length: 5min 7sec (307 seconds)
Published: Thu Feb 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.