Learn programming with GDScript (Part 2)

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ค. 2024
  • Hello Godotneers! In this second video about learning programming with GDScript we'll look at what objects, properties and methods are and how we can describe them in classes to model real-world objects inside of a computer program. We'll also check out what Arrays and Dictionaries do and how we can use them in certain scenarios to make lists and look-up-tables and streamline our code quite a bit with them. Finally we're having a look at how we can use all the things that we learned in these two videos to get started with our own projects. So join in for the second part and continue on your Godot learning journey!
    Table of contents
    ===============
    00:00 Introduction
    00:35 Setup of the example project
    01:41 Objects and properties
    10:10 Classes and custom objects
    24:53 Arrays
    39:49 Dictionaries
    48:37 What's next?
    52:16 Conclusion
    Useful links
    =========
    The example project: github.com/godotneers/program...
    Step by Step guide: docs.godotengine.org/en/stabl...
    GDScript Reference: docs.godotengine.org/en/stabl...
    Godot Discord: / discord

ความคิดเห็น • 71

  • @nommynomnon
    @nommynomnon 3 หลายเดือนก่อน +24

    This is so comprehensive, you have a way with speaking and teaching no joke. I wish more tutorials were like this

    • @xbrc70
      @xbrc70 หลายเดือนก่อน

      He shows me that teaching is a skill!

  • @Ulticutie
    @Ulticutie 3 หลายเดือนก่อน +15

    Best Learning content for Godot, I assume you are a professional teacher. The way you teach and explain things is by far better then anything else on TH-cam.

    • @godotneers
      @godotneers  3 หลายเดือนก่อน +4

      Thank you very much for supporting me! I'm glad the videos are useful to you!

  • @SattarPahlavan
    @SattarPahlavan 2 หลายเดือนก่อน +5

    we are waiting for part 3 🙏

  • @BR-ku3ci
    @BR-ku3ci 3 หลายเดือนก่อน +8

    This series is hands down the best gdscript tutorial on youtube. Example project with challenges is pure gold

  • @rrRowboat7
    @rrRowboat7 6 วันที่ผ่านมา

    This isn’t the video we deserve. But it’s the one we need right now!

  • @arthaslalordcraft1259
    @arthaslalordcraft1259 3 หลายเดือนก่อน +6

    Can't wait for your next videos.

  • @xbrc70
    @xbrc70 หลายเดือนก่อน +1

    The way you educate helps me have a deep understanding and the confidence to solve my own problems in the future! Thank you so much for putting so much thought and effort into planning and creating these lessons!

  • @bloxspacestudios4577
    @bloxspacestudios4577 2 วันที่ผ่านมา +1

    Thank you Soo much! But I need more scripting tutorials just from you❤

  • @El5iver
    @El5iver 3 หลายเดือนก่อน +1

    You're tutorials are the reason I started coding it isn't just copying code and you teach amazingly.

  • @sixitis
    @sixitis 3 หลายเดือนก่อน +1

    This is a great tutorial, thanks for creating this and sharing it for free. really clear and comprehensive explanation, perfect examples and even has challenges to solve. couldn't ask for more. Thank you!!

  • @kestrel77
    @kestrel77 3 หลายเดือนก่อน +1

    This is so helpful, your videos are just on another level of clarity and usefulness. Thank you so much for providing it to us for free!

  • @Frostshocker
    @Frostshocker 3 หลายเดือนก่อน +1

    After checking the first one I have to say this Part 2 is also excellent.
    Definitely going to share this with anyone who needs a "from zero" style video to get them going and I hope to see more from you in the future 👍

  • @Dunkable
    @Dunkable 3 หลายเดือนก่อน +1

    I need a beginner godot partner
    Love the series so far by the way, can't wait to see more

  • @mariusznormalnie2579
    @mariusznormalnie2579 2 หลายเดือนก่อน +1

    INSANELY GOOD tutorial. Everything is well explained and very detailed!

  • @MegaAsmodey
    @MegaAsmodey 3 หลายเดือนก่อน +3

    Thanks! I love your videos.

  • @avp2501
    @avp2501 3 หลายเดือนก่อน

    Many thanks for your wonderful training videos. I'm a long time hobbyist C# programmer and I'm finding my transition to Godot much easier thanks to your effort.

  • @DaveScurlock
    @DaveScurlock 3 หลายเดือนก่อน +1

    Your tutorials are so clearly explained - thank you

  • @mrussogamedev
    @mrussogamedev 3 หลายเดือนก่อน +1

    Awesome content as always thanks for sharing

  • @wormholeinteractive
    @wormholeinteractive 3 หลายเดือนก่อน +1

    Thank you so much for this content!

  • @Hellscrom
    @Hellscrom 3 หลายเดือนก่อน +1

    This must be the best tutorial-series for Godot! Thank you so much for your work!

  • @dakotah4866
    @dakotah4866 3 หลายเดือนก่อน +3

    Yay part 2

  • @StaleCookies
    @StaleCookies 3 หลายเดือนก่อน

    Best Godot tutorials on TH-cam 🎉

  • @adlerkonrad1946
    @adlerkonrad1946 3 หลายเดือนก่อน

    Man i cant thank you enough you are a god send , please keep going.

  • @quanwashington
    @quanwashington 3 หลายเดือนก่อน

    You're absolutely KILLING it! Ignore the haters who focus on how your art was made with AI, it personally looks great. I've introduced some friends to your material, and they absolutely love it.

  • @willd2609
    @willd2609 3 หลายเดือนก่อน +1

    I would absolutely lose my mind if you were to do a tutorial on chunk loading and unloading.

  • @a.m.c8559
    @a.m.c8559 3 หลายเดือนก่อน

    love your teaching

  • @noelbarrot
    @noelbarrot 3 หลายเดือนก่อน

    I'm struggling with understanding 3D transforms and how to manipulate them. It'd be great if you covered these as you explain things in a way which makes it easy to understand. Thanks for all your videos so far.

  • @phvianna
    @phvianna หลายเดือนก่อน

    Thanks, very thanks.

  • @Asilhan
    @Asilhan 3 หลายเดือนก่อน +2

    Great man thank you.

  • @tayete
    @tayete 3 หลายเดือนก่อน +1

    I love your teaching style! Any chance to have some game AI tutorial in the future?

  • @joshuahartzell3455
    @joshuahartzell3455 14 วันที่ผ่านมา

    Thank you!

  • @saves8241
    @saves8241 20 วันที่ผ่านมา

    Hello! can you can give us an idea when the next tutorial will come out? It has been 2 months since this episode, and i was wondering when the 3rd one will get released. I really hope it's soon, thank you for this useful and comprehensive resource!

  • @MachineVersatile
    @MachineVersatile 3 หลายเดือนก่อน

    Yeah, that's good because u teach us working with docs.

  • @meteorogames9523
    @meteorogames9523 2 หลายเดือนก่อน

    I would love a detailed tutorial on how to setup the window settings for mobile games, respecting aspect ratios and stretching

  • @sixitis
    @sixitis 3 หลายเดือนก่อน

    Thanks!

    • @godotneers
      @godotneers  3 หลายเดือนก่อน

      Thank you very much for supporting me!

  • @joshuahansberg3057
    @joshuahansberg3057 3 หลายเดือนก่อน +1

    First of all i wanted to express my sincerest gratitude for your awesome work like many before me. Your style of doing something the most straightforward and simplest way and then correcting "yourself" has not just opened my eyes to a broadened and systematic way of looking at solving problems more than once (especially in your UI and data model videos), it also impressed me in regards to teaching techniques.
    Just a little side note from me as a fellow german. While you can use "before" positionally like you do in your video, most of the time it is either used temporal ("i was a bad programner before watching your video") or in a more abstract positional way like "sitting before the jury/judge". Your use of the word (function: "item_before_me) sounds very german to me and maybe you would be more on the safe side if you'd use "in front" instead. Not trying to nitpick only trying to give constructive feedback. But maybe it only sounds strange to me and our englisch native speaking friends would disagree. Best wishes

    • @godotneers
      @godotneers  3 หลายเดือนก่อน +2

      I'm honestly not sure about "before". I've seen it used in different ways and the dictionaries also have direct positional examples like "we sat before the fire", "he stood before me". Maybe a native speaker can shed some light on this?

    • @Red-ys5qf
      @Red-ys5qf 3 หลายเดือนก่อน +3

      ​@@godotneers Native speaker here! I would say that using "in front" is more common, at least colloquially, than "before" in the context you mentioned. From my experience, I usually see sentences like "we sat before the fire" or "he stood before me" in more formal settings like literature.

    • @godotneers
      @godotneers  3 หลายเดือนก่อน

      Great thanks for clearing this up! "In front of" it is then :)

  • @SootytheMagicalBear
    @SootytheMagicalBear 3 หลายเดือนก่อน

    Another great video and demonstration project. Will there be a part 3?
    Also this part is melting my brain, I don't quite get how the variable gets the item name from the for loop. Or is it just because the Array and Dictionary share the names of the items?
    for item_name: String in item_names:
    var price_for_item = menu[item_name]
    total_price += price_for_item

  • @pizzaturtle6226
    @pizzaturtle6226 หลายเดือนก่อน

    You are awesome

  • @martinithechobit
    @martinithechobit 28 วันที่ผ่านมา

    Ty sirs.

  • @LEDLearningeveryday
    @LEDLearningeveryday 3 หลายเดือนก่อน

    First of all, thank you for your very helpful tutorials. As a teacher I appreciate your style of teaching by showing how to solve problems instead of just quick fixing them.
    So I have a question about the dictionaries: To me it is not quite obvious, what the real benefit of a dicitionary is? The price of the item from your example illustrates this very good, because for me this would be something to include as a property in the class item like the item_name (#DataModels). This has the benefit, that whenever I create a new item I don't have to update the dictionary.
    Maybe you could give an example for a feature of a game, which can't be/shouldn't be handled via a data model but rather by a dictionary.
    Liebe Grüße aus Deutschland

    • @godotneers
      @godotneers  3 หลายเดือนก่อน +1

      Dictionaries are mostly useful as lookup tables because they can very quickly find an item for a given key.
      If you want to store structured data, you can technically use a dictionary for that but a class is usually the better choice for this because you can give proper types to all properties and you get auto-complete.
      Dictionaries can also be used as a "Set" which is a data structure available in other programming languages. Say you have 5000 items identified by their ID and you want to know whether or not you have an item with a certain ID. If you use an Array to store the items, you will have to traverse 5000 items in the worst case to find out whether or not you have one with a given ID. If you use a dictionary for this (ID is key, item is value) your lookup will be a *_lot_* quicker.

    • @LEDLearningeveryday
      @LEDLearningeveryday 3 หลายเดือนก่อน

      @@godotneers Thank you for your time. By the way: It would be very helpful for me if you could show in a tutorial how to use/setup the versioncontrol via github for a godot project. If this topic doesn't make it to the top of your videoideas, never mind. I still will watch your videos ;)

  • @flaviopsilva_
    @flaviopsilva_ 3 หลายเดือนก่อน

    approved!

  • @GameUISchool
    @GameUISchool 6 วันที่ผ่านมา

    Супер!

  • @engineerthings7486
    @engineerthings7486 หลายเดือนก่อน +1

    Can u please give the example game links of older version like 3.5.2 because i have a low end pc

  • @dipaktelang6117
    @dipaktelang6117 3 หลายเดือนก่อน

    please make full tutorial on how to make levels for scalable game.

  • @max-eb2wc
    @max-eb2wc 3 หลายเดือนก่อน

    I need part 3 asap

  • @BR-ku3ci
    @BR-ku3ci 3 หลายเดือนก่อน

    Is there a way to use say() method outside of what_should_i_do() function? I'm trying to use say() in _input() function and it's not working there. UPD: i've found a way to do that - expand Mr G node and use speech_bubble's node method say()

  • @engineerthings7486
    @engineerthings7486 หลายเดือนก่อน

    In my program there are no step forward or func what should i do can u pls tell from where we have to take them

  • @9bhjw8
    @9bhjw8 3 หลายเดือนก่อน +1

    thanks for making this amazing tutorial. i tried downloading the example project and open it but it shows an error due to vilkan drive. i can only run compatibility option. is it possible to follow your tutorial using my low end laptop?

    • @godotneers
      @godotneers  3 หลายเดือนก่อน

      It should still work in compatibility mode, we're doing not anything fancy in there.

    • @9bhjw8
      @9bhjw8 3 หลายเดือนก่อน +1

      @@godotneersthanks for replying. i tried but it sends me the error I even tried making a project and then copying the folders from the project but it failed. if its not too much to ask could you maybe export the files using compatibility renderer?

    • @godotneers
      @godotneers  3 หลายเดือนก่อน +1

      I have updated both projects for part 1 and 2 to use compatibility mode out of the box. I hope this fixes your problem.

    • @9bhjw8
      @9bhjw8 3 หลายเดือนก่อน +1

      @@godotneers thank you very much. i am very grateful for this tutorial series and your help

  • @jasonwilliams8730
    @jasonwilliams8730 3 หลายเดือนก่อน

    👍

  • @FelipeMAPT
    @FelipeMAPT หลายเดือนก่อน

    I'm wondering what would be like in games like Fallout Shelter where you have 2 Body2D that must be inserted into an area, like a room, and when that happens it starts some function....but thanks for the video. But I'm looking for something in the style of Fallout Shelter....how to make a Side-View Management game....2 months trying learn to start my project and nothing....i'm stuck.

    • @godotneers
      @godotneers  หลายเดือนก่อน +4

      Well the thing with "how to make Game X" - tutorials is that they are highly specific to a game and if you want to do something slightly different then you're stuck. I call these kinds of videos "recipe-style" tutorials. They give you a recipe to follow and you don't need to know how everything works - you just follow the recipe and get a result. The problem with this approach is that you never learn why stuff is done the way it is and the concepts behind what is shown in the video. So this kind of video is super nice if you know actually how stuff works and just look for a neat technique for a specific problem. But its not very useful if you don't know the basics of the engine and try to build a game from nothing.
      The most important skill really is to be able to dissect a problem in to smaller problems and then find solutions for these smaller problems. So start really small and simple and work your way up. Instead of trying to do a full blown 2d management sim, first try some simple things that you can later use in your final game. E.g. say you want to make a trigger that does something when the player steps on it (e.g. a door automatically opening for the player). How could that work? We dissect the problem:
      1. We assume we already got the player movement done.
      2. We need something that can detect if the player walks over it.
      3. We need a way to notify our door to open close as the player enters or exits the trigger.
      So now we can find solutions for these problems. E.g. we can find out that there is a thing called Area2D in Godot which can detect when it overlaps with other Areas or Bodies. This sounds like it could be useful for Problem 2. We can also find out that Godot provides a thing called "signals" which allow us to notify objects when something interesting happens. This sounds like it could be useful to solve problem 3.
      Now we have new, more specific problems:
      1. We need to find out how Area2D works and how we need to set it up so it detects our player.
      2. We need to find out which signals Area2D provides and see if one of them can be used to notify our door.
      3. We need to react to the notification in our door and open/close it.
      And so on... You see that even this very simple example requires a lot of thinking, looking up stuff and problem solving. And this is very very difficult at the beginning when you have no experience to rely on. So don't be discouraged if you haven't made your 2d management sim in 2 months. Developing games like this really takes a long time (e.g. Fallout Shelter took 5 years to make and was made by a team of seasoned developers at Bethesda).

    • @FelipeMAPT
      @FelipeMAPT หลายเดือนก่อน

      @@godotneers Thank you soo much.....actually yesterday i watch a video from a woman dev here on TH-cam and she explains all the problems she had and how she solved....and it's literally the same thing you explain here. Breaking the ideas into small pieces. Thanks again, i will change my aproach.

  • @Study8873k
    @Study8873k 2 หลายเดือนก่อน

    sir pls upload part 3

  • @jakab174
    @jakab174 3 หลายเดือนก่อน

    How do you delete a line by a press of a button?

    • @tayete
      @tayete 3 หลายเดือนก่อน +1

      ctrl+shift+k

    • @godotneers
      @godotneers  3 หลายเดือนก่อน +1

      Or alternatively just press CTRL+X while nothing is selected. This will cut out the line.

    • @jakab174
      @jakab174 3 หลายเดือนก่อน

      Thank you for the answer! Very nice series!

  • @antoniojohnson7547
    @antoniojohnson7547 2 หลายเดือนก่อน

    Promo'SM

  • @gabriel-xh8uo
    @gabriel-xh8uo 3 หลายเดือนก่อน +1

    Thanks. I love your videos.