I've read so many books to understand what git-amend is saying, and I've grown up to the point where I can finally understand what he's saying by watching the video. I'm proud of myself.
Personally, I've used 'generic 'to template some patterns. So when I use some patterns, I use them to modify the templates. I think generic is really useful.
I was teaching C# to a great group of students back when C# 2.0 released with generics (2005 - ouch). We were so blown away by how amazing it was - and I still learn new ways to use generics to this day.
Wow 2005 eh? When I first learned about them back in 2013 in college I felt like I’d discovered a cheat code. They’re so powerful they feel like they’re cheating
Thanks for another PRO video! Super useful. Great topic, quality and great audio commentary understandable even for non-native speakers :) Thanks a lot Adam!
This is such a great video, especially as your game grows in complexity. I wasn't expecting another video over the holidays, have a great one and looking forward to the new year!
Always happy to see a new git-amend video notification. Thanks for all you do for the community. Happy new year and I wish the best for you in 2025. Cheers! 🎉
5D game dev! Love how this lesson just added pattern after pattern after pattern. 😂 Genuine question here - when you know how each pattern implementation is adhering to SOLID principles (builder, factory, injection, interfaces, inheritance, generics), it gets easier to build this functionality out with scalability and extensibility in mind, knowing that extra effort now saves bloat further down the line... But, in the middle ground of intermediate coding, these things are not necessarily clear and so all the extra pieces mean we go from a single albeit bloated and inflexible class to a complex set of relations that might be difficult to track without that knowledge of how patterns can work together. To my mind, it's two kinds of complexity, that one is fundamentally flexible while the other does NOT scale well. So, question, would you keep all of these classes used to build out the functionality in a single file, or a single folder as a strategy for not having to jump around a half dozen files just to see how your basic functionality is put together? I guess I'm wondering how you maintain that umbrella concept for the functionality so that it doesn't get lost amid all the moving parts? Like I said, i think with more experience, it's less taxing to decompose mentally the 'what' and 'why' of each sub element, so maintaining a complex web of relations and purposes is easier.
Thanks for the comment! I think a lot of that comes down to your own workflow. For me personally, I tend to keep things in the same file until I feel it 'makes sense' to move a logical section into it's own file. I don't like jumping around multiple files any more than I like scrolling either, so I tend to use the shortcuts in the IDE to navigate. On bigger projects, I will also start drawing the relationships between systems, or class diagrams as well, in Excalidraw. The more experience you have, the easier it becomes to hold multiple abstractions in your mind at the same time, but everyone has their limit. Another good strategy is to employ good naming conventions - that really helps to easy the mental taxation.
I guess in a way, thinking about what you want to be able to do also guides those early design decisions - I want multiple loot drop types (generics + inheritance), multiple sets of conditions to work with those multiple loot types (interface for resolvers), a set method for dropping loot that will handle the resolver too, then we need to be able to create and initialize our loot drop types (factory). It's mapping and meeting all these needs that drives the design.
@262,144 I totally get where this question comes from, i wondered about that too ;) I think functionnality is better at start, and to quote @git-amend i learnt a lot trying to refactor a bloated yet functionnal system into a more organised, abstracted, pattern friendly system. But sometimes i lost myself in these refactoring, and ended up loosing interrest. Also code readability can indeed be a pain, with too much inheritance escpecialy, you forget the inherited methods and so on jumping from file to file is annoying.
I hope you start making videos for UE5 C++ . The community needs you!!! I dodnt use unity anymore but as a software engineer i like watching every single video you make.
I just recently graduated from a beginner Unity/c# course and learning from you seems like the next best step for me. I have almost the exact "noob" code that you showcased so I was wondering, aside from watching all your videos, do you have any other resources an absolute noob like me would love? Much appreciated and happy holidays sir 🎉
Thanks! If you join the Discord, in the #programming section there is a pinned list of books that are worth reading. I also recommend following Zoran Horvat and Iain McManus on TH-cam.
I've always likened it to this with the example of moving objects. Is it a vehicle? Use a inheritance (car takes from vehicle, racing car takes from car, etc etc) Is it something that just moves? Use a generic. When I am not sure what it is going to be, I prefer using generics. When you KNOW what it is going to be, I prefer using inheritance. Then you can of course inherit from the generic.
For the animations in the Intro, did you use motion matching or did you code/use a "normal" animation system for the turn animations? I am curious because if you didnt use motion matching i would be interested on how you coded this "state"
@@git-amend Apparently, comments on videos trigger the algorithm. Since Marvel rivals are topping the 'Gaming' category, this should appear in people's feeds.
@@git-amend Unity is an hobby to me, i wish i had taken a path to work in the game industry years ago, but i didnt. I learnt C# on my own, because i like challenge, and honestly i find programing very rewarding. (well i'm kinda old so i was taught basic and turbo pascal in the early 90's, but i dont work everyday with programming languages). What i know for sure is teaching and pedagogy, that i do everyday... And let me tell you, you are good at teaching, very good! I want to thank you for these in depth short lessons. I'm watching them over and over when i want to try a new system implementation in my project. I *think* you've upgraded my coding a lot in the past months, so thanks!
@@suntonio7187 I don't think I've learned this much from any other channel or even teacher (in person), honestly. I do make use of ChatGPT a lot to help me discover questions more than answers, so that's the second best learning source for me so far, and I often end up here to get a better understanding, hah. It's great! Successfully implemented a ton of things so far into my project (and extending/modifying a lot to suit my needs) and that's made things so, so much easier for me to progress. It's fun.
Thanks for your time, effort on that new T(); and in enemy class [SerializeField] private AbilityData, enemy needs to fill "T" here by class definition. I dont want to know what ability I should pass, I only pass the ability I want by serialization. So I found myself planned bad while trying to abstract the system. Its like chain, when you create smth. generic, you somehow need to fill that. I think i misusaged it.
Thanks for the comment. One thing to keep in mind is that you can create classes that have a generic and a non-generic version. In fact, you probably already use them. For example, Task and Task.
@@git-amend Thanks for the idea. I ended up using non-generic version. :'D. By the way, I see you use Activator.CreateInstance a lot, whats the difference of creating new class where we define T where T : new(); and create it directly. What do you mean by creating dynamically? Is it related to garbage or smth? And another question is, do you find using UI toolkit worth now? For example should i make it as "main tools" for canvas? I am using unity's canvas system but planning to learn UI toolkit in deep and use it for every project. Of course canvas is easier and faster to implement but i find myself using "web style" is feeling good. Thanks for your reply.
Great question! The new keyword is used when you know the type at compile time and want to create an instance. Activator.CreateInstance is used when you don’t know the type until runtime and want to instantiate it dynamically. This isn’t related to garbage collection but rather about flexibility.
Happy Sunday! Hope everyone is having a great holiday! 👍
I've read so many books to understand what git-amend is saying, and I've grown up to the point where I can finally understand what he's saying by watching the video. I'm proud of myself.
Nice work!
Personally, I've used 'generic 'to template some patterns. So when I use some patterns, I use them to modify the templates. I think generic is really useful.
@@git-amend thank you!
Lol I'm with you. I thought i was a good programmer but, git-amend is on another level and I have a hard time following
What kind of books would you recommend?
I was teaching C# to a great group of students back when C# 2.0 released with generics (2005 - ouch). We were so blown away by how amazing it was - and I still learn new ways to use generics to this day.
Haha! Was it that long ago! Still one of the languages best features!
Wow 2005 eh? When I first learned about them back in 2013 in college I felt like I’d discovered a cheat code. They’re so powerful they feel like they’re cheating
I appreciate the consistency and clarity of your videos. And great advice, as always
I appreciate that!
Thanks for another PRO video! Super useful. Great topic, quality and great audio commentary understandable even for non-native speakers :) Thanks a lot Adam!
Your welcome! Thanks for the comment!
Great video! Never thought about adding a second generic type (T, TResolver) like that to enforce types, thanks!
Thank you! Glad it was helpful!
This is such a great video, especially as your game grows in complexity. I wasn't expecting another video over the holidays, have a great one and looking forward to the new year!
Glad you enjoyed it! Happy Holidays!
I've got so many ideas on how I could implement these things into my game just watching this video. Another banger, extremely helpful!
Awesome, really glad to hear that!
Always happy to see a new git-amend video notification. Thanks for all you do for the community. Happy new year and I wish the best for you in 2025. Cheers! 🎉
Thank you, same to you! Lots more to come!
Appreciated as always, Combining inheritance and generics is powerful indeed!
Thank you!
As always, really informative, well-explained and to the point.
Much appreciated!
Thanks for your new video! Very helpful & useful for me to understand better
You're welcome! I'm glad it was helpful.
Thanks for the great video! Happy Sunday!
Thank you! Same to you!
5D game dev!
Love how this lesson just added pattern after pattern after pattern. 😂
Genuine question here - when you know how each pattern implementation is adhering to SOLID principles (builder, factory, injection, interfaces, inheritance, generics), it gets easier to build this functionality out with scalability and extensibility in mind, knowing that extra effort now saves bloat further down the line... But, in the middle ground of intermediate coding, these things are not necessarily clear and so all the extra pieces mean we go from a single albeit bloated and inflexible class to a complex set of relations that might be difficult to track without that knowledge of how patterns can work together.
To my mind, it's two kinds of complexity, that one is fundamentally flexible while the other does NOT scale well.
So, question, would you keep all of these classes used to build out the functionality in a single file, or a single folder as a strategy for not having to jump around a half dozen files just to see how your basic functionality is put together? I guess I'm wondering how you maintain that umbrella concept for the functionality so that it doesn't get lost amid all the moving parts?
Like I said, i think with more experience, it's less taxing to decompose mentally the 'what' and 'why' of each sub element, so maintaining a complex web of relations and purposes is easier.
Thanks for the comment! I think a lot of that comes down to your own workflow. For me personally, I tend to keep things in the same file until I feel it 'makes sense' to move a logical section into it's own file. I don't like jumping around multiple files any more than I like scrolling either, so I tend to use the shortcuts in the IDE to navigate. On bigger projects, I will also start drawing the relationships between systems, or class diagrams as well, in Excalidraw. The more experience you have, the easier it becomes to hold multiple abstractions in your mind at the same time, but everyone has their limit. Another good strategy is to employ good naming conventions - that really helps to easy the mental taxation.
I guess in a way, thinking about what you want to be able to do also guides those early design decisions - I want multiple loot drop types (generics + inheritance), multiple sets of conditions to work with those multiple loot types (interface for resolvers), a set method for dropping loot that will handle the resolver too, then we need to be able to create and initialize our loot drop types (factory).
It's mapping and meeting all these needs that drives the design.
@@git-amend yeah, that makes sense. Cheers
@262,144 I totally get where this question comes from, i wondered about that too ;)
I think functionnality is better at start, and to quote @git-amend i learnt a lot trying to refactor a bloated yet functionnal system into a more organised, abstracted, pattern friendly system.
But sometimes i lost myself in these refactoring, and ended up loosing interrest. Also code readability can indeed be a pain, with too much inheritance escpecialy, you forget the inherited methods and so on jumping from file to file is annoying.
I hope you start making videos for UE5 C++ . The community needs you!!! I dodnt use unity anymore but as a software engineer i like watching every single video you make.
Haha, maybe one day! Thanks!
I just recently graduated from a beginner Unity/c# course and learning from you seems like the next best step for me. I have almost the exact "noob" code that you showcased so I was wondering, aside from watching all your videos, do you have any other resources an absolute noob like me would love? Much appreciated and happy holidays sir 🎉
Thanks! If you join the Discord, in the #programming section there is a pinned list of books that are worth reading. I also recommend following Zoran Horvat and Iain McManus on TH-cam.
@git-amend I tried to join the discord through your links but it said the link has expired or is no longer available. This might be a me issue though!
I've always likened it to this with the example of moving objects.
Is it a vehicle? Use a inheritance (car takes from vehicle, racing car takes from car, etc etc)
Is it something that just moves? Use a generic.
When I am not sure what it is going to be, I prefer using generics.
When you KNOW what it is going to be, I prefer using inheritance. Then you can of course inherit from the generic.
That's a good analogy, I like that.
For the animations in the Intro, did you use motion matching or did you code/use a "normal" animation system for the turn animations?
I am curious because if you didnt use motion matching i would be interested on how you coded this "state"
nvm found your description-links...
Nice! I really Enjoyed the part where ironman took on the hulk in this scene.
Make sure you hit the bell for notifications, in case TH-cam mistakes you for a bot and unsubs you!
@@git-amend Apparently, comments on videos trigger the algorithm. Since Marvel rivals are topping the 'Gaming' category, this should appear in people's feeds.
Best moment of every weekend;)😅
You just made my day!
Love the video! Hope 2025 is a great year for you and your channel!
Thank you! Same to you!
Yeah! :D
I hit the like button before i even watch your videos now...
Thank you! And the algorithm thanks you too!
@@git-amend Unity is an hobby to me, i wish i had taken a path to work in the game industry years ago, but i didnt.
I learnt C# on my own, because i like challenge, and honestly i find programing very rewarding. (well i'm kinda old so i was taught basic and turbo pascal in the early 90's, but i dont work everyday with programming languages).
What i know for sure is teaching and pedagogy, that i do everyday... And let me tell you, you are good at teaching, very good!
I want to thank you for these in depth short lessons. I'm watching them over and over when i want to try a new system implementation in my project.
I *think* you've upgraded my coding a lot in the past months, so thanks!
Haha, I remember Turbo Pascal... and BASIC too of course! Thankfully we've moved beyond GOTO statements. Thanks for the comment!
@@suntonio7187 I don't think I've learned this much from any other channel or even teacher (in person), honestly. I do make use of ChatGPT a lot to help me discover questions more than answers, so that's the second best learning source for me so far, and I often end up here to get a better understanding, hah. It's great!
Successfully implemented a ton of things so far into my project (and extending/modifying a lot to suit my needs) and that's made things so, so much easier for me to progress. It's fun.
Another amend from the git! 🎉
Thank you!
Thanks for the great video :)
My pleasure!
my new favourite youtuber
Thank you!
my brain kinda stopped braining, almost feels like too much at once,even tho i can understand everything
I get that-it’s a lot to absorb at once, but if you already understand everything, you’re closer to mastering it than you might think!
Ty
You're welcome!
Composition before either xD
In some cases, I'd agree... th-cam.com/video/mAfpfUYhpAs/w-d-xo.html
it's so good.
Thanks for watching!
modularity > generics > inheritance
Thanks for your time, effort on that new T();
and in enemy class
[SerializeField] private AbilityData, enemy needs to fill "T" here by class definition. I dont want to know what ability I should pass, I only pass the ability I want by serialization. So I found myself planned bad while trying to abstract the system. Its like chain, when you create smth. generic, you somehow need to fill that. I think i misusaged it.
Thanks for the comment. One thing to keep in mind is that you can create classes that have a generic and a non-generic version. In fact, you probably already use them. For example, Task and Task.
@@git-amend Thanks for the idea. I ended up using non-generic version. :'D.
By the way, I see you use Activator.CreateInstance a lot, whats the difference of creating new class where we define T where T : new(); and create it directly.
What do you mean by creating dynamically? Is it related to garbage or smth?
And another question is, do you find using UI toolkit worth now? For example should i make it as "main tools" for canvas? I am using unity's canvas system but planning to learn UI toolkit in deep and use it for every project. Of course canvas is easier and faster to implement but i find myself using "web style" is feeling good.
Thanks for your reply.
Great question! The new keyword is used when you know the type at compile time and want to create an instance. Activator.CreateInstance is used when you don’t know the type until runtime and want to instantiate it dynamically. This isn’t related to garbage collection but rather about flexibility.
@@git-amend Oh, that would be extremely useful for editor scripts!