Minecraft Crafting System in Unity!

Поделиться
HTML-код
  • Опубликовано: 31 дек 2024

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

  • @CodeMonkeyUnity
    @CodeMonkeyUnity  5 лет назад +29

    This video was very tough to make so I really hope you like it! What are you going to craft?
    🎮 Play 7 Awesome Games (Action, Strategy, Management) and Help Support the Channel!
    ✅ Get the Game Bundle 67% off unitycodemonkey.com/gameBundle.php

    • @mr.fakeman4718
      @mr.fakeman4718 5 лет назад

      I think the ability for the player to craft food and/or drink/potion is something that can be applied to many games, because a lot of creatures can't be without them in real life too.

    • @Dariwoos
      @Dariwoos 4 года назад

      I actually got this as an ad and I watched this and didn't even watch the video that I wanted then to watch

  • @jameslavery2958
    @jameslavery2958 5 лет назад +8

    Dang nice tutorial, man.
    Your tutorials are so helpful in giving me inspiration. Watching this has made me confident enough to start a project that I
    have been wanting to do for a while now, but wasn't sure how to compare items to another. And the Dictionary is just brilliant.
    Thanks again. Always appreciated.
    You Rock!

  • @T33nno
    @T33nno 5 лет назад +5

    I have been looking for a tutorial like this for days! Thanks a ton, subscribed!

  • @Tengzhichong
    @Tengzhichong 5 лет назад +3

    You've no idea how helpful these are. Liked, subbed and commented. Thank you kind sir and keep it up

  • @juicedup14
    @juicedup14 5 лет назад +5

    Man you pump these vids out quick :D

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +3

      Heh yup pretty intense but I love making all these various systems!

  • @rahulkumarjha2404
    @rahulkumarjha2404 5 лет назад +6

    Thanks for this video. Just 200 left for touching the milestone of 100k. Please make a new tutorial series of making an RPG game from scratch.

  • @therealman8041
    @therealman8041 5 лет назад +6

    im in your discord server (By the way you are a really underrated dev and youtuber)
    keep doing what your doing man (also what do u use to make the characters and maps for your game im new to devvelpoing)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +3

      Thanks!
      For drawing I use Photoshop but you can use any image program you have like Paint or Gimp.

  • @viktorajvazi7728
    @viktorajvazi7728 5 лет назад +26

    the perfect tutorial doesent exi-

  • @speedrob
    @speedrob 5 лет назад +2

    Another very cool system that can be tailored for your needs.

  • @ROQuietStorm
    @ROQuietStorm 5 лет назад +3

    Amazing!!! I love these videos, keep up with the good work :)

  • @medmel2160
    @medmel2160 5 лет назад +3

    YAY 100K SUBS !
    again very good content, you're quite on fire these days !

  • @ВалентинГафуров-ь9и

    Congratulations to 100k subscribers!!!🎊🎉🎊🎉🎊🎉🎊🎉🎊

  • @Jlewismedia
    @Jlewismedia Месяц назад +1

    Would have been a great place to implement some scriptable objects or Json text files for crafting recipes.

  • @davekene
    @davekene 5 лет назад +4

    Very nice tutorial. I would really love for you to implement this with player stats system. Would that be possible in a future tutorial?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +1

      Player stats how? Can only equip the sword when the character has enough STR? Or equipping the sword increases Attack?

    • @davekene
      @davekene 5 лет назад +1

      Code Monkey both actually. I have played games like “Archero”, and it implements those features very well.

  • @sklanman
    @sklanman Год назад

    If you craft several sticks first, then go to craft a stick with other sticks in any of the other unused crafting slots, they will also be consumed with the crafting of a single new stick.

  • @ilijafullgamer9
    @ilijafullgamer9 5 лет назад

    Thank you man
    Yhis is underrated channel

  • @jonathankingsland3070
    @jonathankingsland3070 5 лет назад +1

    Thank you for your amazingly awesome tutorials

  • @MosphereMusic
    @MosphereMusic 5 лет назад +1

    Awesome content. Thanks for continuing to share your knowledge.

  • @aqua_pi
    @aqua_pi 5 лет назад +2

    Id love to see any tutorials on VFX graph (especially mobile focused)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +2

      Yeah I haven't touched it yet but I do want to try it out especially as it comes out of preview

  • @rmt3589
    @rmt3589 2 года назад +1

    You keep referring to previous videos that this is built on. Is there a playlist I can watch straight-through to learn all these in order?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 года назад +1

      They are all linked in the description. Each system is mostly standalone so there isn't a guided path specifically for getting to this system.

  • @hiddenalien
    @hiddenalien 5 лет назад

    This is a very nice way to see how it works!

  • @AyyyyyyyyyLmao
    @AyyyyyyyyyLmao 5 лет назад +2

    Loved it! Can you make a tutorial similar to this but with items that take up more than 1 square?
    Being able to drag a 2x1 rectangle on a 3x3 grid and have it snap to it would be a dream come true. Please do a follow up implementing this I beg you

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +2

      Yeah I've been meaning to do a video on a Tetris style Inventory system but it's pretty complex so haven't had the time to do it yet, hopefully soon!

    • @AyyyyyyyyyLmao
      @AyyyyyyyyyLmao 5 лет назад +1

      @@CodeMonkeyUnity I absolutely adore those kind of inventory systems and I cannot for the life of me figure it out. Thank you so much for the reply :)

  • @chariouibouchaib4416
    @chariouibouchaib4416 5 лет назад +4

    Amazing Tutorial as usual , Thank you so much.
    I wanna ask you for a favor Sir , Could you please make a tutorial for mobile input to controll the characters in your projects . That's will help us to much .
    Thank you so much again :))

  • @Pookzob
    @Pookzob 5 лет назад +1

    Great video as usual, thanks!
    Any reason you're using event handlers over actions? For the named args? Habit?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +1

      Just because it's the standard. When I first learned about events I thought you had to use EventHandler and by the time I figured out you could use Actions I decided to just stick with the accepted standard.

  • @victorprado9276
    @victorprado9276 3 года назад

    Hey, I really like your videos, as a teenager I used to make games as a hobby, now I work as a software engineer, and your videos made me consider go back to unity. So amazing work with your content. Could you make a swimming system. I remember, is something was really tough when I was a teenager, I would like to know how would you do it.
    PS: ECS Videos are amazing

  • @Neon_Byte_
    @Neon_Byte_ Год назад

    I am having an issue at around 8:55. The wood sword is the same size as the other objects and is not stretching to fill the output slot. Do you have any idea what could be causing this?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Год назад

      It depends on the size of the texture and the pixels per unit in the texture import settings

  • @hojaverde5265
    @hojaverde5265 5 лет назад +1

    Nice video. I have a question. Is there any advantage in using EventArgs instead of an event Action for dispatching events?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +2

      It's simply the standard to use EventHandler with EventArgs, it would work exactly the same with Action

  • @theZech
    @theZech 5 лет назад +34

    noo thats not how you make sticks xd

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +6

      Heh yeah I know, first Planks and then Sticks but I wanted to simplify it for the video and it made more sense to start with Wood.

  • @stacyardus3898
    @stacyardus3898 4 года назад +3

    0:08 yes this is the first thing i do when i craft a sword,

  • @alannguyen4636
    @alannguyen4636 2 года назад

    Love the video but quick question do you have a the UI_Item script? trying to see how this works and practice some of this stuff for my own implications but unsure about parts you don't show, also i followed your drag and drop tutorial but i've run into a couple placement issues and having items snap to container boxes.

    • @alannguyen4636
      @alannguyen4636 2 года назад

      I think i pulled the UI_Item to be the ItemWorld Script from your inventory video? However I am now running into issues with getSprite, when creating an item on the crafting board it throws me an error saying object reference not se to an instance of an object with the line within GetSprite that sets the items sprite as the place of issue, however i am not sure what value here is null as both the item given is detected and the sprite that should be there is in the correct slot

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 года назад +1

      It's been a very long time since I made this video but the project files should have everything
      If you have something null use Debug.Log unitycodemonkey.com/video.php?v=5irv30-bTJw

  • @killereks
    @killereks 5 лет назад +1

    4:50 line 47 is redundant, just return false there instead of the else

    • @maarten1012TTT
      @maarten1012TTT 5 лет назад

      He probably knows that already 😂

    • @killereks
      @killereks 5 лет назад

      @@maarten1012TTT yep but it always bothers me when people do
      if true
      return true
      else
      return false

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +2

      It is redundant but makes the code more explicit and easier to follow. Without the else you would need to spend an extra 100ms looking at the code to make sure there were no other paths.

    • @killereks
      @killereks 5 лет назад

      @@CodeMonkeyUnity maybe its just me but for me my way is easier to follow and read. Just like return var is better than if var return true... so on. Also your code always relies on your package so i dont learn much from your video. Thank you for the reply and i hope you dont see this as hate

  • @DrunkCepums211
    @DrunkCepums211 4 года назад

    Don't Know if u are going to see this. But there is a bug. If u try and move item inside crafting gui and let it go while you have moved item just a little bit it duplicates.
    Another issue is that i can't add multiple recipes for a same item.

  • @xenithmusic3029
    @xenithmusic3029 5 лет назад +1

    Gg on 100k

  • @soldierx-1925
    @soldierx-1925 3 года назад

    Hi CodeMonkey, I'm Stuck at 5:48, when I run crafting test I get this error
    NullReferenceException: Object reference not set to an instance of an object on these lines
    inventory.OnItemListChanged += Invetory_OnItemListChanged;
    uiInvetory.SetInventory(playerInventory.GetInventory());
    I've seen your NullRef error video, I stull can't figure out what's worng. Pls help.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  3 года назад

      If the error is on the first line, then inventory is set to null, use Debug.Log to confirm
      Seems like playerInventory.GetInventory() is returning null

  • @poresrage5053
    @poresrage5053 3 года назад

    When I make this build for android, I can move the items around inside the inventory but cannot place it into the crafting grid. Could someone please help out

  • @ВалентинГафуров-ь9и

    Thank you for the video!

  • @KonradGM
    @KonradGM 3 года назад

    any reason for leaving ',' in arrays?

  • @scart3redup304
    @scart3redup304 5 лет назад

    How can you make a shapeless recipe, like not having to place the two wood blocks in the MIDDLE to get s stick?
    So you can place them anywere as long as they are on top of each other?

    • @Pookzob
      @Pookzob 5 лет назад

      Scart3 Redup one way with this particular system in the video would be to make a recipe for all possible combinations. It would eg. make 6 recipes for the same stick output.
      If you want it another way you'd have to change the code for recipes and that tries for recipes to only send the filled slots and compare against recipes which also only defines the slots needed to be filled regardless of position on the grid.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +1

      That is a completely different design which would require completely different logic.
      Instead of defining recipes as specific positions on the grid you would need to define then as items in positions relative to other items.
      So maybe define a recipe with a list of recipe items each holding its type and the type above/blow/left/right

  • @CharmFlex
    @CharmFlex 5 лет назад +3

    Watch accross your video. Far different from brackeys' tutorials. Codes are too much, and basically all things are managed from codes. You both have different mechanics for a same game function, but brackey‘s one is more beginner friendly and very easy to understand. Maybe I am not getting used to, but I really don't understand the code, too advanced for me, for a beginner, in my opinion. No offense, peace.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +7

      Yes I am mainly a programmer so I tend to do most of it through code. However when going the more visual route it will work at first but you will end up with a messy codebase and be unable to progress and continue making more complex games.
      If all you want is a prototype then use whatever method you prefer, but if you're starting a game you will work on for months you should really think very carefully about how you implement things rather than going with the very first approach that comes to mind.

  • @griffinbrooks6748
    @griffinbrooks6748 2 года назад

    now can you make furnace?

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

    hi, does this tutorial work for 3D built in render pipe line?

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

      Sure, the concept of a crafting system doesn't really have anything to do with how your camera is set up or what render pipeline you're using.

  • @Andrew90046zero
    @Andrew90046zero 5 лет назад

    a genius and a madd ladd

  • @gavenhollenbeck4630
    @gavenhollenbeck4630 3 года назад +1

    how are you dragging items

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  3 года назад

      I covered drag drop here ruclips.net/video/BGr-7GZJNXg/видео.html

  • @rentox3969
    @rentox3969 4 года назад

    In which video you created the UI_Item class?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 года назад +1

      In the Inventory System ruclips.net/video/2WnAOV7nHW0/видео.html

  • @vertydev
    @vertydev 5 лет назад

    How can i make that 360 sword attack

  • @josevalenzuela4540
    @josevalenzuela4540 4 года назад

    Do you have the base code of the project? (only the character and the background) I Downloaded the project files but it seems that is the final version and also with compiling errors :(

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 года назад

      What compiling errors? The project files contain the fully working final state of the video.

    • @josevalenzuela4540
      @josevalenzuela4540 4 года назад

      @@CodeMonkeyUnity In a new project (in 2019.3.0f6), I just import the package and i get this two errors (I tried with 2019.2.8f1,
      Assets/CraftingSystem/Inventory/Scripts/ItemWorld.cs(4,42): error CS0234: The type or namespace name 'LWRP' does not exist in the namespace 'UnityEngine.Experimental.Rendering' (are you missing an assembly reference?)
      Assets/CraftingSystem/Inventory/Scripts/ItemWorld.cs(29,13): error CS0246: The type or namespace name 'Light2D' could not be found (are you missing a using directive or an assembly reference?)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 года назад

      @@josevalenzuela4540 You need to install the Lightweight RP in the Package Manager

  • @BelladonGameDeverUA
    @BelladonGameDeverUA 5 лет назад +1

    It seems easy with you.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад

      That's what you get with 20 years of Programming and 10 years of Game Development!
      Keep at it! Experience is key!

  • @artistaartificial5635
    @artistaartificial5635 5 лет назад

    What is the list of videos to get here?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад

      There's links in the description, the main one being the Inventory System ruclips.net/video/2WnAOV7nHW0/видео.html

  • @arthurmorgan923
    @arthurmorgan923 5 лет назад

    Hi ! I have been watching you for 1 month and i want to buy a laptop to develop 2d games like you. Do you use a laptop ? If you use one, what is in it ? I found a laptop which has 8th gen i5, 8gb ram, 256 gb ssd and mx130 gpu. Can i develop 2d games with this system or do you think i need a stronger one.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад

      Just about anything can run Unity so yes those specs will work just fine.

    • @arthurmorgan923
      @arthurmorgan923 5 лет назад

      @@CodeMonkeyUnity do you use laptop which one

  • @nashiruddin3543
    @nashiruddin3543 5 лет назад +1

    Plz a video on chest inventory

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад

      What do you mean? The inventory class can represent anything, a chest, player equipment, world inventory, etc
      ruclips.net/video/2WnAOV7nHW0/видео.html

  • @CharmFlex
    @CharmFlex 5 лет назад

    Is it possible for a beginner to understand the code?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад

      This is a pretty complex system so if you're a complete beginner you should start with something more basic.
      However by all means to watch the video and try your best to understand, even if you can't follow all of it you will be exposed to more advanced concepts that you will eventually learn.

  • @admink8662
    @admink8662 2 года назад

    Nice

  • @skeletony7515
    @skeletony7515 5 лет назад

    Please, you can Russian subtitles, because I'm Russian and I'm not very comfortable watching your beautiful lessons. I hope you'll do the subtitles, and while I'm waiting, I'll watch the lessons. Thank you in advance

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад

      You can use the auto translate which should work most of the time

  • @ard9028
    @ard9028 5 лет назад

    how can i learn java to make games

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +1

      Java isn't really a very good language for making games, there aren't many engines that use it.
      You're better off learning C# or C++

    • @ard9028
      @ard9028 5 лет назад

      @@CodeMonkeyUnity thx

    • @mr.fakeman4718
      @mr.fakeman4718 5 лет назад

      if (fan_of_JMonkey) { Learn("Java"); } else Learn("C#" || "C++);

  • @DoraTheExplorerrr
    @DoraTheExplorerrr 5 лет назад

    i cant download the UTILS

  • @xenithmusic3029
    @xenithmusic3029 5 лет назад

    Yayyy... you forgot about planks.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад

      Heh yeah I know I wanted to simplify it for the video and it made more sense to start with Wood rather than Planks

  • @КомиссарКоган
    @КомиссарКоган 5 лет назад

    Usual video 60 - 130 likes, video about minecraft - 250................................

  • @adam120yep5
    @adam120yep5 5 лет назад

    someone created a mess on ur server

  • @a.labyad1473
    @a.labyad1473 5 лет назад

    Your know how to make a 3d game 🤔🧠

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 лет назад +1

      Most of the videos I make are independent of dimension, you can use this system in either 2D or 3D

  • @TurkiShGamers-hs1kw
    @TurkiShGamers-hs1kw 5 лет назад

    you should make course from udemy

  • @GrossikMods
    @GrossikMods 3 года назад

    No, this is not Minecraft style crafting

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  3 года назад

      Why not? What's missing? I expanded upon the recipe system here ruclips.net/video/E91NYvDqsy8/видео.html