What are Resources? (Godot 4.0 Tutorial for Beginners)

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • ✅ Godot Basics for Beginners Playlist: • Godot Basics for Begin...
    In this Godot tutorial, we will go over what are Resources in the Godot Engine and how to create a simple Custom Resource.
    If you have any questions post them in the comments and I'll do my best to answer them.
    🎮 Add Kitchen Madness to your Wishlist! store.steampow...
    💬 Solo, Deckbuilding, Kitchen Simulation, With endless replayability!
    💬 Join my discord! / discord
    More Videos!
    ✅ What are signals (Godot 4.0 Tutorial for Beginners): • What are signals (Godo...
    ✅ GDScript Basics to Advanced (Playlist): • GDScript Basics to Adv...
    ✅ Tips and Tools Playlist: • Tips and Tools
    🔔 Subscribe for more Godot and Game Development Tutorials and Tips
    / @thepolyglotprogrammer
    See you next time!
    📍 Support on Patreon / thepolyglotprogrammer
    #godottutorial #godot #godotengine #godot4 #gdscript #unity #scriptableobjects
    --------------------------------------------------------------------
    Hello there, This is The Polyglot Programmer and here you will learn everything about Game Development with the Godot Engine.
    I've been developing software for over two decades and games for several years and now I'm sharing my knowledge to help you on your own game development journey.
    --------------------------------------------------------------------
    - Patreon - / thepolyglotprogrammer
    - Blog - blog.thepolygl...
    - Twitter - / joaoh82
    - Github - github.com/joa...
    --------------------------------------------------------------------
    Background music by:
    Bliss by Luke Bergs | / bergscloud
    Creative Commons - Attribution-ShareAlike 3.0 Unported
    creativecommon...
    Music promoted by www.chosic.com...

Комментарии • 37

  • @hudsonator7259
    @hudsonator7259 10 месяцев назад +3

    This is a really good example of resources, and really food job showing what you couldnuse the resources for

  • @user-xs1bv6ns5b
    @user-xs1bv6ns5b 2 месяца назад +1

    Great tut! Thank a lot!

  • @bowl1858
    @bowl1858 3 месяца назад

    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.

  • @2dspaceadventuregame952
    @2dspaceadventuregame952 10 месяцев назад +17

    Background music was unneccessey. The video is good.

    • @thepolyglotprogrammer
      @thepolyglotprogrammer  10 месяцев назад +1

      Thanks for the tip! And thanks for watching!

    • @tower1990
      @tower1990 3 месяца назад

      Also the keyboard sound is a bit distracting. Haha

    • @Cezkarma
      @Cezkarma 3 месяца назад +1

      @@tower1990 Nah that stuff is like ASMR in programming tutorials

  • @cody31
    @cody31 11 месяцев назад +1

    Great tutorial. Thank you very much. Keep up the good work.

  • @the_dude_josh
    @the_dude_josh 2 месяца назад

    Super solid video!!

  • @swatmc607
    @swatmc607 Месяц назад

    Thank you sir!

  • @cucharachatwt9074
    @cucharachatwt9074 8 месяцев назад

    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 :)

    • @thepolyglotprogrammer
      @thepolyglotprogrammer  8 месяцев назад +1

      Thanks! I appreciate it! I’ll try to make a video explaining a more complex example in the future.

    • @Ro11ingBoy
      @Ro11ingBoy 7 месяцев назад +3

      a huge point probably is that you can save resources on the disk

  • @arcade_mntra
    @arcade_mntra 10 месяцев назад +2

    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.

    • @thepolyglotprogrammer
      @thepolyglotprogrammer  10 месяцев назад +1

      Thanks for the feedback! I'll definitely take into account for next videos.

  • @charlesabju907
    @charlesabju907 7 месяцев назад

    I've instantly recognized the Brazilian accent, great video man.

  • @ianpullinger4785
    @ianpullinger4785 4 месяца назад

    Great content and really covered a lot of details in a short time. Please remove music in the future though, quite distracting.

  • @RhogerAnacleto
    @RhogerAnacleto 10 месяцев назад +2

    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?

    • @thepolyglotprogrammer
      @thepolyglotprogrammer  10 месяцев назад +5

      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.

  • @bonsaipropaganda
    @bonsaipropaganda 11 месяцев назад

    this is really helpful thank you

  • @ritzenhauf
    @ritzenhauf 7 месяцев назад +1

    I need to get a giant monitor just so i can follow videos like these

  • @user-sk4fx2tk1x
    @user-sk4fx2tk1x 9 месяцев назад +1

    awesome

  • @dre_met
    @dre_met 25 дней назад

    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.