How to use Resources in Godot 4

  Рет қаралды 11,809

Bitlytic

Bitlytic

Күн бұрын

Пікірлер: 58
@ItsEphora
@ItsEphora 19 күн бұрын
With the new typed dictionaries coming in 4.4, resources are gonna be even better
@soulsmanipulatedinc.1682
@soulsmanipulatedinc.1682 15 күн бұрын
@@ItsEphora Typed Dictionaries? Oh, man. I need that in my life.
@Mirr0r_or_Miro
@Mirr0r_or_Miro 12 күн бұрын
what is this?
@soulsmanipulatedinc.1682
@soulsmanipulatedinc.1682 12 күн бұрын
@@Mirr0r_or_Miro Dictionaries that are typed.
@soulsmanipulatedinc.1682
@soulsmanipulatedinc.1682 19 күн бұрын
8:07 You can also toggle the "local to scene" exported boolean, in the base class of Resource, to do this for you.
@Bitlytic
@Bitlytic 19 күн бұрын
Very good point, forgot to mention that
@leejesm
@leejesm 19 күн бұрын
Did you mean 7:07?
@soulsmanipulatedinc.1682
@soulsmanipulatedinc.1682 19 күн бұрын
@@leejesm No, I mentioned 1:54. Thank you. Sorry for the confusion.
@georgepitoy5426
@georgepitoy5426 17 күн бұрын
I've seen a lot of Godot code and your repo might be the cleanest complex Godot project I've ever seen. Great video, thank you.
@completelyrandomlyhandlee
@completelyrandomlyhandlee 40 минут бұрын
i think you did a very good job with your pacing and the application of the Feynman technique. Great video!
@completelyrandomlyhandlee
@completelyrandomlyhandlee 36 минут бұрын
your trick to change the file colors is amazing btw! always learning something new! they really should allow you to this with scenes in the tree.... it looks very clean w/ the files
@ShinSpiegel
@ShinSpiegel 19 күн бұрын
Great video, nice that you have also provided a base project as example. Thanks for sharing.
@Felipe_2097
@Felipe_2097 18 күн бұрын
Your videos have been incredibly helpful! I recently started with video game development to later dive into modding for a jam that caught my attention, and your content has provided some really important insights. I hope you keep uploading more videos!
@foorman2837
@foorman2837 15 күн бұрын
For anyone who doesent know(i found out after messing with resources after this vid❤) You can set up your sprite frames in the animatedsprite node and just save the sprite frames (which are also a resource) and you have all your frames with fps set up for easy assignment down the line😊
@giantneuralnetwork
@giantneuralnetwork 19 күн бұрын
Hey awesome video! Love how you show the concept and show it in use in such quick succession. It really helps keeps the main idea clear!
@FeyFen
@FeyFen 17 күн бұрын
Thank you so much for your AWESOME tutorials! They are so helpful and well explained.
@Trance_
@Trance_ 19 күн бұрын
Great videos, keep em coming. I started learning Godot from 0 (no coding experience) a month ago and your videos have been really helpful.
@Break.
@Break. 13 күн бұрын
wow I really just designed and created an item/inventory/crafting system over the past week and then saw your video just now 😭
@Canyyon
@Canyyon 11 күн бұрын
What is the point of doing this instead of composition with nodes? You can also use ready and process methods with those too
@mazander_man
@mazander_man 19 күн бұрын
Excellent explanation happy holidays dude
@njdarda
@njdarda 19 күн бұрын
your presentation is exquisite
@Evitrea
@Evitrea 17 күн бұрын
Godot editor really needs to put more UX work for Resource, like you can't even batch edit the resources from the same Class...
@GoblinArmyInYourWalls
@GoblinArmyInYourWalls 19 күн бұрын
Youve got a new sub from me, great video quality
@tower1990
@tower1990 12 күн бұрын
Killer tutorial as always
@noelsanso1033
@noelsanso1033 13 күн бұрын
Nice video :) what if we want to have different attack types as a Resource. Let's say some enemies attack by shooting in 8 direction and some apply some AOE damage around them. Do you think it's alright to add the logic on how they attack inside a resource as well? So in the enemy_stats we could have the attack type which is another resource which contains the methods that know how to attack? This means we would have AEO_Attack.res and Bullet_Attack.res for instance. If the answer is no, how would you approach something like this, would you simply have an enum in the enemy_stats resource and then a bunch of if else checking what to do base on the attack type? (this will grow like crazy if we keep adding more attack types). Would you create different Scenes for enemies with different attack? Doesn't make much sense if the only difference is how they attack... so in my head it makes sense to have the attack type as a configurable resource but would like to know your take on this! Thanks! And have a happy new year
@ErDev2
@ErDev2 17 күн бұрын
this is what i need, thanks
@fvhaudsilhvdfs
@fvhaudsilhvdfs 19 күн бұрын
if you had an enemy type for which it made sense to use custom resources (like the dinos), but because the sprites were significantly different you needed a unique CollisionShape for each enemy, how would you handle that? would you draw the collision shape in the scene editor and then save the collision shape resource somewhere, and have the enemy load its corresponding collision shape in _ready()? that's the only method i can think of, but it seems somewhat cumbersome.
@Bitlytic
@Bitlytic 19 күн бұрын
Yeah the stats are much more generic, or for enemy variations of the same type
@fvhaudsilhvdfs
@fvhaudsilhvdfs 19 күн бұрын
@@Bitlytic thanks for the reply (and the great video). would you also handle the unique collision shapes the way I described?
@wasteurtime5677
@wasteurtime5677 19 күн бұрын
​​@@fvhaudsilhvdfsuse the node scenes to handle different collisions. The resources are better for holding data only. He talks about compositon in a different video. kzbin.info/www/bejne/bWXcZ62Nj8uEgc0si=ps7zq5MtC7u5tzJ4
@Bitlytic
@Bitlytic 19 күн бұрын
​@@fvhaudsilhvdfs If you want unique collisions, you could define a scale in the stats and change the scale of the shape based on that, or load in and swap the shape from the stats like you mentioned. To be honest I would probably go with a hitbox scale, since the games I'm making are 2d and most if not all enemies will use a circular shape
@smokelingers
@smokelingers 13 күн бұрын
If they're significantly different, they should probably occupy their own scene. For example, you want a flying enemy to be rendered above ground enemies, and also not be hit by an attack like a ground slam, so they need to be on a different collision layer, then I'd save a copy of the enemy scene for flying enemies and be done with it. If only one enemy needs three collision shapes and its own light source, I'm making it its own scene. To do all of that in code sort of defeats the purpose of resources, I think, so it depends how significant the differences are. But of course they can still all use a generic stats resource that contains their health, damage, movement speed, and their loot values, etc.
@Gonzomat0
@Gonzomat0 19 күн бұрын
Hey, great video! Are there any other benefits of using an item stack class unless the settings for adding up items and setting the min/max values and so on?
@nickmuffin8186
@nickmuffin8186 19 күн бұрын
I love the videos! Learning Godot from Unity has been a difficult shift in workflow. I just watched your video about component based design, and it looks you still use components in the reference project, but how do you decide what stays in the component and what data gets moved to a resource? Health specifically was one I could not understand why the information couldn't stay and be modified inside the component. Does this just save you from having to have multiple enemy scenes or am I not understanding the application? Happy Holidays
@furuthebat
@furuthebat 19 күн бұрын
This is all good until you have more complex data and nested arrays or need to edit arrays in the Resource Editor. I also use a mix of Resources and jsons
@AgriasOaks99
@AgriasOaks99 19 күн бұрын
Why?
@Bitlytic
@Bitlytic 19 күн бұрын
The resource editor can be really annoying if you have nested resources yeah, but I personally find it better for editing visually than json
@watatitamf1598
@watatitamf1598 19 күн бұрын
I am badly need godot custom editor tutorial. Editing and tweaking data causes so much headache with default editor
@rremnar
@rremnar 17 күн бұрын
The problem is, resources require all its variables and even itself to be embedded into the property editor using the @export variable. I have tried to create a custom resource by calling MyResourceClass.new(); but for some reason it doesn't work with the ResourceSaver. There are no errors but you wind up with a resource file with no fields. Theoretically, it should have worked. This is what pisses me off about Godot, that you do something logical, with no errors and it doesn't work; because you had to do it in a very specific way, which makes little sense. It makes no sense that you have to embed a resource and its variables, in the editor, for it to work. I was thinking of using JSON as an alternative, but I got the bloody thing to work, using the same technique as in every resource video.
@AlyceIsFree
@AlyceIsFree 14 күн бұрын
@@watatitamf1598 Join the server, we'll teach you
@Thisisitboys
@Thisisitboys 19 күн бұрын
This guy is OP.
@Bitlytic
@Bitlytic 19 күн бұрын
Shh, don't make the devs nerf me
@itssherif9777
@itssherif9777 15 күн бұрын
How are your folders coloured?
@Bitlytic
@Bitlytic 15 күн бұрын
4.2+ you can right click and color folders
@Lulink013
@Lulink013 19 күн бұрын
How did you color code your file explorer in Godot?
@Bitlytic
@Bitlytic 19 күн бұрын
In 4.2+ you can right click the folder and set a color
@MassiveBreaker
@MassiveBreaker 19 күн бұрын
Hey Bitlytic, always interested in the visuals of the videos, what program do you use for all of the graphic and smooth movement during editing?
@Bitlytic
@Bitlytic 19 күн бұрын
Motion Canvas! It's a js framework for motion graphics, made by fellow gamedev youtuber Aarthificial, you can find it here: motioncanvas.io/
@MassiveBreaker
@MassiveBreaker 19 күн бұрын
@@Bitlytic Wow, this is a sick program, thank you!
@nauro9187
@nauro9187 19 күн бұрын
IM HERE
@monarch1360
@monarch1360 19 күн бұрын
what do you use for animation your video really love the look of it
@brahillms1374
@brahillms1374 19 күн бұрын
motion canvas
@Jwduth
@Jwduth 19 күн бұрын
8 minute Andy alert (peak video btw)
@Bitlytic
@Bitlytic 19 күн бұрын
:rivboowomp:
@SeanBotha
@SeanBotha 15 күн бұрын
Godot cm. Only woke can develop and play games developed in godot(cutting customers in half) Ceo:anyone that say keep politics out if game engines are toxic. Do not use godot EVER
@Bitlytic
@Bitlytic 15 күн бұрын
What the fuck are you on?
@AlyceIsFree
@AlyceIsFree 14 күн бұрын
Waaaaaahhhh, CM made a joke waaaaaah. Funny, cause ya'll call lefties soft, and unable to take a joke. Wassup snowflake, a little queer respect scare you?
@AlyceIsFree
@AlyceIsFree 14 күн бұрын
Also, this show's what kind of person you are, to ignore a developers work, simply for the engine they worked in, but then again, you lot are used to hating demographics eh
Custom Resource are a MUST KNOW in Godot | Complete Tutorial
32:10
Modular Upgrades Made Easy Using the Strategy Pattern
6:41
Bitlytic
Рет қаралды 94 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Why Animation Trees in Godot 4 are Unbelievably Useful
7:28
Bitlytic
Рет қаралды 26 М.
LÖVR -- The Easiest 3D Game Engine?
11:39
Gamefromscratch
Рет қаралды 31 М.
How Do Game Devs NOT Overscope??
9:04
Green Light Dev
Рет қаралды 13 М.
Building the Wobbly Physics of Crunda
10:03
Dananabread
Рет қаралды 43 М.
The Problem With Procedural Generation
17:57
Acerola
Рет қаралды 307 М.
Game Math is easier than you think.
6:46
Bitlytic
Рет қаралды 14 М.
5 Games Made in Godot - NEW 2025 Format
13:35
StayAtHomeDev
Рет қаралды 17 М.
Draw fewer tiles - by using a Dual-Grid system!
6:22
jess::codes
Рет қаралды 765 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.