LEVEL UP your code with this AWESOME FREE project! (and e-book)

  Рет қаралды 23,619

Code Monkey

Code Monkey

Күн бұрын

Пікірлер: 50
@CodeMonkeyUnity
@CodeMonkeyUnity 2 ай бұрын
🌍 Design Patterns e-book cmonkey.co/designpatternsebook 🎮 FREE Interactive Project cmonkey.co/designpatternsproject ✅ Get my C# Complete Course! cmonkey.co/csharpcourse 🔴 RELATED VIDEOS 🔴 Learn C# Intermediate FREE Tutorial Course! [2024] kzbin.info/www/bejne/f2fOqWCVgL2BsJY How to Talk to NPCs! (or Interact with any Object, Open Doors, Push Buttons, Unity Tutorial) kzbin.info/www/bejne/gpXSeqCwlr5pg5Y Why you should NOT make everything PUBLIC! kzbin.info/www/bejne/pnWVaIyrf6xmgpo "I'm not perfect" OR "many solutions to a problem" kzbin.info/www/bejne/nZmceoaJgbaGi8U
@rumplstiltztinkerstein
@rumplstiltztinkerstein 2 ай бұрын
I'm a programmer for Rust and Javascript. Don't have much experience on game development either. This is a godsend for me.
@MOONtyzoo
@MOONtyzoo 2 ай бұрын
Coincidentally I just started reading Clean Code, but I had trouble thinking of specific examples of how to apply what I’ve learned n game development. I think this E-book and project is exactly what I needed! Thank you for sharing this resource.
@sealsharp
@sealsharp Ай бұрын
Just a warning. Clean Code was written in the 2000s for enterprise applications which dozens, sometimes hundreds of people worked on. 1) Unity (and other engines) heavily uses the composite pattern, so some of the advice for general OOP will become an antipattern in that a game engine scenario. 2) the heavy emphasis on abstraction is a waste of time if you do not have parallel teams working on replacing and changing huge parts of the system and also, Unity has a different coupling through it's components+gameobjects-architecture. 3) There's a lot of advice in that book that is basically "feelings and preferences" and how clean the result is, that is debatable. Like splitting stuff into many little methods which reduces the complexity of the individual method but increases the complexity of the whole system by reduced locality of behavior. I'd still recommend to read it, but not as gospel. Try to understand where stuff comes from and you get a better feeling which parts you can apply and which parts you can transform to apply for cases that do not exactly match the scenario they were made for.
@reessoft9416
@reessoft9416 Ай бұрын
@@sealsharp i said a similar thing in a comment a while back, so i certainly agree with you. I've been using design patterns since i first started using java about 20 years ago. I just find them to be a pain, especially as part of a small team, just obfuscating things with layers of abstraction. Games are all about real time performance, and as you say, the unity architecture is based on scripting and game objects, so isn't well suited to design patterns, anyway. Unity uses the observer pattern behind the scenes for the event model, and singletons can be useful for an audio manager, or a game manager class. Beyond those sorts of things I just think design patterns add complexity, and can affect performance, if not implemented correctly. I think it's more important for people to get their heads around the way unity works, and its single threaded nature. On forums, for example, I often see people telling others to use multi threading, instead of coroutines - just a lot of bad advice from people who are not understanding the basics of the way unity has been written.
@JohnVanderbeck
@JohnVanderbeck 2 ай бұрын
Glad to see the highlight here! Unity has actually been producing a ton of great resources like this that have mostly gone under the radar. This is probably by far the best one though.
@mattrobb3566
@mattrobb3566 2 ай бұрын
Thanks that ebook is excellent as you say. Very useful indeed and should help get me out of some of my current poor design practices. So helpful!
@Deymser
@Deymser 2 ай бұрын
Thanks for showing this! I was actually learning about SOLID and all Patterns but this makes it much more easy and fun to learn!
@AaronAsherRandall
@AaronAsherRandall 2 ай бұрын
I HAVE BEEN WAITING FOR THIS OMG!!!
@carndacier
@carndacier 2 ай бұрын
That's an impressive combo. I like to think they took inspiration on your idea to build an in-editor guide / tutorial ;)
@PotatoManager420
@PotatoManager420 2 ай бұрын
Finally! Some asset from Unity that helps begginers to boost their C# skills
@royalPourceau
@royalPourceau 2 ай бұрын
Very, very cool stuff here ! The code technical debt is very concerning and slows down a project velocity very quicky
@dbweb.creative
@dbweb.creative 2 ай бұрын
It's not that a technical debt slows down a project... it's that many devs just slap things together without a proper architecture. You SHOULD think of proper architecture, as well as, of the good performance practices from the start. If you don't - chances are, later on it'll be too late, because the good architecture can look and behave completely different. Educate yourself, know how stuff works under the hood, expand default functionality with things that make your life easier (like C# delegate event wrapper classes, they can even be dictionary mapped. Also just today I added a class that invokes event on trigger enter/exit, just so I can listen to collider triggers on another GameObject. Simple things, but help a ton)
@suicune2001
@suicune2001 Ай бұрын
Oooooo, this looks amazing! Thanks!
@Veles017
@Veles017 2 ай бұрын
It is very cool! Thank you for the information!
@MarushiaDark316
@MarushiaDark316 2 ай бұрын
The way I always think about Liskov Substitution is that "all dogs are animals, but not all animals are dogs." Meaning a base class can't necessarily be substituted for a child class, but a child can be substituted for a base class. So when designing behaviours, it's important to decide whether they belong on "dog" or on "animal" if they're something that everyone will share or not, and then when you call the class, is your behaviour on the base class or the child? There's also another principle that says, "Code the rule, script the exception." In other words, hard code things that are certain and deal with anomalies as they show up. So all birds fly ... except ostriches and penguins. All mammals birth live young instead of laying eggs ... except for platypus. So a bird class with Fly and a mammal class with Birth Young still makes sense even though it's not absolute as it will handle 99% of cases.
@MrOmega-cz9yo
@MrOmega-cz9yo Ай бұрын
I need to find the time to check this out. 🤪
@AndersHPhotography
@AndersHPhotography Ай бұрын
For unity/C# Code Monkey is very top tier, no doubt !!
@hldfgjsjbd
@hldfgjsjbd Ай бұрын
I wish code in tutorials was more in-depth and future proof. They helped a lot, but later I discovered that it can be done much better. Too bad this information came from another place, like git-amend channel
@themirlabs
@themirlabs Ай бұрын
dude this looks really useful. thank you
@dbweb.creative
@dbweb.creative 2 ай бұрын
Let's say I have a lot of different animal NPCs roaming around the map (hundreds total). Do you think there would be a significant performance increase if I segment them in some way like with a dirty pattern or something alike? In my scenario most animals have a collider, but most of their function is either being there for aesthetics or a physical obstacle, and they roam around.
@JJSmalls
@JJSmalls Ай бұрын
I think your scenario is fine without a dirty flag, but it will make sense to turn off the colliders if the player is far away. Dirty flag is probably for something that's O(N^2) or higher time complexity that doesn't need to run every frame. I could be wrong.
@CodeMonkeyUnity
@CodeMonkeyUnity Ай бұрын
Yup you should definitely avoid updating NPCs that are super far away, you can indeed test the distance and mark them as dirty if past a certain distance and if they are dirty hide visuals/colliders/logic. Then if the distance is under that threshold set it dirty again and make it all visible/enabled.
@adarshmaurya7553
@adarshmaurya7553 2 ай бұрын
Really helpful video, thank you for this.
@deadspace4755
@deadspace4755 Ай бұрын
When or what level of experience do you recommend someone to start reading this? Like someone who read and practiced every video of yours(Beginner to Advanced)for one example?
@CodeMonkeyUnity
@CodeMonkeyUnity Ай бұрын
Around late beginner-intermediate level. If you're an absolute beginner then focus just on the basics like what is a variable what is a function. But if you're past that then yes you should start to learn more about how to write high quality code and not just something that works.
@deadspace4755
@deadspace4755 Ай бұрын
@CodeMonkeyUnity I have computer science degree, but l do not have faith in me. I feel rusty even if l understand programming well and when l go to practice, I freeze. That was back then. Now? l am not sure
@creativekev5215
@creativekev5215 Ай бұрын
I just started watching your Kitchen Chaos tutorial, is there any more tutorial like this in the asset store?
@The123Adrian
@The123Adrian 2 ай бұрын
Very cool stuf i add this to my queue "thinks to make"
@ExpensivePizza
@ExpensivePizza Ай бұрын
This is excellent.
@cpalta4500
@cpalta4500 2 ай бұрын
Awesome!
@jeanlsm3227
@jeanlsm3227 Ай бұрын
given what can be learned in the project, what level of a Unity Developer a person can achieve?
@robertvalentic4939
@robertvalentic4939 Ай бұрын
Is there something like this for DOTS? Entities, Bakers, Systems etc..
@CodeMonkeyUnity
@CodeMonkeyUnity Ай бұрын
Not that I know of but that would be awesome!
@elearnplay8714
@elearnplay8714 Ай бұрын
👍
@TheThursty100
@TheThursty100 2 ай бұрын
you can do MVVM in Unity!? What
@michaeldiaz4285
@michaeldiaz4285 2 ай бұрын
Is interfaces just a C language thing? I use them in c++
@aibou2399
@aibou2399 2 ай бұрын
It's a common feature in many language. C++ has no interfaces tho, only abstracts
@JJSmalls
@JJSmalls Ай бұрын
Popular in Java / Spring as well
@CodeMonkeyUnity
@CodeMonkeyUnity Ай бұрын
Many languages have something similar to interfaces, it's an extremely useful concept
@SunSailor
@SunSailor 2 ай бұрын
It physically hurts, that Unity makes a book public with singletons without a service locator or dependency injection as good practice.
@CodeMonkeyUnity
@CodeMonkeyUnity Ай бұрын
Those would be great topics to add to a future update! They've updated this e-book once so they might do it again in the future
@sisus_co
@sisus_co Ай бұрын
Yeah, the only interesting DI pattern they used was this bit in the Dependency Inversion Principle sample: // Unity's serialization system does not directly support interfaces. Work around this limitation // by using a serialized reference to a MonoBehaviour that implements ISwitchable. [SerializeField] private MonoBehaviour m_ClientBehaviour; private ISwitchable m_Client => m_ClientBehaviour as ISwitchable; Pretty underwhelming, given the importance of the pattern when it comes to the SOLID principles... but also understandable, given that it is a complicated topic in and of itself (with Unity in particular).
@Loved--
@Loved-- Ай бұрын
I got about 30 errors on import
@CodeMonkeyUnity
@CodeMonkeyUnity Ай бұрын
How so? This is a complete project, did you import it into an existing project? What errors? Maybe you opened it in an old Unity version?
@Loved--
@Loved-- Ай бұрын
@@CodeMonkeyUnity Yes, I realised I had to use unity 6, the errors are gone now. Thank you
@keahunuitechnologies
@keahunuitechnologies 2 ай бұрын
2nd last
@devangganbote4334
@devangganbote4334 2 ай бұрын
Last
@MahadAsif-g7r
@MahadAsif-g7r 2 ай бұрын
first
TOP 10 NEW Systems and Tools DECEMBER 2024! | Unity Asset Store
7:22
Steam EXPERT teaches you Game Marketing for SUCCESS!
52:22
Code Monkey
Рет қаралды 86 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 808 М.
No One Hires Jr Devs So I Made A Game
39:31
ThePrimeTime
Рет қаралды 357 М.
I Discovered the Hidden Truth About Indie Game Development
14:57
Talentless John
Рет қаралды 1,4 М.
The Power of Scriptable Objects as Middle-Men
17:41
samyam
Рет қаралды 131 М.
20 Programming Projects That Will Make You A God At Coding
14:27
The Coding Sloth
Рет қаралды 1,5 МЛН
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,6 МЛН
GENIUS Solution for HUGE WORLDS!
5:50
Code Monkey
Рет қаралды 17 М.
TOP NEW Tools and Visuals NOVEMBER 2024! | Unity Asset Store
15:31
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН