hey great video! it was quite helpful and explained well. i do have one relatively minor thing to say though: i heard that using resources for save and load can actually like leave vulnerabilities for modders since they can 1. access your entire computer not just the game and 2. can run code, so anyone copying code from the internet into the resource can get their whole computer hacked if they don't know what they're doing (which is likely if they're copying code from the internet). so its probably better to use json for save/load systems unless godot changed something abt how resources work recently.
i didnt see so much difference using a resource vs not in this example but i understand probably in more complex games this will be very usefull, Thank you very much for you clean explaination. u got a new suscriber :)
Hey man, topic well covered but I had to struggle through the video due to the cartoon font and distracting background music! Small feedback from someone who found your video helpful: For programming tutorials, music with drums(snare and high-hats) is best avoided as they take attention away from the content and sonically compete with speech. Music with soft synth chords without percussions and rapid changes is a better fit as it truly stays in the background.
I am trying to understand what is the difference between using resources (in your example) and using a custom node to control the stat. Is there any advantage I am not seeing?
With the example in the video, since it is quite simple, I see how it can be hard to visualise a huge difference. But the difference is in the pattern. A node is an actual instance of something that only exists in the world. A resource is a data container that exists outside of the world and can be used by node and passed around. For example, in my game Basterd Blitz (store.steampowered.com/app/2275000/Basterd_Blitz/), I have a node called weapon, which I instantiate and add to the world in the hand of my player. But I have a custom resource for the configuration of the weapon, that being model to spawn, fire rate, animation, sound and etc. So for example, I can create a new weapon called "Machine Gun" with all the information about the gun using my custom resource and now I can give the same gun to my player and an enemy, without have to add or create an extra node for each gun in each character. I hope I explained clearly.
This video helped me a lot but I am still unsure about naming/hierachies and the relation to Nodes. Maybe someone can help out. I am creating a game with cars driving around a track and for every car I have a Node2D called "Car" with a Sprite within and a script attached. Based on this video and what I learned before I would create a script that extends resource called "Car.gd" in which I do "class_name Car" and define some variables witi @export var max_speed: float = 300.0. Then I create a resource called "sports_car.tres" based on it. Then I can do "@export var car: Car" in the script attached to the Car Node2D and access the variables with "car.max_speed" for example. What I don't like is the naming. Within the Car Node2D I would like to have a "speed" variable and not a "car.max_speed" variable because I am already "inside" the car. Also, runtime variables like "current_speed" I would then define in the script attached to the node, right? But then I would have "current_speed" (without "car.") and "car.max_speed". Maybe someone can help me think through this.
This is a really good example of resources, and really food job showing what you couldnuse the resources for
Thanks! I am glad it helped!
Great tut! Thank a lot!
Background music was unneccessey. The video is good.
Thanks for the tip! And thanks for watching!
Also the keyboard sound is a bit distracting. Haha
@@tower1990 Nah that stuff is like ASMR in programming tutorials
Great tutorial. Thank you very much. Keep up the good work.
You are welcome! :)
I've instantly recognized the Brazilian accent, great video man.
Obrigado!!
Super solid video!!
hey great video! it was quite helpful and explained well. i do have one relatively minor thing to say though:
i heard that using resources for save and load can actually like leave vulnerabilities for modders since they can 1. access your entire computer not just the game and 2. can run code, so anyone copying code from the internet into the resource can get their whole computer hacked if they don't know what they're doing (which is likely if they're copying code from the internet).
so its probably better to use json for save/load systems unless godot changed something abt how resources work recently.
i didnt see so much difference using a resource vs not in this example but i understand probably in more complex games this will be very usefull, Thank you very much for you clean explaination. u got a new suscriber :)
Thanks! I appreciate it! I’ll try to make a video explaining a more complex example in the future.
a huge point probably is that you can save resources on the disk
I need to get a giant monitor just so i can follow videos like these
Sorry about that. Ill improve the resolution next time.
Hey man, topic well covered but I had to struggle through the video due to the cartoon font and distracting background music!
Small feedback from someone who found your video helpful:
For programming tutorials, music with drums(snare and high-hats) is best avoided as they take attention away from the content and sonically compete with speech. Music with soft synth chords without percussions and rapid changes is a better fit as it truly stays in the background.
Thanks for the feedback! I'll definitely take into account for next videos.
Thank you sir!
I am trying to understand what is the difference between using resources (in your example) and using a custom node to control the stat. Is there any advantage I am not seeing?
With the example in the video, since it is quite simple, I see how it can be hard to visualise a huge difference. But the difference is in the pattern. A node is an actual instance of something that only exists in the world. A resource is a data container that exists outside of the world and can be used by node and passed around.
For example, in my game Basterd Blitz (store.steampowered.com/app/2275000/Basterd_Blitz/), I have a node called weapon, which I instantiate and add to the world in the hand of my player. But I have a custom resource for the configuration of the weapon, that being model to spawn, fire rate, animation, sound and etc. So for example, I can create a new weapon called "Machine Gun" with all the information about the gun using my custom resource and now I can give the same gun to my player and an enemy, without have to add or create an extra node for each gun in each character.
I hope I explained clearly.
Great content and really covered a lot of details in a short time. Please remove music in the future though, quite distracting.
this is really helpful thank you
Thanks! Glad to help out!
awesome
Thanks
This video helped me a lot but I am still unsure about naming/hierachies and the relation to Nodes. Maybe someone can help out. I am creating a game with cars driving around a track and for every car I have a Node2D called "Car" with a Sprite within and a script attached. Based on this video and what I learned before I would create a script that extends resource called "Car.gd" in which I do "class_name Car" and define some variables witi @export var max_speed: float = 300.0. Then I create a resource called "sports_car.tres" based on it. Then I can do "@export var car: Car" in the script attached to the Car Node2D and access the variables with "car.max_speed" for example. What I don't like is the naming. Within the Car Node2D I would like to have a "speed" variable and not a "car.max_speed" variable because I am already "inside" the car. Also, runtime variables like "current_speed" I would then define in the script attached to the node, right? But then I would have "current_speed" (without "car.") and "car.max_speed". Maybe someone can help me think through this.