Hey everyone! Today is the first in a short series about MVP/MVC - starting with a topic most game devs avoid (including me - sometimes)! As this series will continue next week, please add questions/comments here or on Discord! 👍
@stevehamilton32111 ай бұрын
Another gem.... and I say this without having watched it yet. I look more forward to your new videos than my 5 year old looks forward to Christmas! Your effort is greatly appreciated : )
@git-amend11 ай бұрын
Appreciate the vote of confidence! Cheers!
@MarushiaDark31611 ай бұрын
When I saw "MVP" in the title, my first thought was you'd be encouraging people to develop "minimum viable product" and talk about the importance of prototyping - that is, working out small isolated proofs of concept before wiring them up to the rest of your systems. I've personally developed the mneumonic: Plan -> Prototype -> Playtest -> Polish -> Publish as a general workflow guide.
@bbrainstormer203611 ай бұрын
That is important, but not really relevant to his channel
@AlCh3mi_MvP11 ай бұрын
I learned so much from watching this despite having implemented my own tests recently, all my looking into testing in unity taught me was syntax. Here are good practices, architectural considerations and so much more! Love your channel and videos, cant wait for the next one!
@git-amend11 ай бұрын
Great to hear!
@wendten211 ай бұрын
Why do you still only have 5k subs? You need to do some more marketing man, your content is very high quality and a natural step to learn more mediocre/advanced stuff, as 99% of all YT unity content is for people with less than 1year of experience I have been developing in unity for 5+ years, and your channel is one of a select few that i can still learn from
@git-amend11 ай бұрын
Thanks for the kind words!
@letsgoPi11 ай бұрын
i think game dev is a rather niche audience already and majority people when looking for game dev channels want specifically 'how do i get x to do y' videos, how do i move a character, how do i keep score, how do i make an inventory. this guys channel has some of that but also a lot of information on more abstract concepts, it's really a great resource but idk if it lends itself to getting a lot of views. regardless just need the people who are watching to continue to like and comment to help out
@mehmedcavas306911 ай бұрын
Havent watched the video yet but I also use mvc for most of my project with zenject for dependency injection. helps me separate the game logic from visuals. good for writing unit tests, create tests scenes for individual system, make the game scaleable and I think it is way cleaner than having logic/manager objects in the scene
@git-amend11 ай бұрын
Right on! I totally agree! Let me know if you have any insights to add after you watch!
@mehmedcavas306911 ай бұрын
@@git-amend Just watched everything and I can say such a great video. Didnt know you add the TestCase attribute for parameters. For the MVC I do something different. My controllers do not now anything about views. They call events (or a bus) if something changed. The views listen to events if something changed and they can read data from models. In the past a read the data from controllers but this made it difficult to read the code
@git-amend11 ай бұрын
@@mehmedcavas3069 Thanks for the feedback! I agree with the bus method and decoupling even more, and will be touch on those ideas a bit more in the next video! Cheers!
@PaulRobello11 ай бұрын
Lets Game It Out is amazing! The way he finds every little thing that can be exploited is awesome. And his mantra of "Is there a limit" for sure makes you think about sanity checking every value and action.
@git-amend11 ай бұрын
Hahah yeah ain't that the truth!
@shunpeng570011 ай бұрын
What a gem. You taught more than even my software architecture course
@git-amend11 ай бұрын
Thanks! Part 2 coming next week!
@bbrainstormer203611 ай бұрын
This is great. Can't wait for part 2. I love how simple you make everything seem
@git-amend11 ай бұрын
Thanks!
@MarekNijaki11 ай бұрын
Omg... You are very skilled developer and tutor. Great video! One note from my side tho: could you consider lower pace? Like 10percent slower? I felt my brain was going to overcook at some point trying to follow with the content xd
@git-amend11 ай бұрын
Thanks! I'll see what I can do.
@adriankovatana11 ай бұрын
Exactly what I was looking for. Good stuff! Looking forward to part 2.
@git-amend11 ай бұрын
Awesome, thank you!
@letsgoPi11 ай бұрын
hey brother i really enjoy your video style and concept choices so thanks very much for the content.
@git-amend11 ай бұрын
I appreciate that!
@peche87_gameDev11 ай бұрын
Great content as usual! Waiting for the next part :)
@git-amend11 ай бұрын
Thanks! 😃 Coming soon!
@Offai5011 ай бұрын
Another banger of a video. Do you have any recommendations on books for general architecture similar to you're videos or C#?
@git-amend11 ай бұрын
I've added a pinned list in the programming section of the Discord for ya
@Offai5011 ай бұрын
@@git-amend thank you so much 🙂
@gonzaloasencio450311 ай бұрын
I was just about to start studying this, thank you very much for these tutorials
@git-amend11 ай бұрын
You're very welcome!
@kevin4130711 ай бұрын
Can't wait for part 2!!
@git-amend11 ай бұрын
👍
@SuperTungbi11 ай бұрын
An another awesome video, advance unity, just what i looking for, thank you for your great work, keep it up 🎉
@git-amend11 ай бұрын
Thanks! More to come!
@claudiogallardo638311 ай бұрын
You are awesome, thanks for sharing! Thanks to you, Unity framework finally nakes sense to me.
@git-amend11 ай бұрын
Great to hear!
@publiclag11 ай бұрын
I've been developing with Unity for over 15 years but always found unit tests too daunting to tackle in Unity (also, all these tools didn't exist yet for most of the time). Your video inspired me to give it a new shot. I use unit tests for serverside stuff because there it makes a lot of sense to me. I didn't know Unity finally had a functional framework for testing real-time code. And this is not a topic a lot of people write/talk about. So thanks! PS: Could you add subtle breaks between sentences/paragraphs? It all goes pretty damn fast and I find myself having to pause / rewind, since I can't grasp the code while there's talking.
@git-amend11 ай бұрын
Good to hear! Thanks for the feedback!
@brunogattai926211 ай бұрын
Great video! It would be nice if you explain how to make multiple related components work with each other while respecting the MVP/MVC model. For example: a complex combat system where the player has multiple stances and stats and can perform different combos and abilities (block, parry, etc).
@git-amend11 ай бұрын
Well, I don't know how much I can pack into one video, but your suggestion has given me a few ideas.
@Laumania8 ай бұрын
Really interesting video! May I ask, what software are you using for these diagrams? Really like the style of it :D
@git-amend8 ай бұрын
Thank you! I'm using the ExcaliDraw plugin for Obsidian - kzbin.info/www/bejne/pWHIqX5jrauDac0
@Laumania8 ай бұрын
@@git-amend Have had on my todo to find a class similar to your Precondition one for a while (but you know, its never that time where you wanna make stuff like that easier :P) Anyway, now I saw yours and would use that as a starting point, however it doesn't like that obj.OrNull() method? Where is that extension method defined? :)
@git-amend8 ай бұрын
@@Laumania Oh yeah, I know the feeling! I actually forgot I included that extension there, I should have included it in the gist. Regardless, it's in repo from my Extension Methods video here: github.com/adammyhre/Unity-Utils/blob/master/UnityUtils/Scripts/Extensions/GameObjectExtensions.cs
@Laumania8 ай бұрын
@@git-amend Awesome! Thanks :)
@kr1s8511 ай бұрын
Nice video. It would be great if you could provide an architecture overview (like MVC or other models) for Netcode with game objects. I often find myself confused about who is responsible for what, especially in a Host-Client architecture.
@damonfedorick11 ай бұрын
Another nice one.
@git-amend11 ай бұрын
Thanks again!
@Forture-fm1ve11 ай бұрын
Great video. I'm facing a bit of an issue with transitioning between mini-games, and every time I add a new mini-game, there's a significant challenge. Are there any suggestions for an easy way to add mini-games and handle transitions between them without having to use Design Patterns? I've been thinking about using the Factory pattern. Can you provide some advice? Thank you very much.
@techdave9911 ай бұрын
Do you go into more detail about assembly definitions in another video? Or do you know of another video that does?
@git-amend11 ай бұрын
I will probably make one in the future, but for now check out LlamAcademy's video here: kzbin.info/www/bejne/p6HVi3uFhdplhas
@techdave9911 ай бұрын
@@git-amendThanks.
@LuizMoratelli24 күн бұрын
Any tips to mock a monobehaviour singleton? :P
@Wobling11 ай бұрын
Interested in the editor functionality you have when hovering a folder and you have what looks like a create folder and create script shortcut, can you share any info on this?
@git-amend11 ай бұрын
That's from this Asset here, I think it's free: assetstore.unity.com/packages/tools/utilities/project-context-actions-267429 I'm still evaluating if I like it or not.
@drland9638 ай бұрын
Thank you for sharing; it's very helpful! Could you tell me the tool you use to design the overview? Thank you
@git-amend8 ай бұрын
ExcaliDraw for Obsidian
@drland9638 ай бұрын
@@git-amend oh really thank you
@ezoray10 ай бұрын
I have a bit of a testing dilemma I'd be grateful for some help with. I have a MonoBehaviour (ClassA) that needs to access other MonoBehaviours (ClassB and ClassC). This is no problem as I can create SerializedFields and drag those MonoBehaviours in via the inspector and all is good. The problem is when I come to testing ClassA and I want to check the calls to ClassB and ClassC are made correctly, I can't mock these classes as they are. If I implement them using an interface I can no longer drag them in via the inspector. What is the best option here? I'm looking into backing the MonoBehaviours with plain C# classes which looks good so far, but are there better alternatives?
@git-amend10 ай бұрын
If you are having a tough time mocking using Interfaces, you can also mock any Class method marked as virtual. (The method you want to spy on has to be overridable) Check the documentation here: github.com/Thundernerd/Unity3D-NSubstitute?tab=readme-ov-file
@ezoray10 ай бұрын
@@git-amend thanks for the quick reply, that has worked. Marking methods as virtual might just be the most painless way to go. 👍
@ezoray10 ай бұрын
@@git-amendAh wait nevermind it creates a MonoBehaviour with 'new' going that route. Maybe backing with a plain C# class is the only option.
@git-amend10 ай бұрын
@@ezoray Hm, yeah I didn't think of that. I'll be covering how to serialize interfaces in a future video as well, which will let you implement an interface and drag your MonoBehaviour references in Unity that way. There are some tools on the store that will do that as well.
@ezoray10 ай бұрын
@@git-amend Great I'll look out for that. You're right I should look around for tools for this, I'm a bit bemused it's so easy to wire up dependencies but then so awkward to test, being able to serialize interfaces would be a godsend. Thanks for getting back to me.
@rhapsodicmajor5965 ай бұрын
Thank you
@git-amend5 ай бұрын
You're welcome!
@MarushiaDark31611 ай бұрын
To this day, I still don't understand the point of building unit tests, vs. just playtesting. That's likely down to my ignorance, rather than it being pointless, but I'm still searching for a satisfactory answer. It seems like you're having to write double the code for every system in your project on top of existing precautions like guard clauses, null checks, and log statements that should already give errors and messages. So yeah, I don't grok the point of this. Your video just sort of implied it was understood as good and necessary - and I hear software engineers talk about it all the time - but maybe a follow up video can go into depth as to the *why* we're even bothering in the first place. Why it's not sufficient to just play test the game a bunch or use console logs and things like that. Is this something you should do for ALL projects or just those that reach a sufficient size and complexity?
@git-amend11 ай бұрын
I can talk about it a bit in the next video. Others might have similar questions. In short - I would not write tests for small projects (less than a month of development time, like a game jam) - however, the bigger your projects grows the more helpful unit testing becomes. It can become tedious to play test a bigger game every time you make changes. While writing tests does require initial effort, in the long run, they save time by quickly catching bugs and issues that might only be discovered through extensive manual testing.
@abraiyan798411 ай бұрын
Awesome
@git-amend11 ай бұрын
Thank you!
@falricthesleeping97178 ай бұрын
I still can't get behind MVC for game development, the domain that MVC and other similar patterns were born were not in game development where data and representation of stuff is so much more complex than a 2d representation of windows and some blittable types, I see the use when you want to test stuff, but I always feel this is wrong approach for achieving tests in unity.
@git-amend8 ай бұрын
I don't adhere to it strictly; for me it's mostly about separation of concerns.