- 58
- 525 340
Queble
United States
เข้าร่วมเมื่อ 29 ก.ย. 2022
I'm a video game developer who uses the Godot game engine!
My content revolves around educating others in game development, but I'll also share a devlog every now and then :)
Feel free to reach out via email with any questions!
I'm also offering 1 on 1 Godot/game development tutoring sessions through Fiverr, and you can check that out via the link below if you're interested :)
Have a great week!
My content revolves around educating others in game development, but I'll also share a devlog every now and then :)
Feel free to reach out via email with any questions!
I'm also offering 1 on 1 Godot/game development tutoring sessions through Fiverr, and you can check that out via the link below if you're interested :)
Have a great week!
Are you "getting" nodes correctly in Godot? 🤔
Hey everyone!
In this quick video, I'll show you 2 methods for "getting" nodes in your scene tree!
Watch until the end to find out the pros and cons of using each method!
PS. Omg perfect 6 minute video on accident :O
Thanks for watching, hope you have a great week!
LINKS:
-------------------------------------
Discord invite:
discord.gg/kgWXhZjd69
Twitch: (game dev streams)
www.twitch.tv/queble_game_dev
Need help with your Godot project?:
www.fiverr.com/s/o8Wq7AG
Join this channel to get access to perks:
th-cam.com/channels/jjFS6h7Dc7gCaq6_PX8jUg.htmljoin
Checkout my Patreon here:
www.patreon.com/QuebleGames
-------------------------------------
TIMESTAMPS:
-------------------------------------
0:00 Intro
0:20 Method 1 / Fixing a common mistake
1:45 Method 2
3:13 Pros and Cons
5:29 Outro, thanks for watching! :)
-------------------------------------
This video was recorded in Godot v.4.3.stable
In this quick video, I'll show you 2 methods for "getting" nodes in your scene tree!
Watch until the end to find out the pros and cons of using each method!
PS. Omg perfect 6 minute video on accident :O
Thanks for watching, hope you have a great week!
LINKS:
-------------------------------------
Discord invite:
discord.gg/kgWXhZjd69
Twitch: (game dev streams)
www.twitch.tv/queble_game_dev
Need help with your Godot project?:
www.fiverr.com/s/o8Wq7AG
Join this channel to get access to perks:
th-cam.com/channels/jjFS6h7Dc7gCaq6_PX8jUg.htmljoin
Checkout my Patreon here:
www.patreon.com/QuebleGames
-------------------------------------
TIMESTAMPS:
-------------------------------------
0:00 Intro
0:20 Method 1 / Fixing a common mistake
1:45 Method 2
3:13 Pros and Cons
5:29 Outro, thanks for watching! :)
-------------------------------------
This video was recorded in Godot v.4.3.stable
มุมมอง: 3 131
วีดีโอ
14 Tips and Tricks in Godot!
มุมมอง 3.6K21 วันที่ผ่านมา
Hey everyone! In this quick video, I'll show you 14 of some of my favorite tips and tricks in Godot! Watch til the end to see how many new ones you learned :) Embed Game Plugin: fabimakesgames.itch.io/embedgame (credit to @FabiMakesGames ) Thanks for watching, hope you have a great week! Don't forget to checkout these links below :) LINKS: Discord invite: discord.gg/kgWXhZjd69 Twitch: (game dev...
Introduction to Custom Resources in Godot!
มุมมอง 5Kหลายเดือนก่อน
Hey everyone! In this tutorial, I'll show you how to create and use your own Custom Resources in Godot! Watch til the end to find out how to save and load these files, and be sure to leave a comment showcasing how YOU use Custom Resources in Godot :) This tutorial was recorded in Godot v.4.3.stable, but should work in all versions of Godot 4. Thanks for watching, hope you have a great week! Don...
Start using Metadata in Godot!
มุมมอง 15Kหลายเดือนก่อน
Hey everyone! In this tutorial, I'll show you how to add metadata to your nodes in Godot! Watch to the end to find out the pros and cons of using metadata, and be sure to leave a comment showcasing how YOU use metadata in Godot :) This tutorial was recorded in Godot v.4.3.stable, but should work in most versions of Godot 4.0 and later. Thanks for watching, hope you have a great week! Don't forg...
Add Camera Shake to your Godot game!
มุมมอง 1.4K2 หลายเดือนก่อน
Hey everyone! In this tutorial, I'll show you how to setup a Camera2D node with a script for adding camera/screen shake! This tutorial was recorded in Godot v.4.3.stable, but should work in most versions of Godot. Thanks for watching, hope you have a great week! Don't forget to checkout these links below, and have a great week! :) LINKS: GitHub Repository: github.com/QuebleGameDev/Godot-Screen-...
A Damage Calculation Function for your game!
มุมมอง 2.7K2 หลายเดือนก่อน
Hey everyone! In this tutorial, I'll show you how to setup a really great damage calculation algorithm as a function for your game project! This method will take stats like attack and defense into account, and return a balanced value based on other customizable parameters! Thanks for watching, hope you have a great week! Don't forget to checkout these links below :) LINKS: Discord invite: disco...
Top 3 Pathfinding Methods in Godot! - Intermediate Tutorial
มุมมอง 2.8K3 หลายเดือนก่อน
Hey everyone! In this tutorial, I'll be going over the top 3 most common methods for Pathfinding in Godot, and help you decide which one is right for your project! Please note that this tutorial is a lot longer than my typical videos, and also assumes that you have more intermediate experience with basic GDScript concepts, so I won't be covering some of the more trivial topics :) This video was...
You'll love this easy-to-use Godot shader!
มุมมอง 3K3 หลายเดือนก่อน
Hey everyone! In this quick tutorial, I'll show you how to setup a really cool Palette Limiter shader in Godot! This shader is a great addition to your arsenal, as it helps quickly normalize your game's style with the click of a button! :) This video was recorded in Godot v.4.2.1, but the code shown in the tutorial should work in most versions of Godot (with minimal changes). VARIOUS LINKS: Git...
1 Godot trick EVERYONE should know.
มุมมอง 6K3 หลายเดือนก่อน
Hey guys! In this quick tutorial, I'll show you how to create and use Static Variables in Godot! Thanks for watching, hope you have a great week! Also, lmk in the comments if you guys want more short-form content like this :) LINKS: Discord: discord.gg/kgWXhZjd69 (join the community :) Join this channel to get access to perks: th-cam.com/channels/jjFS6h7Dc7gCaq6_PX8jUg.htmljoin
All about Signals in Godot!
มุมมอง 2.7K4 หลายเดือนก่อน
Hey guys! In this quick tutorial, I'll walkthrough all the key aspects you should know about Signals in Godot! Discord link: discord.gg/kgWXhZjd69 (join the community :) TIMESTAMPS: 0:00 Intro and Explanation 0:32 Benefits of using Signals 1:25 Connecting Signals in the Editor 3:00 Using Custom Signals 5:07 Passing Arguments through Signals 6:49 Common Questions 8:00 The Event Bus 10:19 Outro, ...
Advanced Platformer Character Movement in Godot!
มุมมอง 3.1K4 หลายเดือนก่อน
Hey guys! This intermediate tutorial teaches you how to create fully functional 2D Advanced Platformer Character Movement in Godot! The system provided in this video is fairly basic, modular, and it also easy to expand upon! Discord link: discord.gg/kgWXhZjd69 (join the community :) TIMESTAMPS: 0:00 Intro and Showcase 0:42 Setting up the Player Scene 1:40 Creating the Player Script 6:39 Setup I...
Push Objects in Your Platformer! - Godot Tutorial
มุมมอง 2.1K4 หลายเดือนก่อน
Hey guys! This beginner-friendly tutorial teaches you how to use Godot's 2D physics engine to make your CharacterBody2D push objects around. The system provided in this video is fairly basic, modular, and also works in top-down games! Discord link: discord.gg/kgWXhZjd69 (join the community :) Advanced platformer character tutorial: th-cam.com/video/8CwG5Phfzf4/w-d-xo.html TIMESTAMPS: 0:00 Intro...
2D physics with gravity areas in Godot!
มุมมอง 4.5K5 หลายเดือนก่อน
Hey guys! This beginner-friendly tutorial dives into Godot's 2D physics engine. Learn how to create dynamic and static objects, control gravity, and explore other essential physics concepts to bring your games to life! Leave a comment if you'd like to see another video on pushing rigid bodies with the player! Discord link: discord.gg/kgWXhZjd69 (join the community :) TIMESTAMPS: 0:00 Intro / Sh...
Easy XP to Level Conversion in Godot (Formula Included!)
มุมมอง 3K5 หลายเดือนก่อน
Easy XP to Level Conversion in Godot (Formula Included!)
How to use Classes in Godot! - Intermediate Tutorial
มุมมอง 14K6 หลายเดือนก่อน
How to use Classes in Godot! - Intermediate Tutorial
Make a resolution menu in Godot 4! - Resolution settings menu
มุมมอง 5K7 หลายเดือนก่อน
Make a resolution menu in Godot 4! - Resolution settings menu
How to Polish your Game's Animations! - Godot Tutorial
มุมมอง 1.3K7 หลายเดือนก่อน
How to Polish your Game's Animations! - Godot Tutorial
How to play Polyphonic/Overlapping Sound Effects! - Godot 4 - Intermediate Tutorial
มุมมอง 1.9K8 หลายเดือนก่อน
How to play Polyphonic/Overlapping Sound Effects! - Godot 4 - Intermediate Tutorial
Make Godot BEAUTIFUL with Custom Themes!
มุมมอง 4.8K8 หลายเดือนก่อน
Make Godot BEAUTIFUL with Custom Themes!
Godot Character Movement | Top-down Tutorial
มุมมอง 17K10 หลายเดือนก่อน
Godot Character Movement | Top-down Tutorial
Create your own Custom Node in Godot!
มุมมอง 8K11 หลายเดือนก่อน
Create your own Custom Node in Godot!
How to Make a Loading Screen in Godot 4!
มุมมอง 13Kปีที่แล้ว
How to Make a Loading Screen in Godot 4!
Set / Get functions in Godot 4! | Quick Tutorial
มุมมอง 9Kปีที่แล้ว
Set / Get functions in Godot 4! | Quick Tutorial
for some reason even the default script wont work for me
Wait that is so powerful. Thank you for very clear explanation!
honestly one of the best things i ever learned in programming was to look for/keep in mind the hidden 'costs' of every line of code, in terms of processing, lookups, memory, etc. when i was a kid, computers were grossly underpowered, slow as shit, and memory was precious; if your code didn't take all this into account, it either ran poorly, or not at all. modern systems tend to obscure this (both a good and bad thing), but the fundamentals haven't changed. i'd love to see more developer content taking quick asides to explain "ok... so look at what's happening here *every single processing cycle*..." etc.
There's probably no difference between the performance of export and onready. If you look a the scene file and find the export property you'll see that a NodePath() is saved and not a reference. So, both export and onready use nodepaths. However, the export value is evaluated early and you can access it in the _enter_tree() function while the onready value is set later and available by the time _ready() is called. (Note: all nodes in a scene are created from the get go and then added to the tree from root to leaf. To verify add an _init() override that prints _init() was called for a node. Do likewise for _enter_tree() and _ready() to get a sense of the sequence.) Personally I use onready variables with unique names and just rename nodes to match what they are being used for making it less likely I'll rename them. Then moving them around wont break anything. I also don't like having extra exports hanging around when I child the scene into a level or something. This is especially true for very complex scenes where a lot of extra exports would be added and visible. But to each their own! If you like exports, by all means enjoy! While I personally don't do it, there's nothing really wrong with it.
Great, thanks for the help.
This is a cool feature. I still don't see the advantage of using this over @export var I guess the advantage is if you don't want to write a script, but I'm probably going to want to add some logic (aka a script) to it eventually anyways.
I have a beginner question, sorry if this sounds stupid Are there any pros and cons in the await create_timer VS timer node? Say, if I want to add a default timer on every single character animation (player, npc, objects, etc), which decides when the functionality activates and deactivates in an animation, in order to separate the functionality from the visual. Which is the better approach for this kind of purpose?
Thanks for the great content!
I have a question. I want to have a var texture in a resource and set the texture of a node inside its script. I tried it with texture = stats.texture but it doesn't work. Am I missing something?
Hmm that should work, unless the texture isn't being loaded. Are you getting any errors?
@queblegamedevelopment4143 Nope 0 errors
@thesomeone2nd okay, would you send a snapshot of both scripts?
@@queblegamedevelopment4143 How to do that here?
@thesomeone2nd You could send it in the discord
so far this is the best video I've seen on resources. Great intro and very thorough, while not wasting any time at all. This is the resource video I needed. Thank you. Good editing too. I hope your channel grows.
Thanks for the feedback! 👍
is move_and_slide() needed to make the astar grid enemy move
No it isn't, although it could be used if you like. Astar is simply a class that helps with pathfinding, but you can use the points however you'd like in your movement script
@@queblegamedevelopment4143 oh ok
are you planning to make a version of this but the enemy moves via tilemap and moves only on tiles that are on a certain data layer?
You could checkout my more recent pathfinding video, and you should be able to implement this via astar grid
@@queblegamedevelopment4143 oh ok
Hi! With inputting expressions, is there a way to bind a variable there (such as a global variable)? So whenever the variable changes that that field is updated too? Or can that only be done using code and callbacks or something?
Unfortunately that's not currently possible in Godot, but that's definitely something that should be added! Maybe it would be some sort of advanced export type?
good tutorial but you go way too fast
Nice 2D character movement script, just wondering are there 4.3 upgrade issues with the script 🤔
Thanks! And no, it should work great in all versions of 4.x
@@queblegamedevelopment4143 Appreciate the quick reply, was my bad, can confirm, works in 4.3 😁 Also, I think I noticed that most of your content on here is 2D, do you help out with 3D as well 🤔 I'm not ready yet, prototyping a few ideas at the moment, but imagine I will need help at various stages throughout the process. I am on the discord channel but don't think I've interacted there yet. Is that the best place to talk more in the future 🤔
18:12 I genuinely didn't know you could use Astar without a grid. Otherwise does it work in 3d and do you know how to make stuff like jump and fall connections?
I never use $ or node paths in code. Always export variables.
Clear, concise and straight forward information. Resources are much more clearer now and their use-cases are brought to light, thank you.
Thanks for sharing this information.
You channel is gold! It's a missing category in Godot tutoriala, because most if the times videos are targeted at beginners or they just explain implementation if a certain feature. You, however, explain intermediate things about workflow and good practice. Keep up your good work, I'm sure it will pay off!
It's just a guess, but onready nodes should be worse because godot still calls get_node to get the reference while with export, it seems, you directly assign the reference via the editor
I was just wondering this a couple days ago. Thanks for sharing.
No one should give performance advise without measurements.
Measurements were taken :)
@@queblegamedevelopment4143 Hey, just rewatched to double-check, but I don't see any figures for the performance differences you're mentioning. Knowing the cost and benefit of multiple approaches helps people make the choice. Saying "faster" and "slower" is not engineering.
There were no figures shown in the video, as I assumed the efficiency boost was obvious. Using "faster" / "slower" is a great way to give viewers (especially less experienced users) the information they need in a quicker format :) Aside from that, the benchmark project I used to test these theories showed the following results: Figure A: Using $ to access nodes when you need them: - 20 nodes, having 2 properties accessed each, 10,000 times per frame | average of 120ms frames - 10 nodes, having 2 properties accessed each, 20,000 times per frame | average of 121ms frames - 20 nodes, having 2 properties accessed each, 100,000 times per frame | average of 1204ms frames Figure B: Storing nodes in onready variables for access: - 20 nodes, having 2 properties accessed each, 10,000 times per frame | average of 80ms frames - 10 nodes, having 2 properties accessed each, 20,000 times per frame | average of 83ms frames - 20 nodes, having 2 properties accessed each, 100,000 times per frame | average of 819ms frames (As you can see, the method I promote in this video is clearly more efficient than the alternative)
my gf said she would grind you
Great video idea with these short clarifications! If you haven't done it already, an explanation between some of the other virtual methods would be awesome. Like _process vs _physics_process or _input vs _unhandled_input. Stuff like that.
I use a mix of exports and onready, The exports i use for scripts that are shared between scenes. For instance, my playable characters all use a stats script that houses their health, stamina etc. I this allows reuseability, for logic thats shared between characters but not necessarily needing the exact same things like running speed etc.
Great video 👏 with the export method, would there be a significant performance difference if you dragged a file from a folder rather than creating a node in the scene tree for that variable? Example: an mp3 file. Do I have to create an audiostream node inside my scene tree or is it fine to just drag the file from my sounds folder?
It depends a lot on the type of project you're making and what it is you're doing with that node, what it's interacting with. Exporting some nodes can lead to issues with serialization and there are some other potential issues. For smaller projects this may be fine. But it is NOT something you should be doing with 100% of your nodes, at any and all times. And most certainly not something you should do with larger games.
As usual, the more static or predefined some info is, the faster it will be processed
DANG!! now I must rewrite 500 lines
😅😅😅
Great job
Just a minor note, you don't really lose runtime flexibility with exported variables, and they don't have to be assigned in the editor. You can set default values in the script declaration, so if you forget to set them in the inspector it'll still work, and you can still set them again during runtime, nothing prevents it. The only downside is they will revert to the exported value when the game is rerun, so you'd need to save the value, and load it after to get the prior runtime value. Most games with save/load do that anyway, so it's not a real issue. Also, export is basically the same as onready + inspector access. There's not really a performance difference. Export does process before onready though, as it's more in line with _init(), while onready is with _ready().
Also, the majority of nodes you access in Godot is part of the same scene as the script. It's how you structure logic, actions, reusability and everything in godot. So most child nodes that you export a reference to have the exact same lifecycle as the parent node/scene where you attach the script. When outside of that use case, groups are often very useful. For example if you have a PlayerHUD scene that reads back health etc from the player I usually just pick the first element of the player group and set the reference in onReady, and throw an error if a player cannot be found. I use c# so I haven't used unique names a lot, maybe that's preferred approach, but groups worked very well for "outside" dependencies in c#.
Here's the info on Unique Names, since quite a few people mentioned this :) Unique Names are similar to exported references (in the sense that the scene tree position can change while retaining the path), although they still need to be accessed with the % symbol (the same as using the $ sign or get_node()). Pros of using Unique Names: - Similarly to exported references, you won't need to update your code when moving the node around in your tree - More readable paths inside your script Some Cons of using Unique Names: - For the best performance, it's still essential to store unique nodes inside of @onready variables, since they do still need to be obtained, and aren't properties - Uniquely Named nodes can ONLY be retrieved by a node inside the same scene. This means that instanced scenes with exported node references are much more flexible, especially when working with component systems. - If you have multiple nodes with similar names (especially in larger scenes), Unique Names can get tedious, and end up being more confusing than other methods. Performance of Uniquely Named nodes: - The performance is slightly faster than using static paths, but is still slower than using exported references Hope this helps! :)
I will realy enjoy video of how this performance is mesured. Can be a short. I'm really curious. I'm not a Godot Pro or anything like that. As far as I know the % does all the chaching for you. The main benefit for me is that I often need to re-position nodes in UIs and % names saves you all the renaming.
It is still inefficient. The str() function should not be in _process
True. The code example in _process function should have been something else, since the point of the video was about referencing Nodes.
How would you go about improving that line? The only thing I can think of would be adding a condition to only update if the mouse pos is different than last frame?
@@queblegamedevelopment4143 Glad you asked. Based on what I understand, converting the mouse's position to a string with str(...) is the most time-consuming function in question, so reducing the number of times we call it is ideal. What you suggested is correct. We'd use the Node's _input(event) function to check if the mouse position has changed, and if it did, we'd assign str(get_global_mouse_position()) to the label's text. As far as I know, _input(event) is only called when user input is detected, so first checking for a UI change and then checking if it was the mouse position significantly cuts down on how many times str(...) is called. That said, for most games, this kind of optimization is likely unnecessary. Yes, it can add up, but performance drops are typically caused by rendering a lot of textures or poorly managing large amounts of data or memory, as opposed to calling a str(...) conversion each frame.
Thank you for creating this content. I like these kinds of videos: short, to the point, and covering the basics. As it was mentioned in other comments, I'd have liked to see an example using %unique_names, perhaps that could go in another video. Best regards.
The missing one is %cached_name Those are cached so are fast
I've added a pinned comment that explains the pros and cons of unique names in a bit more depth :)
Is there a difference between exporting nodes and setting them to "% Access as Unique Name"?
Yes there is! Using Unique Names is still slower than setting exported references, although it is faster than using static paths. For the best performance with Unique Names, you should still store the reference inside of an @onready var. The only drawbacks of using Unique Names, is that node references will only be able to be accessed by other nodes inside that same scene, meaning that if you instance a scene with an exported node reference, it'd be a lot more flexible.