Resources in Godot Are Amazing

  Рет қаралды 63,893

Chaff Games

Chaff Games

Күн бұрын

Пікірлер: 81
@Chaff_Games
@Chaff_Games Жыл бұрын
Check out the full FPS Course: kzbin.info/aero/PLhnGgh9GDmn5DRLPnIlPRPS8ci5GnAsvO
@kardrasa
@kardrasa Жыл бұрын
First week of learning games, I have no idea what he is talking about but I feel productive
@Chaff_Games
@Chaff_Games Жыл бұрын
Well it took me 2 years of using Godot before finding out about resources so even if you don’t fully understand, the memory may help you when the time come.
@youessmati3806
@youessmati3806 Жыл бұрын
Well it took me 2 years of using Godot before finding out about resources so even if you don’t fully understand, the memory may help you when the time come.@@Chaff_Games
@theohallenius8882
@theohallenius8882 Жыл бұрын
Pretty good explaination, as someone who have been with the Godot since it was announced, I kept saying that once you understand the relationship between nodes and resources - everything else will click.
@toby818
@toby818 Жыл бұрын
So if I’m understanding this let’s say I wanted to make a characters stats like health and shield should it be a resource
@Chaff_Games
@Chaff_Games Жыл бұрын
As always, it’s going to depend on the project and the complexity of the scene you’re working with.
@toby818
@toby818 Жыл бұрын
@@Chaff_Games it finally clicked i understand EVERYTHING!!!!
@viniciusantonio2253
@viniciusantonio2253 Жыл бұрын
for unity devs, this is just ScriptableObjects's brother, right?
@gerhardtdebeer560
@gerhardtdebeer560 Жыл бұрын
Yip, Godot just has a different name for it :D
@guilhermealmada1791
@guilhermealmada1791 Жыл бұрын
Yes, but unlike in unity, they have sub resources
@the-guy-beyond-the-socket
@the-guy-beyond-the-socket Жыл бұрын
Yes but in godot you dont have choise to not use scriptable objects, and funny enough its the upside cuz it teaches to manage project resources.
@maxdroulez7305
@maxdroulez7305 Жыл бұрын
It’s better : resources fields can be edited directly in the inspector.
@wiechciu0
@wiechciu0 11 ай бұрын
But you can edit the properties of SO in the Unity's inspector too...
@Ceisriel
@Ceisriel Жыл бұрын
i needed this yesterday, i was literally searching for it, thx for making the video so youtube could reccomend it to me
@Chaff_Games
@Chaff_Games Жыл бұрын
Awesome glad to be able to help 😊
@TheRealKaiProton
@TheRealKaiProton Жыл бұрын
I recently completed Code Monkeys free Unity course, and the recources seem to work like Unity's Scriptable Objects,
@Chaff_Games
@Chaff_Games Жыл бұрын
I heard that. I've never worked with Unity long enough to get into Scriptable Objects.
@philnewberryls
@philnewberryls Жыл бұрын
Super nice breakdown there! Resources seem like a real power-house ready to be exploited, but I haven't seen a use case demonstrated yet. This video was my answer ;D Thanks! And good vid! ;D
@Chaff_Games
@Chaff_Games Жыл бұрын
😊 thanks
@MrVbarroso
@MrVbarroso Жыл бұрын
Here is a use case :) kzbin.info/www/bejne/jGicipSYhr92Z9U
@wildbanana5527
@wildbanana5527 8 ай бұрын
I don't understand why I have to see 48 seconds of random intro, only to have to pause between the actual instructions that are shown within miliseconds
@Chaff_Games
@Chaff_Games 8 ай бұрын
🫡
@Sunrymoon
@Sunrymoon 2 ай бұрын
I doubt this was a tutorial even tho the tags say so,it was much more an explanation
@shukhambalie3936
@shukhambalie3936 4 ай бұрын
From what I understand. Resources is same as component? Or is there any difference between the 2? I created my fps game and use node as component for my "Upgradable". For example, for my shotgun, it can be upgraded to explosive shotgun that stick to the wall or enemy for certain second before explode. And it can be simply add the node to the "Bullet" node via the code itself. Is there any difference or advantage to use resource?
@KDD0063
@KDD0063 2 ай бұрын
I don't get how to assign a resource in code. Everyone shows dragging and dropping a resource into the inspector, but I want to have a character script that has a resource assigned to it by code, because it will be changing multiple times during gameplay. Anyone know what I mean?
@Chaff_Games
@Chaff_Games 2 ай бұрын
It does not need to be loaded via an export variable. You can just load it in code as well “ var some_resource = preload(the_path_to_the_resource) “. Is that what you mean?
@KDD0063
@KDD0063 Ай бұрын
@@Chaff_Games yes thank you! except i think i need to use load not preload
@dconworld
@dconworld 8 ай бұрын
I'm just in the process of creating a character controller, and it's working very well now. Anyway, I wanted to add in the ability to equip weapons, and wasn't quite sure how best to do it in godot... I skimmed reddit and saw someone mention resources. The docs didn't quite bridge the knowledge gap for me, so I checked out this video- and yes, it's exactly what I need. Thanks for the quick 5 minute demo, now I know that this is the right feature to use for what I need.
@brucelee7782
@brucelee7782 8 ай бұрын
so it's like a dictionary but you are exporting it?
@Chaff_Games
@Chaff_Games 8 ай бұрын
It’s like dictionary plus the added bonus of being able to execute code and typed variables that you can enter into the editor.
@AgentChick
@AgentChick Жыл бұрын
Wait, I'm a bit confused, what is actually the difference between classes and resources, and under what circumstances would classes actually be more appropriate to use?
@Chaff_Games
@Chaff_Games Жыл бұрын
The first thing that comes to mind, is that resource can’t be placed in the scene tree. So in a case where whatever you’re working with is pure data a resource maybe more appropriate. But if it needs to be in the scene tree, perhaps you extended the rigid body class for a common object in your game, then it’s a class.
@AgentChick
@AgentChick Жыл бұрын
@@Chaff_Games The thing I'm confused about is that in the video, you say that your weapons are pure data, but then they're also objects in the game, which fits my idea of a class better. Are you using both a Weapon resource and class to make the weapon objects, or do you just have one weapon object that loads data from the resource upon spawning? For example, the class would be a generator for the weapons, that draws the data from a resource similar to how you would use arrays in other languages.
@Chaff_Games
@Chaff_Games Жыл бұрын
@AgentChick Oh I see, I have a simple node3d that reads the data and controls that state (current weapon). The state machine does all the lifting, it tells the animation player what animation to play and when damage ray casting ect, the resource is behind that feed the manager the data. So basically yes, it could be it’s own class, weapon manager or something like that. What the resource allows me to do is have a single script that controls what weapon I’m using and what it should do, since it’s always querying the resource for that information first. So if I want a new weapon I just need a set of animations and a new resource, because the behaviour is already defined. If you want to learn more I have a series that I’m going through showing how to make exactly this and you can also download the project and check it out. If you’re curious about how this would look as a full class system rather than resource based. My old 3.5 fps template did that instead. It’s not as good, but it can totally be done that way if you want.
@AgentChick
@AgentChick Жыл бұрын
@@Chaff_Games Ah, that clears things up, thanks!
@valley-artifact
@valley-artifact 10 ай бұрын
you don't need to store the names of all the animations in your gun resource, it looks like you could just infer them from the name since all the ones shown onscreen follow the same simple pattern: ("name" + "_" + "the type of animation"). the video was helpful btw, thanks for making it.
@Chaff_Games
@Chaff_Games 10 ай бұрын
I actually did do that back in 3.5 but opted out to allow for more flexibility. When I’m prototyping my naming schemes are all over the shop.
@blazenetic
@blazenetic 10 ай бұрын
Wew! Very well made, thank you!
@torrescle
@torrescle 11 ай бұрын
Backing in Godot 3.x I was looking for it.
@wenerd5692
@wenerd5692 8 ай бұрын
I recently tried to understand how to transfer resources over the network, through the godot multiplayer, but I still did not understand ( I had to parse the resource into a dictionary and transfer it in this form. Maybe someone has faced a similar problem, how did you solve it?
@Chaff_Games
@Chaff_Games 8 ай бұрын
I've never tried but I would do the exact same thing.
@DuarteRoso
@DuarteRoso Жыл бұрын
They are indeed. Use them extensively
@Gwizz1027
@Gwizz1027 Жыл бұрын
great tutorial!
@Chaff_Games
@Chaff_Games Жыл бұрын
☺️
@demiqas254
@demiqas254 8 ай бұрын
So resources can be godot's way of doing enumerators?
@Chaff_Games
@Chaff_Games 8 ай бұрын
Think scripted objects on unity
@SamOakwood
@SamOakwood 10 ай бұрын
So resources are shared among multiple nodes. But for example, if i wanted to create a multiplayer game, where each player has different stats, should i still use resources and how would I make them be individually changeable without changing all others?
@Chaff_Games
@Chaff_Games 10 ай бұрын
I’ve not looked at multiplayer for a long time. But if I was going to do multiplayer. The player stats would probably held on the server in a database. Then when the player logs on you would query the database and get the stat as required. You could have a resource on the client side that you could populate with those stats at log on and periodically check to make sure that they’re the same to reduce queries.
@SamOakwood
@SamOakwood 10 ай бұрын
@@Chaff_Games yeah with persistent stats, databases or rest interfaces would be best, but I rather meant things like player stats such as damage per shot or collected power ups that don't need to be persistent and are discarded after the round...
@the-guy-beyond-the-socket
@the-guy-beyond-the-socket Жыл бұрын
So with resources its very easy to make games with mod support?
@Chaff_Games
@Chaff_Games Жыл бұрын
I’ve never tried. But I could see their utility.
@indierusty
@indierusty Жыл бұрын
Exactly what i needed. ❤
@catafest
@catafest Жыл бұрын
can be resources created with C# in Godot?
@Chaff_Games
@Chaff_Games Жыл бұрын
Sorry I’m not sure. I would assume so, but you never know with mono.
@TMHedgehog
@TMHedgehog Жыл бұрын
@@Chaff_GamesThey can, I've literally just done one!
@LookjaklooK
@LookjaklooK Жыл бұрын
I'm curious if a ScriptableObject as Architecture is possible with Godot Resources, that work just like in the Ryan Hipple talk. I know it's more of a Unity thing, but can it be applicable in Godot in some way?
@Chaff_Games
@Chaff_Games Жыл бұрын
I’m honestly not sure it’s been years since I used Unity. Godot is very flexible however, it’s likely possible to do.
@raulzilla
@raulzilla 11 ай бұрын
In the video it sounded just like Scriptable Objects and since it can also have methods, then it might really be just like scriptable objects.
@LookjaklooK
@LookjaklooK 11 ай бұрын
@@raulzilla Well, I couldn't figure out how to implement the SO architecture using them,
@SangeethSSanthosh-t2p
@SangeethSSanthosh-t2p Жыл бұрын
how do you quickly load the game when start pressed (f5), it takes me 30 sec . can you please guide me...please
@Chaff_Games
@Chaff_Games Жыл бұрын
Hey there, sorry to disappoint you but it’s just edited. I do experience a wait but it’s just going to depend on your hardware, I don’t think there’s anything you can do.
@sheppowed4483
@sheppowed4483 Жыл бұрын
do you have a corsair keyboard ?
@pingvin9166
@pingvin9166 Жыл бұрын
You can save your scenes in scn format instead of tscn. Scn is a binary way to save scenes, tscn is textual, this should speed up the launch of the project in test mode.
@sheppowed4483
@sheppowed4483 Жыл бұрын
because i noticed my godot is slower if the RGB on my Corsair K55 RGB is controlled by a software on the PC , the fix is to unplug / plug the device from the computer
@Chaff_Games
@Chaff_Games Жыл бұрын
That’s so weird I wonder what causes that
@ClayTheFoxx
@ClayTheFoxx Жыл бұрын
KDE PLASMA FTW!
@Chaff_Games
@Chaff_Games Жыл бұрын
Yep, my DE of choice. Can’t go wrong.
@ClayTheFoxx
@ClayTheFoxx Жыл бұрын
@@Chaff_Games same)
@ClayTheFoxx
@ClayTheFoxx Жыл бұрын
I am obliged to say “I use arch btw”
@Chaff_Games
@Chaff_Games Жыл бұрын
@@ClayTheFoxx Nice! I want to make the switch but this Manjaro build has been really stable and everything is set up. I used to be more gallivant switching distros but since I started development, I'm a little more cautious switching.
@morten940
@morten940 10 ай бұрын
Nooooo. TOTK spoiler
@Chaff_Games
@Chaff_Games 10 ай бұрын
Zelda dies…
@morten940
@morten940 10 ай бұрын
@@Chaff_Games aaaahh
@gerhardtdebeer560
@gerhardtdebeer560 Жыл бұрын
Congrats on the patron launch :D, resource creation is a very powerful tool especially if you want to make swap-able objects and if non programmer(s) (artists, writers and etc) are helping on the game creation they can swap out pieces of the game for testing and so on without touching your code base. It should be mentioned that resource creation using C# does not work. Cool vid and keep up the great work!
@FloMinicHD
@FloMinicHD Жыл бұрын
The following video explains how to do it in C# as well - haven't tried it out myself though: kzbin.info/www/bejne/r4bQimZ9npita7c If you are like me and don't want to klick links a random person on the internet sent you, the video is called "Creating custom resource types [Godot/C# Tutorial]" and made by "Mina Pêcheux"
@principleshipcoleoid8095
@principleshipcoleoid8095 Жыл бұрын
Hmm. Godot looks like a nice engine, but I guess bevy's simplicity and Rust is what stole me. ESC seems a bit simpler to me.
@Chaff_Games
@Chaff_Games Жыл бұрын
I had done a course in Unity before changing to godot. I never made a game in Unity so I sort of count Godot as my first serious game engine. And in a way this made it easier for me to click into the Godot way of doing things rather than having to re wire my brain to work with a different system. At the end of the day the best tool is the one you feel most comfortable with.
Classes In Godot Are Amazing!
19:22
Chaff Games
Рет қаралды 25 М.
I Made Soul Knight, but It's in 3D
9:26
Zach Ji
Рет қаралды 105
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 24 МЛН
Spongebob ate Patrick 😱 #meme #spongebob #gmod
00:15
Mr. LoLo
Рет қаралды 19 МЛН
OYUNCAK MİKROFON İLE TRAFİK LAMBASINI DEĞİŞTİRDİ 😱
00:17
Melih Taşçı
Рет қаралды 12 МЛН
Throne and Liberty - Best Dagger & Greatsword Build! Best DPS!
12:12
Custom Resources - A Godot Workflow GAME CHANGER
4:44
Pefeper
Рет қаралды 177 М.
Signals in Godot are Amazing!
5:17
Chaff Games
Рет қаралды 29 М.
Why Slopes are Shockingly Difficult for Indie Game Devs
17:20
Inbound Shovel
Рет қаралды 153 М.
Immersive Sim in Godot 4: COGITO - Overview
8:22
Philip D
Рет қаралды 42 М.
Small games win big, here's how to make them
14:59
BiteMe Games
Рет қаралды 18 М.
I Made Minecraft in Godot
28:36
RachelfTech
Рет қаралды 54 М.
Godot Scripts I add to Every Game
12:34
Aarimous
Рет қаралды 20 М.
Basic Inventory System [Part 1] - Godot 4.x
12:02
Bonkahe
Рет қаралды 3,3 М.
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 24 МЛН