Grid Based Inventory System | Godot Inventory Tutorial

Поділитися
Вставка
  • Опубліковано 26 жов 2024

КОМЕНТАРІ • 70

  • @GameDevelopmentCenter
    @GameDevelopmentCenter  3 роки тому +5

    All the tutorials I made are free. All the tutorials I will make will be free.
    Support this vision by joining the YT member club, or with a pledge on Patreon:
    ua-cam.com/users/gamedevelopmentcenterjoin
    www.patreon.com/gamedevelopmentcenter

  • @KhronnuStar
    @KhronnuStar 3 роки тому +11

    Man, you're the greatest game dev teacher I've seen on youtube. Clear, precise, organized, direct to the point. Thank you very much, your efforts are much, much appreciated.

  • @rileycross5101
    @rileycross5101 Рік тому +3

    Thanks man! I have been stuck on the issue of inventory for the past couple months, just pushing it back and back. Every other tutorial I find doesn't explain it well, but I understand what you were doing, and you explained it. Thanks!

  • @v84l42
    @v84l42 2 роки тому +4

    currently doing this in godot4! took me a while to squash all the errors but i got it working thank you for the tutorial and i hope you come back to youtube soon!

  • @XwarslayerXmemechannel
    @XwarslayerXmemechannel 3 роки тому +3

    The soundproofing in the background makes it look like you just got your diploma.
    congrats my dude :)
    lol, and thanks for simplifying this so much. So much easier to understand than other videos I've tried

  • @xaxaWOW
    @xaxaWOW 3 роки тому +6

    Your tutorials are the best ! Everything is very clear ;)

  • @RicardoBuring
    @RicardoBuring 3 роки тому +9

    You can quickly navigate to your AppData\Roaming folder by entering %appdata% into the explorer address bar (on Windows). Also worth noting is that JSON files in your project folder are not recognized as resources by Godot, so by default they are not included when you start to export your game (which can break it); this is fixed by adding e.g. "*.json" to the "Filters to export non-resource files/folders", in the Resources tab of the export window.

    • @RamHomier
      @RamHomier 3 роки тому +4

      You can navigate to your user directory even more quickly by using the menu in godot (Project > Open Project Data Folder)

  • @DrMaelo
    @DrMaelo 2 роки тому +2

    Thank's you very much bro! You helped me a lot

  • @mars6182
    @mars6182 3 роки тому +3

    Hi from Reddit :3 Thanks a lot!

  • @RamHomier
    @RamHomier 3 роки тому +6

    I suddenly have an urge to create an RPG. Even if I think I already new most of it and really wished I had this tutorial a few months ago, I learned a few incredibly useful features like the naming convention and the add_child(node,true) for the human readable names.

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  3 роки тому +1

      Glad I could help! There is always a new trick to learn :)

    • @Dante3085
      @Dante3085 2 роки тому +1

      Very good tip, thank you and the creator of the video both.

  • @michaelgraf6773
    @michaelgraf6773 Рік тому +2

    My Dude, your code dirty af!

  • @lismith5733
    @lismith5733 2 роки тому +1

    Awesome,you are best, very clearly~thank you very much!

  • @quanghuyng6698
    @quanghuyng6698 2 роки тому +1

    thank you so much about grid container

  • @Soraphis91
    @Soraphis91 2 роки тому +1

    this is just a list, placed in a grid pattern on the screen. Grid Inventories (e.g. diablo 2's inventory) have items which can take up multiple slots.

    • @MEMUNDOLOL
      @MEMUNDOLOL Рік тому

      no, this is grid inventory, the thing you are talking about called spatial inventory

  • @pascalk7389
    @pascalk7389 3 роки тому +2

    Hi, what plugin are you using to export json from excel? Couldn't find anything useful for that. Thanks.

  • @rl_ledge9284
    @rl_ledge9284 3 роки тому +2

    Great tutorial! one question though, how would the player be able to obtain items?

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  3 роки тому

      You would have to add a looted item to his/her inventory_data sheet.
      The moment the player reopens the inventory, it will automatically load that new item into the inventory.

    • @rl_ledge9284
      @rl_ledge9284 3 роки тому +1

      @@GameDevelopmentCenter Thank you for your quick reply! The thing you just told me is the part I do understand, but the thing I don't understand is how would I add this to the inv_data, how do I only add this item to the first place in the inventory that is available (null) and not to add the item if there is no space available.

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  3 роки тому

      @@rl_ledge9284 You iterate over it, in a loop :)

  • @migueleduardo7895
    @migueleduardo7895 3 роки тому +2

    Invalid call. Nonexistent function 'Set_texture' in base 'TextureRect'.
    Can you help me with this?

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  3 роки тому +3

      Capital letter S in Set_texture should be a lower case letter as in set_texture

  • @ttv_dark_scorpion
    @ttv_dark_scorpion Рік тому +1

    I'm doing this in the newest Godot 4 (pre-alpha I think). When I got to 16:23 I got an error when using the parse. Am I doing something wrong or has it changed in the new Godot update. The error is "Cannot call non-static function "parse()" on the class "JSON" directly. Make an instance instead." I'm not good at Godot yet so can anyone help me please

  • @generic........
    @generic........ 3 роки тому +7

    "Or maybe it's a micro transaction in your game"
    This is how all bad things begin

  • @ナルトうずまき-c9p
    @ナルトうずまき-c9p 3 роки тому +9

    makes a crafting system

  • @VanHagarerer
    @VanHagarerer 3 роки тому +3

    Fantastic tutorial! I followed it and all went well! At 23:33 to add inventory to the Main/UI canvas layer, I right clicked UI > instance child scene, then selected Scenes/UI/Inventory.tscn to put the Inventory under the Main/UI (I found these instructions at the previous video ua-cam.com/video/lwTPlnW1qhA/v-deo.html at 3.:50 time point of that video not this one) but I had forgotten. When I pushed play, all worked good. Only difference, in my Scene Main/UI/Inventory it shows the "Open Script" icon between the "Open in Editor" and "Toggle Visibility" so perhaps this is incorrect. It still worked out. I did previously view the json explanation tutorial and that video is fantastic also. Thank you for the videos, work, and effort, they are great! Later I will go to the next video.

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  3 роки тому +1

      I'm glad you like the videos VanHager! I'm sure you will enjoy the next videos just as much :)

  • @masterh2603
    @masterh2603 Рік тому +1

    i have a question what if the items are being picked up by the player how would that be implemented. (is there a tutorial for that)

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  Рік тому

      You would add them to the data.
      I have no tutorial for that, but there is plenty on UA-cam

  • @JoshuaTrinh1611
    @JoshuaTrinh1611 4 місяці тому

    hi, the inventory is not responsive when the scene size is changed do you know how to fix it

  • @GamerReborn1979
    @GamerReborn1979 3 роки тому +1

    Am confused about saving json files to user folder. If am exporting my project what will happen should everything work smoothly or there a trick to work it so i don't get errors.

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  3 роки тому +2

      Your user folder is not exported, but that isn't weird is it? Did you ever instal a game in your life that came with save files? Or did you had to start a new game?
      You could add a 'starter inventory' json under the res:// folder that is taken as a template when a new game is started. Pull a copy of it and save that to the user file.

    • @GamerReborn1979
      @GamerReborn1979 3 роки тому +2

      @@GameDevelopmentCenter yes you are right about save files, this is helpful when you simplify it like this.

  • @chikkenvoicesinmyhed
    @chikkenvoicesinmyhed Рік тому +1

    Great video but my TextureRects are still overlapping 😮‍💨

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  Рік тому

      Hard to help with this little information, first thing that comes to mind is the expand flag in the inspector.
      Don't shy away from using Discord, that's usually 10x quicker and you can share screenshots to 'show' your problem.

    • @chikkenvoicesinmyhed
      @chikkenvoicesinmyhed Рік тому

      @@GameDevelopmentCenter Hey I had forgotten I left this comment, yes I think I did solve it with the expand flag. Thanks so much for the reply. Discord sounds like a great idea going forward.

  • @devdurros5033
    @devdurros5033 2 роки тому +1

    any reason the item ID's start at 10001? also great video

  • @ollereberg7828
    @ollereberg7828 2 роки тому

    I get an issue with loading the pngs and get this error on basically all my pngs: "_load: Resource file not found: res//assets/Items/ITemPictures/Shield.png"
    Anyone else have the same issue or know what the solution to fixing it might be?

  • @Ceisri
    @Ceisri 8 місяців тому

    7 months watched this tutorial like 4 times and still can't get this to work... gotta give up on inventory for the forth time

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  8 місяців тому

      7 months and still haven't joined the Discord, could have probably put you on the right track months ago.
      Developers need a dev community. There is too much to go at it all by yourself.

  • @XwarslayerXmemechannel
    @XwarslayerXmemechannel 3 роки тому +1

    Idk what I'm doing wrong. I've been at this for like 4 hours now. it's a very small amount of code, so this doesn't make sense

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  3 роки тому +1

      Join the discord post a screenshot of the error you get. Can't help based on this info

    • @XwarslayerXmemechannel
      @XwarslayerXmemechannel 3 роки тому

      ​@@GameDevelopmentCenter thanks for the reply, I got it figured out. Between the GameData and PlayerData scripts, I didnt change all of the 'item_data, item_data_file' to say 'inv_data and inv_data_file'. so they were literally exactly the same. So much easier when I actually get some sleep first lol. I really appreciate your willingness to help :) I'll have to join the discord anyway, cuz you seem to make it so much easier to understand

  • @toledoadventures
    @toledoadventures Рік тому

    Invalid call. Nonexistent function 'keys' in base 'Nil' can someone help me?

  • @GamerReborn1979
    @GamerReborn1979 3 роки тому +1

    When the next episode?

  • @philadelphia6247
    @philadelphia6247 3 роки тому +1

    damn zero dislikes^^

  • @ilja7559
    @ilja7559 2 роки тому

    Doesn't quite work. Foreground always overlaps.

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  2 роки тому

      Probably a difference in your node order, as node order impact draw order when the game scene is rendered

  • @devzindie
    @devzindie Рік тому +1

    VBucks container

  • @thezadek
    @thezadek 3 роки тому

    oh no, don't use json for the inventory, that's terrible way of doing it when you could use godot's config files and resources

    • @thezadek
      @thezadek 3 роки тому

      to explain why: json support is there for external interactions with other tools. if you are handling stuff internally like local inventory database then you should use config or resources for their ease of use and much more extensive support by the engine.

    • @GameDevelopmentCenter
      @GameDevelopmentCenter  3 роки тому +9

      I'm sorry, I can't take you seriously when you call this 'terrible'. JSON file format is still the most used format to save and load data into Godot. The functionality I get when combined with Google Sheets is a massive time saver compared to config files or resources.

    • @nightflared
      @nightflared 3 роки тому

      I think json is fine for storing somewhat constant game data. Config file is more suited for user preferences, resources are maybe a little faster and more natural way, but have use only in engine, if you want to make site about your items or something like that you will have to make workaround etc.
      But if we will talk about consistent player data (like MMO), I would definitely use sql over anything else

    • @xcelva
      @xcelva 3 роки тому +2

      @@thezadek Sadly tho how to use such resources and general information about that system is not as accessible as these tutorials id love if Godot tutorial makers would take the time to make an idepth explanatory video on how to use Godot's internal resource system to not just load and save data to disk but also how to send this data over the network system . . . sadly I have failed to find this feel free to DM me a link if you have one.

    • @TheElectricChickens
      @TheElectricChickens 2 роки тому +1

      @@GameDevelopmentCenter I can confirm this - my current project has over 200 playable characters that each have unique values for 20 different stats. I started implementing the stats using resources and wanted to jump off a bridge. It would've taken days. After using your workflow to export JSON from google sheets, the whole process took 20 minutes. JSON is absolutely the way to go, especially as you scale, and it's a lot easier to work with IMO since it's used in nearly everything.
      Thanks for all these videos - I can't tell you how much time and headache you've saved me!