Godot Components - how to structure a game into manageable parts (Beginner/Intermediate)
Вставка
- Опубліковано 25 чер 2024
- Hello Godotneers! When you are creating game in Godot, it is often hard to decide how to structure all your nodes and scenes. Which nodes should go into which scene? Which nodes should talk to each other and when? This video explores ways in which you can create self-contained components in Godot and shows techniques that allow components to access other components and communicate with them while still keeping them usable independently.
Contents
===========
00:00 Introduction
01:07 The setup
06:00 Defining components
08:19 Creating components at runtime
10:46 Signals
13:35 Detection with Areas
19:31 Contracts
24:22 Re-use of components
31:12 Detection with slide collisions
35:25 Groups as classifier
41:17 Combining components
47:45 Autoloads
51:53 Custom signals
53:40 Signal relays
58:48 Component access with groups
1:03:05 Call propagation
1:06:22 Configurable node paths
1:10:01 Conclusion
Useful links
===========
Godot Signals - docs.godotengine.org/en/stabl...
Godot Physics Introduction - docs.godotengine.org/en/stabl...
Godot Areas - docs.godotengine.org/en/stabl...
Godot Groups - docs.godotengine.org/en/stabl...
Godot Autoloads - docs.godotengine.org/en/stabl...
I'm a retired engineer and do Godot just for fun. But having worked as an IT Architect I do appreciate a structured approach and I think there are not enough videos about that aspect. So thank your for the work you put in in creating this very helpful video. Subscribed!
As a developper, this is what boggers me in other tutorials : spaghetti code and global variables that works for a couple scenes, but are unrealistic for a middle sized project.
It's nice to see tutorials like this one !
Can you please tell me what an IT Architect does? It sounds interesting
@@andteam_lune A regular architect designs buildings and on a larger scale then subdivisions and the including infrastructure (water, electricity, sewer, etc.) connected to those buildings. An IT architect does essentially the same, designing standard hard- and software configurations, how those are installed and supplied to the end-user (incl. processes around it, e.g. how does and end-user apply for hard- and software tools, how does he get them, what happens if something doesn't work, ...). This is of course more important in larger companies, e.g. I used to work for Siemens and Nokia and the IT infrastructure needed to be designed and maintained globally in many countries for about 100,000 end-users. There it also becomes important, how it all connects to each other (sites within a country, then country to country), account management, security, VPN access (for those working from home), global services like a company-wide email system, etc. It's a big area and typically you specialise in one area and work together with many others. A very interesting job with challenging projects. Hope this explains it a little bit, I probably could write pages about it :-)
100% agree
Excellent lesson, because this is way past a tutorial.
You don't say "Don't do that, do this instead" you take the audience on a journey to improve overall understanding that's easy to extrapolate to other aspects of the engine.
This is far more valuable than tutorials alone. They are important too and help to quickly to vault a wall but they seldom resolve the underlying issue of "WTF, why not working"
Please keep up the dedication to this style. I really appreciate the effort and I'm certain others do too.
Probably one of the most comprehensible tutorials out there. There is a reason, a rationale behind everything:
What is the problem?
What is a solution?
What are the limits of the previous implementation?
How can we make it better?
Everything is just super clear. You are a great teacher.
I just want to say I've learned more watching this than I did in 12 hours of paid-for tutorials. Thank you for not talking down to a newbie and clearly explaining concepts!
Every Godot dev should watch this. Instantiating new scenes at runtime is a powerful concept that isn't apparent, and I loved how you demonstrated how utilizing signals can replace singletons/autoload scripts. Thank you!
From what I read of the docs, Singletons/Autoloaders are meant for determining global variables that aren't scene dependent. So you can have something like the players gold count carry over into a new level/world.
If you had a single level, you wouldn't need to use them.
You're really great at actually teaching how Godot works, rather than just showing how to do something. Can't wait to watch your other tutorials!
This is the best godot tutorial I have ever seen... Because is not a tutorial, it is a full lesson that covers a LOT of very important things. Great job and thank you!
I'm a computer scientist working on my masters and find your videos to be incredible. Please keep it up. I've just been learning Godot for fun and your structure is so much better than all the other tutorials I've watched. You walk through each challenge and problem instead of just providing the answers. I've watched all your videos. Incredible. Thank you.
I was thinking of starting a youtube channel just to explain these concepts since there really aren't any videos discussing these topics in a clear and "correct" way. But to be honest, the amount of work these kind of videos take, and my limited amount of time aren't really a good combination haha.
Big congrats to you! This really is extra good quality content, and it is indeed much needed. No shade to the other content creators, but I do need to empathize the lack of good tutorials about Godot, and how much they are needed.
thanks for the amazing content!
Edit: I would even add that videos like these, are SO important, but take SO much effort, and the creator doesn't even really gain anything, that some money from the Godot crow-founding, should go into helping the creation of such videos. Again, congratulation! Amazing work!
I'm glad that this is useful. You are right these videos take an ungodly amount of time to make, currently it's about 1 hour of work for each minute of finished video. Which also explains why I cannot crank them out every week or so. I hope it gets better over time as I get more experience, but in the end if you want a good end result there are not a lot of shortcuts you can take.
Well done! This is exactly the type of content I'm looking for when learning something new. Tight, to the point and taking philosophy and pitfalls into account and blissfully free from "dude-in-a-room-with-coloured-LED-lighting-taking-up-80%-of-the-video-talking-about-other-stuff-and-or-today's-sponsors" ✨
Love your teaching style! Showing us the whole chain of "problem -> solution -> new problem -> new solution" takes more work but it really drives the point across, and helps me understand some of the ways I could reason about these things. Thank you very much!
this is a brilliant introduction to how to break down games into approachable chunks, as well as how to get those pieces communicating efficiently. Great stuff
This is gold. Thank you so much.
It would be nice to see some tutorials about unit tests or any kind of tests as well
I watched the whole thing, thank you for providing content about the right way to do things instead of just alluding to doing it differently in a production codebase like others sometimes do.
This is one of the best tutorials in godot. This tutorial teach me to build something, not just following tutorial and not able to modify it. Please keep your good work sir. Thankss
You have the best game development tutorials! In addition to being clear and complete with your information, I love the graphics you put on screen that really bring certain concepts home, and I really appreciate the speech bubbles that not only help reinforce the ideas, but also provide entertaining moments as well. Really stellar work!
I’m just 30 minutes in and I’m really impressed with the quality of this tutorial. Thanks !
Nice video! I love your carefully laid out running examples. The cheatsheet in the end is great for brainstorming how to organize my code :D
These tutorials inspires me more and more to learn Godot! You doing super good work for godot.
Another must-see tutorial for Godot. Awesome job! Also love the incremental format that puts each approach into context of the problem it solves.
Wonderful, your videos do not make me sleepy but excited. Looking forward to your new videos in the future.
This has been so incredibly helpful; your explanations are spot on, and the practical use in building the game up... this has been so much better for really 'getting it' than a lot of other vids I've watched on how a lot of these fundamentals should be managed in Godot.
Thank you very very much for this!
I love how you teach! Going through all the pitfalls and pointing out why they happen.
Best lesson I have seen for Godot! Thank you!!
Extremally high quality tutorials. Subscribed.
So glad that I've found your channel! You're fantastic at teaching Godot!
This is the best Godot tutorial I have ever watched! Thank you so much!
This was fantastic. I expected to watch a small bit of this and move on, but you held my attention for the full hour and I felt like I was learning something the whole time.
I'll be looking forward to more! Thank you for all the work I know this took to make!
best godot tutorial i see sofar. Thank you!
This is the single most useful Godot tutorial I have found, thank you!!
Excellent quality. I particularly appreciated the large cursor, highlighting of key points, and breakdown of chapters. It feels like you put a lot of thought and care into this video.
The effort put in this video is not seen in a lot of other tutorial videos. Great Job
Awesome tutorial video! I'm on my 3rd week learning and creating my game in Godot and your videos really helps a lot. Thanks and keep up the great work.
Probably the best Godot tutorial I've ever watched!
This has to be the best approach to tutorials I've seen on youtube & not only Godot-related but really about any subject!! I'm less than a newbie in gamedev but I still am able to follow along and get A LOT out of these videos - I think, reading the other comments, these videos prove to be really precious in different ways for every level of expertise because they're so well structured and really challenge thought and that's what I want from "tutorials"! When I'm a newbie at something I usually dont' want to get stuck hearing a list of what every button in a program does, I want to try and problem-solve actual real-world situations and these videos are just perfect for that! They never get boring or criptic and it feels like I'm learning way more than just Godot.
I'm so happy to have found these and although I never leave comments I thought I might leave one because I just want to do as much as I can to make people find your channel!!! Keep it up and thank you so much for all these gems!!
This is the single most informative Godot video I've encountered - it's extremely beginner friendly, but clearly shows all the organization concepts you need to make a proper game. Amazing work!
Thank you.
This is one of the best tutorials i have taken. I enjoy how you explain your line of thoughts very clearly, and show us why certain things need to be done, instead of going straight into the technical implementation part.
I bring home with more insights than questions, which is unfortunately the case for many other tutorials out there.
Hope you could keep up the good work. Now please excuse myself. Need to get on the other videos on your channel.
Solid stuff. 5K subscribers with only 4 videos show the quality of the channel. Keep it up!
I love your videos. Other youtubers do their tutorials like "Let's make a game by using godot" for example. While your videos are like "let's learn how to use godot and how it works, by building a game that showcases these things". Excellent work!
I love your tutorial style of starting with the simplest piece and slowly building it up, explaining the options along the way and why one is better than another. Very well done. Thank you!
Absolutely excellent tutorial, good content, very well explained, and perfect pacing and legibility. Thanks for making it, please make more like this !!!
I love the little bits of humor you sprinkle on these tutorials.
Your tutorials are great! I'm a bit familiar with Godot 4 and when I started with it a year ago, I didn't find good tutorials. Yours are good. Happy to see new ones and learn new stuff.
I recently started learning Godot and this video was made just as I started asking all these questions - perfect!
This is pure gold, very thanks.
Really great tutorial! I appreciate you walking through the reason to do things a certain way, that helps the content stick.
You need more subs! Thank you very much for these excellent tutorials for us Godotneers!
One of the best godot content on UA-cam
You have done a great job explaining not only the code but also the concept behind it in a way that really helped me on my Godot journey! Thank you and all the best to you!
Really great tutorial. As a slightly more advanced user I still appreciated how clearly it was presented and it reinforced a few ideas for me. I was questioning the autoload reference in "custom signals" section then you immediately addressed that in "signal relays", haha
I'm lucky that you started this tutorial series around the time that I've started playing with Godot! Out of all of the tutorial series I've seen, I think yours are the most clear and thorough. Thank you for your time in making them! Do you have any published games anywhere I can check out?
This is incredible! After finding so many useless step-by-step tutorial where sometimes even the creator doesn't know what they're doing, it feels like a fresh air watching you talk in-depth on high-level principles, and how to actually design games efficiently in Godot. I'm definitely putting this and your channel on my list of resources to learn Godot
This might be the best game dev tutorial i have ever watched
This was a fantastic tutorial. Thanks for all the effort that you clearly put into this, and I look forward to seeing any others you've made.
Thanks a lot for this excellent walktrough!
Lords this is one of the best tutorials on Godot 4 I've ever seen. Could never figure out instantiate before and gave up on Godot. Watched this and everything (but the signals out of scene- will stick to an autoload for now) started making sense. Love how through everything you show multiple ways to do everything.
Just getting into game dev and finding so many great Godot instructional videos like this one! I’m so motivated to learn! Subbed
Thank you so much for this. Been trying to really dig into Godot for the last few months but there just isn't that much learning material out there that isn't targeted at super basic concepts. Your stuff has been so helpful for getting my head around some of the more advanced stuff.
Best tutorial for Godot I have seen. Hands down. Answered so many questions I have after about 20 hours of other tutorials and experimentation.
Gold content around here ! Thanks for this really useful tutorial, which is one of the rare ones about Godot to deal with game component management and communication. A lot of important notions are detailed here and I like the fact that you don't rush in your explainations unlike many others. Great job and definitely a reference video for Godot users.
Already subscribed to your channel and happy to see it grow !
This is the most valuable tutorial about the topic. Very well explained, thank you!
You have an amazing teaching style!!! Thank you for this free contribution it's very generous of you.
Really good tutorial. Does a great job addressing many of the challenges that come when you progress from beginner to intermediate skill level, which is usually a point that tutorial videos on UA-cam stop being useful. This video has some very good descriptions of patterns you can use to stay in control as your projects get bigger and more unwieldy. As you said at the end, there's more than one solution to these problems, but I think even the topics discussed that didn't apply to my own projects still got me thinking, and gave me ideas for new ways to tackle the problems I was facing.
Hands down, you make the best Godot tutorials I've ever come across. You go into such detail explaining every aspect of what you do in such a clear manner that the concepts just lands so easily. It's rare to come across tutorials where I have no lingering doubts, let alone where I'm able to stay awake till the end. I'm so glad I found this channel!
Wow. Ten minutes in and your approach is perfect for my learning style. Looking forward to rest of your videos.
This is an amazing video! Thanks for all the work. I'm a software engineer in my day job working on Back End Web stuff and have been getting into godot for fun projects for my friends, and this was amazing! Helped put me in the headspace for developing games like this. I always find tutorials move WAY too slow for someone who is fairly familiar with software engineering and your pacing is amazing and the way you guide the consumer through the concepts and thought process is super helpful.
This was awesome! I look forward to learning more from you!
This is the most educative tutorial I have ever watched on Godot! Thank you
This is by far one of the best game dev tutorials I have ever seen 🤩
This has helped me so much in understanding how to organize scenes for best practices
This is what I was looking for, thank you very much!
Excellent. A full array of good advices. Quality, well explained content. Thank you!🙂
Fantastic video! I wanted to start using Godot for game dev project and I was looking around for some examples. This is a perfect introduction for me. Many thanks!
I am mindblown, such a great educational video. You just became my favourite Godot youtuber! I learned so much in 1h I'm shocked. So many things that I previously couldn't grasp just snaped into now-it-makes-sense land, and this is only the first video of yours that I watch!
I don't usually leave comments but I absolutely love this channel. Every time I watch one of your tutorials I instantly figure out so many things about how Godot works and questions I didn't know I had get answered. Keep up the great work!
Another great Tutorial, many thanks... Really like the full screen use for the code... no distracting 'self picture window'.... can't wait for more... ;-)
This ios the first tutorial that made sense to me .. and explained things in such a clear manner, that I perfectly understood when I did something wrong.
This should be at the top of every search when people want to learn godot.
Great tutorial as always, Sensei
Thank you! Coming from web development, this video helped my incredibly much. Really appreciate it.
I kinda knew most of this staff separately, but could not gather it in my head to make this knowledge useful. Thanks!
This is amazing! Thank you for making it
cheers. good stuff. let´s continue the series
Amazing tutorial. Thank you, wise one.
I like the way you created this tutorial. Keep up your good work.
Just started hobby-wise to look into Godot and stumbled upon this video!
Maybe the best tutorial video for a beginner (in Godot) to start with! Absolutely amazing work, thank you!
Fantastic tutorial. This is the type of tutorial where I don't just learn how to make what you made in the video, but how to use the same techniques to make something completely different, because you explained everything so thoroughly. Thank you
Legend ! This is the exact channel for Godot I've been searching for.. Please dont ever stop creating videos for Godot and game design :)
I really love your Teaching Style, the (I guess) AI Art is charming too!
Please don't be disheartened by Views or anything, the Algorithm of UA-cam is said to even start really considering your videos after (I believe it was) 39 Uploads.
I know that's a lot of Videos now but damn, I will watch every single one of these and like and comment on them too!
This is the stuff I want to support where I can because it's what we most desperately need in the Godot Community now.
We can't have more successful Indie games coming from Game Maker (Of all things...) than coming from Godot!
Videos like this really help with this in my Opinion.
The hardest problem to tackle with Game Engineering is softening the blow of the "Hard Brick Walls" of Game Development.
There are so many hack tutorials for any given Engine out there but only so little Quality content that really shows you the way to think around Problems.
Also there is so little Intermediate or even Advanced info out there.
I'm usually not an Advocate of "Advanced Level Tutorials" as by the time one should use it, they should be able to gather the info by themselves.
However offering that bridge, giving good practices and ways of thinking about problems will really go a long way.
And this is exactly why we need you!
You are probably even more important to this community than you may realize.
You might potentially be more important than the People advancing the damn engine, as crazy as that might sound.
Sometimes, it's all a butterfly effect.
Thanks a lot for this! I'm really happy that these videos work so well for you. I've spent an ungodly amount of time on this components video, re-doing it 3 times with different approaches until I felt it was somewhat coherent and it wasn't over 2 hours long anymore, so reading this really makes me feel it was worth it. Thank you!
As for doing more advanced/bridge videos, I think the reason why there is so little about this is that they both require quite a bit of background knowledge from the viewer and are usually somewhat niche, so there may not be a lot of incentive to make those. I have a few things in my queue that would qualify as "definitely not basic" but I have not yet found a nice approach to ease someone into the topic who may be new to it that doesn't take 3 hours of explaining things first or alternatively just throwing the viewer into the deep end of the pool and leaving them with little value from watching. But over time as I get more experience in making these videos something surely will come up.
I can fully understand the incentive part. It's everywhere in Game Dev Tutorials too. If you've seen a Tutorial Series, the more episodes in you go, the more viewer-counts disappear, sadly.
I, myself, wouldn't even know where to start with this, but I suppose teaching someone how to teach themselves could be a potential solution to this. How to get the most from Docs for example, assuming you don't really know what you are looking for is something I struggled with personally. These always lead me to google, sometimes to not satisfactory results.
I'm glad to hear you got the message though, it was well worth it to me but knowing the amount of time it took also deepened my respect!
Did you write a script for the whole Video?
I've found, while a hassle at first, they compound into sparing a lot of extra work.
But I'm guessing you already do that and hey, if not, this might mitigate some of the problems.@@godotneers
@@hiiambarney4489 yes i wrote a script for the video, actually i wrote three. after the first one was written, i started filming and doing the first animations. Then i realized this would take way too long, so I needed to cut back a lot on the animations and also streamline quite a few bits. So I wrote the second script and while this was better, I felt that the final product was not as corehent as I thought it would be when reading the script. So a third script materialized where I reordered a few things, also dropped a few more parts of theory that would hopefully explain themselves when showing it (show, don't tell;) and the third script was born. Since I was busy with other stuff I had to record it in several takes (which you can see in the date stamps in the task bar and also sometimes hear when the voice changes a bit). And finally editing it is always a huge timekiller as I have to cut out all the pieces where I misspoke or rambled on forever or had to take the occasional re-shoot when I missed removing a thing from my trial runs. So I definitely learned a lot when making this and I hope this whole process will be smoother as time goes on. I'm also not really happy with Camtasia for editing, while it makes it really easy to control things like the mouse cursor and adding these speech bubbles and other annotations it becomes really sluggish to use once you go over 30 minutes. I'll evaluate a few other options and see where I can get from there. If you have some tips for me they are more than welcome!
Godot tutorials and the ppl who make them are severely overpowered. Thank you for this amazing video!
Great lessons! Waiting for the next video!
Very well made tutorial!
as a unity developer learning godot, this was exactly what i needed! thank you!
Exactly what I was looking for! A teacher.
Hello, first of all, thanks for your videos, they are the best tutorials out there in my opinion. Great job so far!!!!!
This is an amazing journey even for intermediate godot programmers and you just earned yourself a new follower.
I LOVED that you didn't just write down the code but also explained the thought process, failed attempts and quickly went over what someone might think would be the fast solution to the problem and why it's not.
Loved it!
edit: let me add that the little things, like putting in the script name you're editing on the bottom right on zoom in just helps so much!
this was helpful. i learned a lot about node and scene interactions, there was a lot of fundamental information in there that is otherwise opaque. also took away a lot of great information about best practices when it comes to keeping code simple. will be watching the rest of the series. thank you.
A good Tutorial containg all the important things to get started in Godot.
Great video! Very clear explanations and great visuals/ animations!
Man, you are the man - this is so clear and concise! thank you - after researching paper books I have learnt that there are so many errors - in 99% of them. This video is a breath of fresh air! thank you.