Tree Physics System like Valheim!

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

КОМЕНТАРІ • 166

  • @CodeMonkeyUnity
    @CodeMonkeyUnity  3 роки тому +18

    💬 Chopping Trees! It's amazing just how much the simple addition of physics adds to the game, Valheim would not be the success it is without it.
    🌍 Get the Game Courses Bundle 3x1! game.courses/code-monkey-bundle/ (Includes Steam Keys for my games as a FREE bonus!)
    📝 Do you like this format of remaking Mechanics from popular games? I did it once before for Cyberpunk and I think it works better than a step-by-step tutorial for some cases.

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

      Can you make mobile game in unity

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

      @@syedsadiq8631 Pretty much all videos I make are applicable to mobile

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

      Is there a way to do this with terrain trees? and if so how? or should trees just be gameobjects if you want to use something like this?

  • @tauheedgamedev2388
    @tauheedgamedev2388 3 роки тому +33

    Never really used post processing but after seeing the difference it made in this game im gonna give it a go.

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

      It's super simple to add and makes a huge difference!

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

      I used for the first time in the last Brackey's GameJam, and I'm pretty satisfied with the result.

  • @thang4671
    @thang4671 3 роки тому +10

    You're going crazy with the video uploads. Thanks so much for putting out these knowledge. Liked and subscribed

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

    The format of recreating is very cool! Maybe you could extend it now that the basics are set. I would love to see a more advanced version of this, were the cuts actually matter and push the tree in a certain direction. A bit more of a realistic behaviour.

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

    That was a solid 3d demo scene, 🔥

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

    this is exactly what i need, i have no idea why im not subscribed to you! i have liked and subscribed :)
    thank you so much

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

    Amazing overview. I like that this isn't centred as much towards Unity but rather how the system itself would work. I was actually thinking of how I could do this myself in another engine and I'm for sure going to take inspiration from this video

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

      Thanks! Yeah this is an interesting type of format.

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

      @@CodeMonkeyUnity For sure is. I think it would be worth considering doing more stuff like this, but obviously, if a specific feature requires a specific engine only feature, it'd be worth doing it as a tutorial instead. Keep up the good work

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

    Great video as always .I love how you make things look easy Then i try it(without looking at your code) and it is like hitting my head against a wall :)

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

    oh my... this is really nice. I'm a dev doing business apps and i can't ever find the game in my head... being able to quickly get a project to play with is going to be a huge help in learning. I instantly thought "can i apply collission damage to a player... and then after i have structures to that as well..........**EDIT** right after the ad finished he covered this. Subbed and excited for a plethora of knowledge that this channel is sure to provide.
    Thank you for doing this!

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

    I wish this video was longer and with more explaination. I couldnt understand some of the code lines. but still great content, thank you for this

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

    i cant wait your multiplayer tutorial series. when that will come i will try to create a game :D

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

    cool ive been trying to code so now i know i can go here

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

    Mega,
    Please more such explanatory videos are good ideas for our own projects

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

    Excellent. Thanks for sharing

  • @syth-1
    @syth-1 3 роки тому

    Truly amazing what you can do with so little code with great understanding
    If I tried to pull something like that off, I'd be looking at over 1000 lines ;-;

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

      Don't be discouraged! Just keep improving your own skills day by day!

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

    Great job! I would like to learn how to creating a building system like valheim as well, hopefully you could make a video on that :)

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

      Yup I'm planning on that, stay tuned, maybe next week!

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

      @@CodeMonkeyUnity great! Can’t wait!

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

    I really would love to know more about the graphics in this game. Like how they got the look of individual pixels changing dynamically. It doesnt just look like someone put a light over the textures, and more like the texture itself is changing based on the light

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

      It is definitely an interesting look, I haven't studied it much yet but a lot of it is more on the lighting effects than the textures

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

    Very nice Video, keep up the good work :D

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

    Finally you make 3d tutorials

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

    Thankyou sir for this video

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

    Do you think that you could do another one of these tree cutting tutorials but based on how they do tree physics in Legend of Zelda: Breath of the Wild?

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

    It be cool if you could eventually do a video on how to make a "Build system" like all these crafting survival games have to make structures. (i feel this is most likely a combination of other videos you put out and if so it be cool to see an overview of which ones to piece together)

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

      Yup I'm planning to take my Grid Building System and apply it to a 3rd person camera

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

      @@CodeMonkeyUnity Sounds awesome can't wait, love your videos keep up the good work, and Thank you for sharing your knowledge =]

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

    Cool. TYM! Need more tools for the tool box :)
    Just enough info to get by.

  • @jean-michel.houbre
    @jean-michel.houbre 3 роки тому

    Very clear!

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

    Don't know why, but I was looking forward to seeing some dynamic mesh manipulation

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

      Something like Metal Gear Rising? That would be an interesting system to remake

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

      @@CodeMonkeyUnity Right, just like that. Splitting the tree without using split-up and separate prefabs for a single tree. From my research, messing with vertice's in Unity looks like a pain in the ass.

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

    Another amazing video.

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

    Can you please cover how to make framerate independent camera rotation?

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

      Not sure what you mean by that but to make anything framerate independent you just multiply by deltaTime

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

    Fantastic tutorial! Am learning so much from your videos!
    One question: where did you get the chop animation of the player? I am trying to find a good one, but still having no luck.

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

      I grabbed it from a pack from the asset store but cant remember which one. I think it was called something like "villager animations"

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

      @@CodeMonkeyUnity found it. Thanks a lot.

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

    Hey code monkey, love your videos! Theyre always very helpful. Anyways, I was wondering if you could make a tutorial showing how to chop trees like in green hell. Where everytime you hit the tree it shows a damaged spot on the trunk like your actually taking chunks out of it. Not sure how difficult it would be but I can not seem to figure it out. Thanks!

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

    If you wanna do an interesting video, show how to do the sea the way they did.
    The way the manipulate the mesh is absolutely amazing.

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

      It does look great, another game I also reviewed was Falconeer which also had a gorgeous sea ua-cam.com/video/aB3k1_4dne0/v-deo.html

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

    Can you please do a video on the complete player movement and shooting for Get To The Orange Door. I am trying to make a FPS game and need some nice rigidbody movement and shooting.

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

    That's really amazing showcase :) I really appreciate your videos in this kind of form. Especially your videos about Valheim are the only one I watch. I don't want to spoil the game :D BTW could you please explain, how to easily manage 3rd person camera collisions? I use free look orbit CM camera as you mention but I have still issues with the collisions against other 3d objects. Thanks :)

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

      You mean collisions with the camera? That is definitely a tricky subject that I haven't covered much, need to do some research and I might do a video.

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

      @@CodeMonkeyUnity I'm pretty sure many people would appreciate some really cool method how to make 3rd person camera :) Maybe you can try to make similar video as this, but focused on the 3rd person controller like in valheim. I think the controls in Valheim is also very satisfying stuff. :)

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

    great tutorial!!

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

    Hey can you make a video on how to edit terrain like you can in Valheim?

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

    Could you maybe do a Video where you show how to add that to an multiplayer game?

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

    Excellent!!

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

    Developing a Game is A Dream For Every Gamer.

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

    Good job!

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

    I don't really understand. Why do we have a hit box, but then in the code we use Physics.OverlapBox with a different colliderSize? I mean, in this part
    Physics.OverlapBox(hitArea.transform.position, colliderSize);
    Doesn't this create another invisible on-the-flight box to test overlapping? Why don't we use the hit box straight away?

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

    What about an overview of their building system ? It looks simple yet very powerfull !

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

    Ah nice tutorial a 3d conveyer belt system like satisfactory tutorial can be good also (merger-splitters part is hard)

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

      You can download the source code for the Factory Sim game and see how I implemented it

  • @あれくす
    @あれくす 3 роки тому

    Can you please link to tutorial or show how to set this up please? Your character controlller, the interaction between the chop and the tree taking damage, and how to make your scene look good, I’m assuming that’s post processing? Please, this would be helpful to have all these components to learn from and build off of. Thank you.

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

    Nice tutorial, Do you have in-depth tutorial about melee attacks ? I'm not quite understand about how things work. Normally I would have projectiles and using onTriggerEnter to deal with my damage calculation. It would be nice if you at least guide me a bit because I'm pretty loss right now.

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

      I've covered a very simple melee combat system here ua-cam.com/video/AXkaqW3E9OI/v-deo.html
      And also multiple methods for finding targets here ua-cam.com/video/h9oEhVqGptU/v-deo.html
      The best approach will depend on your specific design but you should be able to mix and match those examples to get something right

  • @Chris-zb5nm
    @Chris-zb5nm 3 роки тому

    You didn't cover the Tree Falling part.
    Did you use RigidBody Force for dropping the tree?

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

      Yes it's a rigidbody, I mentioned it when I talked about adding a physics material.

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

    Do you have a full tutorial on this little chopping game

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

    Awesome 👌

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

    would love to see this for C++

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

    Hey! Can you make a tutorial on how to chop the trees of a terrain? I've tried raycasting and destroying the tree, but this just destroys the entire terrain 😕

  • @v.d.2633
    @v.d.2633 3 роки тому

    Could you make tutorial how to save which game objects player picked at 1 scene, so they would not respawn when player re enter scene

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

      The simple way to move data between scenes is with a static field.

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

    Great showcase! Is this doable using Bolt alone? I don't know C#, and I'm trying to figure out how much I can accomplish without learning it.

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

      Yes, Bolt works based on reflection so it can do everything C# can do, if you use Programmer Naming everything is named exactly the same

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

    I'm getting 62 errors when downloading this. Kinda sucks. All I want is the tree chopping animation

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

      What errors? I think I used the animations from this pack assetstore.unity.com/packages/3d/animations/crafting-mecanim-animation-pack-36545?aid=1101l96nj

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

    Nice one

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

    Perfect!

  • @CJ-mr8dn
    @CJ-mr8dn 3 роки тому

    The character u use is the character i have seen in literally all low poly games for some reason lol

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

      The Synty studios characters do have a very specific look!

    • @CJ-mr8dn
      @CJ-mr8dn 3 роки тому

      @@CodeMonkeyUnity yea thats why i see them everywhere lol

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

    quite good but you could try explain more clearly like what does the "out" mean in TryGetComponent(out... basicaly I didnt find this helpful because it could not understand sorry

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

      It's the C# out keyword which lets you define a parameter as output rather than input unitycodemonkey.com/video.php?v=NGcKtXRcZc8

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

    Please provide the project of your FPS MicroGame

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

      I can't, the base is the official Unity FPS Microgame which I cannot distribute

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

    Excelent!! Thanks. How implement this system using a paint terrain? or if i fill with hundred of trees?

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

      The trees are a prefab, so you can use the prefab paint tool

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

    Have you tried the same thing but using trees placed with the Unity terrain system?

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

    is there any tutorial how to make tree chop if i have Whole tree like slice it so its become 2 pieces top and stump?

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

    Can you make code that moves a box from left to right or a video on it

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

      I made a character controller here ua-cam.com/video/Bf_5qIt9Gr8/v-deo.html

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

      @@CodeMonkeyUnity I need one that's automatic

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

    Tree go weee!

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

    hey! long time no see!. i know this may be a weird question. but when i make sprites for 2d games. when i put the assets. the look microscopicly tiny that i have to zoom in to the max to fix it. how do i make them bigger

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

      Do you mean the unit size inside Unity? On the Texture Import settings you can set the pixels per unit, lower that value to make each pixel take up more units.
      Beyond that it really depends on the original resolution of the image, if it's already tiny then there's not much Unity can do besides stretching it out.

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

      @@CodeMonkeyUnity thanks. but i don't understand

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

      @@baldingfox77558 Either your sprites themselves are very small, too small for Unity to do anything about
      Or
      You can go to the Texture Import settings in the engine and change the pixels per unit, which is sorta like setting the dpi in photoshop. You can lower that number and make the pixels in each sprite take up more size in Unity.

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

      @@baldingfox77558 Pixel Per Unit on the Canvas: If a sprite has this PPU setting then 1 pixel will fill 1 unit in the UI. The default is 100.

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

    What post prossecing settings were you using?

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

      Vignette, Bloom, Color Adjustments (++Saturation) and Depth of Field

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

    TIL functionTimer and tryGetComponent, thanks

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

    I’m almost sleep 5:00
    7:00 I’m going to sleep now

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

    Which asset pack was used for creating the tree visuals?

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

      It's the Fantasy Adventure Environment
      assetstore.unity.com/packages/3d/environments/fantasy/fantasy-adventure-environment-70354?aid=1101l96nj&pubref=choptrees

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

    Can you make a co up tutoriall

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

    Hello can you please make a tutorial for. Change player character to bird using visual scripting bolt unity🙏🙏🙏

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

    Great

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

    Okay I am so sorry but I dont get it... how do I get the Tree pref. from your page to run? ^^ I opened it up and I got that far with rename things but there are still 54 errors and the grafiks are all missing xD

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

      What errors? Maybe you're not using URP? Maybe you don't have Cinemachine installed?

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

      @@CodeMonkeyUnity Thanks so much xD I am quite new to Unity and thought that if I start a new projekt I would start with URP installed but well... yeaaa Now it works! Thx xD

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

    BRO GET HIS MONKEY OFF MY SCREAN!!!

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

    Hello, can I use these codes and projects in ue 4?

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

      No, UE4 uses C++ whereas Unity uses C#. And they are completely different engines with different workflows.

  • @Random-jo5wb
    @Random-jo5wb 3 роки тому +1

    Make discord server for people like me who are beginner in this field

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

    chopping trees lesgooo

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

    This is Really cool :D i get Age Of Empire 1&2 Vibes hehe :D
    i have made a system long time ago but much more simpel tho hehe :D
    it was for my racing game am Still working on you see it on my channal btw,
    i wanted to add collision reaction to fence but also to Power pole`s that if i collide over certain speed it reacts with physics, hard thing is the powerline, so i put it on hold for now in my game, simmular with the fence too that much fence or Guard rail i think it can hit performance hehe cuz of debre`s etc :D
    your system is extremly more advanced :D

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

      Keep at it! Best of luck with your game!

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

      @@CodeMonkeyUnity Thank you :D i wish the same for you too, i allways love your Videos :D
      They help me alott :)

  • @brianmo2611
    @brianmo2611 3 роки тому +15

    i definitely would not call this a tutorial by any means, more of a overview

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

      please request code monkey for c# oop tutorials.. this is very useful

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

      Yeah I thought this video would be better as an overview rather than a step-by-step tutorial. The logic is all very simple but involves quite a bit of writing so if I made it as a step-by-step tutorial it would end up way too long.

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

      @@CodeMonkeyUnity I agree, it does lend itself nicely to live streaming tho :)

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

    Bow could you colect tse wood

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

    we came a long way from Punching Trees ....

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

    I cant sign up to your website :(

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

      Sorry I was working on the website and broke something, should be fixed now! Thanks!

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

      @@CodeMonkeyUnity thanks bud :)

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

    Why did you use [SerializeField] private instead of a simple public?

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

      If you make something public it can be accessed and modified by any script anywhere in your codebase.
      If a variable is meant to only be used inside a certain class then it should be private.
      If you then want to expose that variable in the Editor then you can add the SerializeField attribute.

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

    I don't have money for course😢😢

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

      You dont need to buy any course. Learn online and just do what is fun

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

    Back again faking asleep =]

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

    We need face reveal

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

    Clone of a clone of the forest chopping

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

    yo soy el comentario en español que estabas buscando
    😂😂😂

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

    3

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

    actually not counting code monkey i am 2 nd

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

    3rd lets goooo

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

    its wasn't useful at all show you code

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

      You can download the project files and inspect all the source code

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

    Valheim is a great game but I don't really like the tree system.

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

      Why not?

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

      @@CodeMonkeyUnity Cuz I am impatient lol Also I died a bunch because of it.