Тёмный
No video :(

Build Highly Scalable GODOT Games in Under 10 Minutes! 

Andrew Hoffman
Подписаться 36 тыс.
Просмотров 49 тыс.
50% 1

Опубликовано:

 

23 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 57   
@Erbmon
@Erbmon 2 года назад
I love your tutorial style, I whould really love to hear your insghts into signals, inheritance, etc... Godot is modular by design but it's rare to find tutorials that focus on the "glue" instead of the pieces, and I will argue that it's the most important thing to grasp at the start.
@enkin.4742
@enkin.4742 2 года назад
+
@fortpile
@fortpile 12 дней назад
This is one of the most helpful videos on godot I've ever seen yet, probably even beyond Godot, and the fact that it's less than 10 minutes makes it even better. Thank yoU!
@thehiddenplace
@thehiddenplace 2 года назад
This title scheme reminds me of a book I once owned 'Learn C++ in 24 hours.' Took me months to work through, huh...
@ygypt
@ygypt Год назад
theres a 3rd option that works well with a large team: assets/ for binaries like sprites, models, which is hierarchal src/ for text (scenes, scripts, etc) which is modular this allows the programmers to worry about sorting their files in an object oriented way, and the artists can just dump all their foliage textures in assets/textures/foliage (never go more than 3 folders deep)
@computer9764
@computer9764 2 года назад
If you're emphasizing a scalable approach, it would be a good idea to show a large project. I would argue that feature folders are always more scalable than trying to fit everything into assets/scripts/etc. It's easier to think about things grouped together and easier to see when too much is shared in a project. Spaghetti between sub-features isn't as big of a deal as an out-of-control project.
@sosasees
@sosasees 2 года назад
yes. one of my first Godot projects used the assets/scripts/scenes structure, and it became really confusing really fast. i never want to touch that project ever again. now i use only the feature-based structure.
@saulmaldonado4607
@saulmaldonado4607 10 месяцев назад
Yes, from my android app experience it's better to have modules
@luislodosm
@luislodosm Год назад
I find the hierarchical system difficult to modify if you want to work on different components of an object at the same time. It is also much more difficult to reuse in other projects. I prefer to use a hierarchical modular system, for example: modules/ characters/ player/ enemies/ npcs/ shared/ This way, if you want to take the player to another project, you only have to take the player and shared folder.
@panampace
@panampace Год назад
I too like to keep my assets within the same folder as their object's scene and scripts. But most tutorials recommend them in a top-level "asset" folder. Glad to know I wasn't doing it "wrong".
@veto_5762
@veto_5762 Год назад
Hierarchical structure can be useful if you're working with a decently large dev team, so artist only mess with the assets folder, developers with scenes and scripts, musicians/sound designers with sound and so on and so for. But for a solo dev doing small projects modular is the way to go in my opinion, it depends on what allows you to organize better what you're working on easily
@liamhamilton2719
@liamhamilton2719 2 года назад
This is a topic that i don't see enough of, im currently making a complex management game and the hardest part is definitely organisation. Would love to see a video on how to keep scripts organised too!
@javierangelelli1915
@javierangelelli1915 2 года назад
This video was the kick i needed to take a breath and reorganize all my code.
@Visionsofmortality
@Visionsofmortality 2 года назад
Hey Andrew hello again! I think the voice audio in this video is still a bit low but much better than before, you definitely improved that. Useful tips, waiting for more Godot videos!
@LocherYT
@LocherYT Месяц назад
i like keeping my scenes and their scripts together while every asset (such as style, textures, sprites, sfx) in the separate asset folder. if my character uses components (like walking, talking, interactive, combat), i have a separate components folder. Many different actors can make use of several components that are shared. assets/ custom_ressource style images audio content/ actors components stages systems I'll be using this structure until it no longer works but so far it's all cool (especially in cases where many actors share common resources). And in case of inheritance, i also keep children together with their parent and make it apparent with a proper naming system
@mapopi-mm
@mapopi-mm 2 года назад
Great subject, this kind of care upfront saves a lot of time later on. Thank you for the tutorial, really helpful
@dnbroo
@dnbroo 10 месяцев назад
well made! I have used the second method for a project before, but never really considered the modular method. Just starting a new game and I think ill give the modular method a shot as that seems easier to understand for solo dev. piecing and parting out later on or even testing in new projects sound much easier this way
@natecoley160
@natecoley160 2 года назад
i think where is also better way - grouping by components, for example. player has criteria to be a player, he has input controller, movement behavior, and firing behavior, movenent and firing| has a lot of creatures and could be shared, npcs could have different input (ai input instead of user input), and could only walk, enemy could have enemy ai input, and could walk and fire, so it look really modular, also you might group files in "bundles" a set of external plug and play asssets, like bundle for fps, bundle for rpg and so on which could contain solid, tested, modules to warm up development
@geckopeak4033
@geckopeak4033 2 года назад
Thanks :). Just started learning how to make games
@bodamat
@bodamat 2 года назад
I'm impressed! I really don't mind how I structure my project, but it every time feels messy. Thank you so much for your suggestions
@TheKrensada
@TheKrensada 7 месяцев назад
It is worth mentioning that you don't have to type out the folder in the script window. You can just drag the item from the file system window into the script window. You know...for all those people out there who value their time, and aren't masochists.
@Harald723
@Harald723 7 месяцев назад
I do it the modular way but i seperate them into diffrent modules like entities, assets and levels.
@manofqwerty
@manofqwerty 7 месяцев назад
In my opinion, stick with the modular structure, if you have an NPC and a Player that both use the same assets or other resource, create an actors folder have shared resources in there and then have modular folders for player and NPC that contain only the things that they need. Another alternative is to just duplicate the assets/resources so you have a 1:1 relationship between module and asset. To some, this seems bad but it does allow you to easily update in the future if you decide to change one of the assets for one of the modules. Duplication is not always the enemy and is often not truly duplication.
@AudioBoi1
@AudioBoi1 9 месяцев назад
Great stuff. I like the second way of organising more 😊
@-yahya--
@-yahya-- 10 месяцев назад
by use of composition, the modular approach works best
@geshtu1760
@geshtu1760 Год назад
I keep assets separate like this but I put scripts and scenes together. These always seem to be 1:1 so I'm not sure what benefit there is in having scripts in an entirely separate folder hierarchy. Surely it would be tedious creating a duplicate hierarchy for scripts when Godot defaults to putting them in the same directory. This also helps when reattaching a script to a scene.
@el_primer_y_el_ultimo_caiman
Yeah, there's no need to be so rigid. I like having a core folder for mechanics (base classes, custom resource structures, etc), an assets folder for reusable stuff (skill scripts extending the base one in core, entity scenes, maps...), and a content folder for one-off stuff which bring everything together (missions, dialogue, etc.) aka the actual game
@veto_5762
@veto_5762 Год назад
If you have scripts used by several scenes could be good having a shared folder for them, but yeah for scripts that are only for a single scene like player movement i think is better just let them together with their respective scenes
@connorbushnell7684
@connorbushnell7684 2 года назад
Have you played around with Godot 4 features yet I heard it was out? Also amazing video!
@and1hof
@and1hof 2 года назад
Not extensively yet, that's on my TODO list - when I do I'll make a video with my findings
@vigneshs2886
@vigneshs2886 2 года назад
This is a lot more improved in Godot 4 when it comes to sharing folders because in Godot 4 everything is uuid based but in Godot 3 it's path based
@dinnerchief
@dinnerchief 2 года назад
I love hierarchy one, and always use it
@RobertoMaurizzi
@RobertoMaurizzi Год назад
Hmmm... I just started using Godot last week and this is one of the first problems I can see coming after the usual "how do I" newb stuff... I can't say your video convinced me much 😅 but please correct me if I'm missing something: in addition to the classic hierarchy vs composition problem that can't really be solved without proper component support in the language/engine (yes, I'm a big fan of the ECS approach) in Godot we also have the find nodes from different scenes problem. I'm trying to see how much work would it take to create a dungeon crawler game a friend of mine was making (in GameMaker 😱) when his programmer ran away: up to now Godot was fantastic, with a *lot* of high quality and very useful "nodes" that allowed me to put together a very simple prototype in hours, however I need a split user interface with a 3D area, a minimap, character body, inventory, message area (half the game uses a visual novel approach) and organizing cameras, viewports, their references (as Remote reference or getting nodes in GDScript) make me think this problem doesn't have a good solution, only "less wrong" ones... What are your thoughts and those of the community about this? 😀
@idle.observer
@idle.observer 9 месяцев назад
Great video! I have a clear perspective now.
@user-ge7yi1et5heli4s-b
@user-ge7yi1et5heli4s-b 6 месяцев назад
Create an entities structure and then player and NPCs can both inherit from entitites. TADA! This is the exact reason that Data Structures and Algorithms is still a course in a comp sci degree. Data structure matters.
@kiyasuihito
@kiyasuihito Год назад
Good tutorial. I would say an easy way around cross modular references though, is to follow the single responsibility principle with your assets. The downside is that you bloat the project with copies of the same assets, but I could also see myself changing, for example, the NPC sprites as my development progresses. This way, you can make changes independently. I like the idea of modules like this. This way you can make player controllers and easily reuse them in future projects. 👌
@Infiny92
@Infiny92 Год назад
Loading copies of the same asset a bunch of times in memory doesn’t seem like a good idea.
@PedroBrandesitsme
@PedroBrandesitsme 2 года назад
Pretty good, thank you
@AdimasDuvitra
@AdimasDuvitra Год назад
I love this! Thanks a lot
@deba123ful
@deba123ful 2 года назад
Can you make a tutorial about how to save various game variables and states into a file and load it?
@codexed-i
@codexed-i 2 года назад
I already use the hierarchical one
@badradish2116
@badradish2116 Год назад
see "composition over inheritance".
@OUTSEET-ti1mt
@OUTSEET-ti1mt 2 года назад
cool thanks for tutorial
@justindressler5992
@justindressler5992 2 года назад
This is part of essential development, naming should be a conscious decision in everything you do as a programmer. It is far too easy to take shortcuts when giving something a name and scope. The classic example is 'var x = 1' this is a big mistake and if you get into this habit your game/program will quickly become unmaintainable. There is no such thing a shortcut here if you don't decide what your doing before you create x or define 1 you have already failed. A more creative approach would be 'var playerPositionX = input.x' there is no use of magic numbers or strange temporary variable even if they are local scope. This helps for self documentation. Simply said decide the scope then decide the name before typing a single character. Also avoid acronyms like pPosX this might make sense to you but your co-worker may not immediately known what 'p' or even 'Pos' means. The code should read like a well form sentence. Consider grammar when naming like verb, adverb, adjective noun eg makePlayerCharacterRunFastLeft(). Sometimes you will use set or get as verbs. The second tip is scaffold your code by starting with a bunch of comments describing what you intend to do. Eg '// I need to set player x and y position based on user input from controller, i may need to consider position from keyboard or mouse' by writing this before writing the code you have to think critically about the problem before starting the code. Another hint, is planning even a little bit of planning at the start of the project goes along way like this video discusses choosing how the ten's of thousands of resources are stored at the start saves massive amounts of refactoring at the end. I usually start any project of scale larger than a proof of concept with a design brief. This describes a brief outline in a form of specification then detailed description of each specification and risk mitigation such as im not sure i can use feature x on mobile among other things. One good tool for this is to use markdown and programs like Obsidian. This way your documents are easily readable and searchable by your IDE in the case of Godot and viewable by anyone with a text editor. Naming as discussed in this video does not stop at the variable but continues to the function the class the file the resource this needs to be a conscious and intentional choose. I like using camel casing for variables and functions and caps casing for files and types including classes. All caps for constants with underscore to separate words. This method allows quick searching in many editors for example PlayerCharacterClass can be searched using PCC if the IDE supports it. It should almost be possible to search your entire game by logic alone. Also you must always use version control this is a given in this day but GIT is essential. Don't comment out old code delete it if you commit and manage code in a VCS you can always find the old code and restore it but if your search finds commented out code it will increase your cognitive load.
@Amipotsophspond
@Amipotsophspond 2 года назад
"search finds commented out code it will increase your cognitive load". so first you make good readable code then you comment it out. Then you restructure it to use reusable functions in a less readable way. Then you replace the workings of those functions with optimize code that uses harder to read things like bit-wise, pointers, and other tricks that you have to get in a mind set to read. like ##if a>=b: ## return a ##else: ## return b return a ^ ((a ^ b) & -(a < b)) I think having the old branching commented out code makes the line more understandable, I would much rather have something with too many commented junk then something with too few. if it bugs you, you could just make something to remove those lines from a file and replace them with a ##CommentedLines152to163 that way you can put them back in the right place after you are done. make tools to help your self.
@justindressler5992
@justindressler5992 2 года назад
@@Amipotsophspond Hi I'm not sure i understand what you mean, but commented-out code is prone to errors. For example, you comment out some old code and make changes in the new code but the comment out code does not get updated later you decide to restore the code but any fixes or changes you may along the way, is vary likely to break the old code. This makes the old code redundant along with this reason and the comment above there is no need to keep old code. As for optimizations, naming has zero impact as the compiled code will be using pointers and memory addresses not names. The problem is alot of programmers are taught to take shortcuts, like x and y this shows how bad the education out there is. As there is never shortcuts in programming nothing is free, and assumptions cause bugs.
@thomasbjarnelof2143
@thomasbjarnelof2143 Год назад
Thanks ! After fiddling with the design I often find my self with a lot of assets in the folders that are not used in the actual game. Is there a good way to identify that assets ?
@SCALENE5
@SCALENE5 2 года назад
Do you think that the cross module dependencies in the first method could be dealt with using some type of interface above the specific module level?
@baoinh2968
@baoinh2968 Год назад
thank for share
@Paruthi.618
@Paruthi.618 Год назад
Good one 👌
@wolf7115
@wolf7115 Месяц назад
Fantastic tutorial, but it took me more than 10 minutes to build my game :(
@elxero2189
@elxero2189 11 месяцев назад
That bell... That bell uhhh
@darkexior
@darkexior 2 года назад
Awesome
@4.0.4
@4.0.4 2 года назад
You have a good "youtubable" face so maybe take a bunch of photos and have a folder ready for thumbnails if you'll put your face on the thumb. Just so they're not all the same lol
@soran2290
@soran2290 2 года назад
You need add more zoom
@60b1in
@60b1in 2 года назад
I don't want to design my project structure. I want to design my game. So I made a framework that does such decisions for me. :)
@elxero2189
@elxero2189 Год назад
What's the bell, kind of distracting
Далее
How to Build a Modular Ability System in GODOT
12:46
Просмотров 41 тыс.
10 Things I Wish I Knew Sooner with Godot
10:39
Просмотров 64 тыс.
We made Vampire Survivors BUT in 10 Lines of Code
7:08
How I Organize My 10k+ Line Godot Project!
10:11
Просмотров 33 тыс.
Custom Resources in Godot 4 and How to use them
9:36
Finite State Machines in Godot 4 in Under 10 Minutes
7:16
Build a Top-Down 2D GODOT RPG in 20 Minutes!
19:27
Просмотров 216 тыс.
You're not using Godot to its potential
6:12
Просмотров 89 тыс.
5 Games Made in Godot To Inspire You
4:14
Просмотров 55 тыс.
Every 2D Node Explained in 9 Minutes !
9:19
Просмотров 311 тыс.