Custom Resource are a MUST KNOW in Godot | Complete Tutorial

preview_player
Показать описание
Godot has many amazing features, resources and custom resources being one of those. The ability to create reusable data containers that can be shared all around your project really helps to make workflow in Godot so smooth. Understanding how resources can be used within Godot can really change the way you develop as it helps to keep your project much more organized and simple while also becoming higher quality. In this tutorial I do my absolute best to explain the what, why, and when for resources in Godot, while also walking you through some step by step examples of how to create, and manage resources within a project!! If you have any questions throughout this tutorial please feel free to let me know in the comments below!! I'll be sure to get back to you! Goodluck, and I hope you are able to take something valuable away from this video!

Chapters:
0:00 Intro
0:22 A Complete Overview of Resources (everything you should know)
2:29 Overview of Custom Resources in Godot?
3:19 How To Use Custom Resources - The Basics (step by step)
15:57 Custom Resource - Enemy Example (step by step walkthrough)
30:35 Finial Advice about Resources in Godot

Thank you so much for watching, I really hope this video helped.

if you did enjoy or this video was helpful then all I ask is if you could please subscribe to help out the channel. It means so much and I love your feedback in the comments. I’ll look forward to getting back to you soon! Again thanks so much and I would love to see you again!

These Tutorials take a lot of time to create and I’m working on becoming a better Teacher and learning how to explain Godot things in a better way, if you’d like to support this journey to expand knowledge and help other game dev’s learn to create their own games then please.. Become a Member! It would mean the world and you’ll help me out so much! Thank you!

have a great rest of your day and of course be safe :)

- thanks DevWorm
Рекомендации по теме
Комментарии
Автор

One additional thing, you can use the class name as the type of the resource. This way you have auto complete working. So instead of var resource : Resource, you can do var resource :calc_resource

nadadenadak
Автор

Great video.

Just a couple of comments. I am not sure why you use the numeric value for the enum in your match-branches, you can use the named value `ADD`, `SUBTRACT`, etc, in the match-branches, that allows the code to keep working even if you change the internal order of the enum or add more enum entries.

Also, when you add a class_name to the resource by extending it, you can accept the derived type in the scripts instead of getting a `Resource`, which will give you completion on the type, and make sure a generic resource isn't assigned to the class making it fail at runtime.

larsthomasdenstad
Автор

Thanks DevWorm! This video dropped when I was coming around to the idea of using resources to solve some of my level data problems, but most videos out there were like “they’re great!”. You showed us how to use them! Much appreciated!

Drewbacca
Автор

Nice! Btw you can also export the color to get a color picker in the resource ;)

TobbeyDude
Автор

wake up babe, new DevWorm tutorial just dropped.

ishanj
Автор

I've been trying to understand how to set up a system using resources from a previous tutorial and wasn't quite understanding it until your video, so thank you so much for this, I appreciate it!

trevorbrowning
Автор

Thank you for the walkthrough tutorial about resources. Hope you can continue doing more of these type of tutorials.

desireelustre
Автор

DevWorm, dude! Thanx for your time and effort you put in to this videos. I'm so great full. I just started with "dev", have never done something like this befor. But your videos rely helps me understand better and easy. Thanx <3

Hectorius
Автор

Yo, thanks a ton for this tutorial, dude! I've seen a handful of Custom Resource tutorials floating around in my recommended here and there, and while I've been able to understand the *point* of Custom Resources, I feel like this video easily did the best job at helping me actually see how you'd use them in practice.

As a new, aspiring game dev learning Godot, thank you! Between learning this and how to use components vs. inheritance effectively, I feel like this will help a lot with my own projects. The more I can keep things clean and modular and reusable, the better lol

BetaNights
Автор

The best thing I love about resources is you can nest them with local resources. I can make an Effect resource and just add new instances of Affect resource and modify them there locally

moose
Автор

hi! your videos are super helpful with getting started on godot and they really taught me how to get some basic stuff made in the engine, so tysm for that!
i was also wondering if maybe you had any tutorials on making a turn based combat game that's got randomly spawned fights in certain areas, but other areas with no spawning (kinda like the bushes in pokemon)? also if it had different in-battle menu's that led to like a regular attack, one that led to another small menu with different magic consuming attacks, and also a run function. i've been struggling a lot with trying to find something that could help me with making something like this as most tutorials i've seen have just had the bare minimum that doesn't really expand much.
anyways, your vids are incredible, keep up the great work :)

soozlethay
Автор

I like your example of using resources to customize a single enemy scene to have different types of enemies.

However adding enemies to a level is now a two step-process: adding the enemy scene itself to the level, then assigning the type resource to turn it into the enemy type you want. Which is perfectly fine if you're spawning enemies at runtime but when hand-editing levels I'm wondering if it's possible to combine these two steps.

ZaranTalaz
Автор

Yoooo! Feels like ages since you last dropped! Great video btw!

AverageNeovimEnjoyer
Автор

Could you make a video on how to incorporate limboai state machines with the behavior trees?

MrCoolguy
Автор

Can you make a video about multiplayer?

kjjrbk
Автор

Mulitply! Every time you listed or mention the enums I was hoping you would reach the multiply one, but you always stop at the division, but then you select it and still didn't notice! You really were focused on explaining the Resource 😂. Thank you very much!

Gurkgamer
Автор

Literally put out a video of the actual thing I was looking for.

zoltanrobertlovas
Автор

for real this can change life thanks for it

Lowwaels
Автор

This is nice. Came after I really started learning about Resources so not really useful for me, but would've ben great as a beginner (though I do wonder if I would've understood it as well as I do now).

Currently making a game with a modular map layout that uses scenes to represent rooms that could be aligned to each other in a grid and in that system I have a resource script to define a few things about the room, scene file that holds everything visual as well as handles any random toggles I have (like whether or not a door is open, what location it is, any variances beacuse of it, etc.) a dictionary of vector2 keys to define the grid it aligns to (for fitting rooms into a generated map) and the doors it potentially can have in a given 'cell' for the room (also for generating the rooms in a map). I might put more into the resource, but that's how it is for the time being.

Kio_Kurashi
Автор

Hey, dude, nice job. Will you make a slide mechanic mechanic in the future?

ParsaGohari-ok