Design Patterns in Game Development

preview_player
Показать описание

Design patterns are well-known solutions to common programming problems. In this video we'll discuss whether or not they should be used in game development.

#GameDevelopment #DesignPatterns

00:00 Introduction
02:02 Why do beginners use design patterns?
03:41 How were design patterns meant to be used?
04:33 Should you use design patterns in game development?
06:15 How do you write code without using design patterns?
07:27 Join our community of game developers

My Favorite Unity Assets 💯⤵️

* Disclosure: These are affiliate links, which means I'll receive a commission if you use them to make a purchase.
Рекомендации по теме
Комментарии
Автор


00:00 Introduction
02:02 Why do beginners use design patterns?
03:41 How were design patterns meant to be used?
04:33 Should you use design patterns in game development?
06:15 How do you write code without using design patterns?
07:27 Join our community of game developers

InfallibleCode
Автор

I remember a thing you said about design patterns in one of your videos, it went something like this: "Design patterns are like solutions to a problem, it's better to have encountered the problem first than going for the solutions before hand", that stuck with me.

RonnieBanerjee
Автор

Did anybody else expected a response like "FUCK YOU I'M USING MVC TO MAKE THE NEXT HIT!"?

ozgunleventkaya
Автор

So... this is a tutorial on how to thoughtfully reply to a question on Discord 🤔

Faygris
Автор

Don’t over-engineer for a problem that doesn’t exist. Make it work, then clean it up.

Real example: I used a switch statement to decide which function to call on Start for spawning a gameObject. Each function spawned the same gameObject differently, giving it different settings. This worked, but I noticed all these different settings could be encapsulated into individual classes rather than one monolithic spawner class. Thus, I implemented the Strategy Pattern. The pattern itself rose naturally from the code. It was not something I preplanned.

TyberZann
Автор

Just jump into coding isn't the way either. From the mere mention of it you were able to say that MVC was not an appropriate pattern for a game. Why? Because it isn't. And you know that not because you developed a "UI heavy strategy game", but because you understand the pattern at some level.

However, the reason is not "it is for web apps". There are plenty strategy games implemented over MVC platforms,

JuanPablodelaTorre
Автор

I have mix feelings about this video. I've been work in gaming industries for a while, in my current job we implement code starting with TDD. We make unit testings in a way that was completely decouple from unity behavior or hardcoded dependencies with unity. MVC worked like a charm this way cause we leave all unity logic or implementations on presenters or view (Monobehaviours), and even worked on projects with MVVM approach (Using scriptable objects).

My question is, if you have a project for a game and you know that you have to build the entire system to be flexible enough to scale properly and have a good set of tests, do I need to wait to encounter the problem to then select a design pattern? Isn't that approach stomping on the same rock over and over?

And btw, for me it's extremely difficult now to start a project and not thinking in a design patters or the architecture of the game before hand.

This is definitely a great topic to cover.

Keep up the good work guys.

IsmaelSerrada
Автор

Just when I really discovered the channel, you were gone. Great to see you back in action :D

lukass
Автор

There's always something to learn from your content, even if it's a familiar topic. Great to see you back ❤️

lukakldiashvili
Автор

Love the pet sneaking in on Charles' side of the video. :)

hotroddd
Автор

Working in a big game studio, we use MVC for UI features of the game (menus, widgets) but we just do Model / ViewController. Nice to see you back :) and good video.

shaunyitisme
Автор

OMG this is happening! I almost quit Game Dev, but not anymore!! Welcome back!! ❤

RonnieBanerjee
Автор

I always wondered why every time I try to implement MVC in my apps it makes them clusterfuck. Your channel is a gold mine.

mastermati
Автор

Using at first design patterns to solve all your problems normally it ends with an over-architecture solution even a really complex code when it only needs to do 2 + 2. To write good code since the beginning only think in design principles like SOLID, KISS, DRY... etc. With this in mind the next level is when your code smells too complicated, so the time of design patterns comes. Nice video!!

xXjoakinXx
Автор

Oh man, the serious thumbnail gaze. You'd look right at home on a Fast and Furious 9 poster.

dyemos
Автор

I was starting to worry that 2020 got you too.

puretrack
Автор

It's pigeon *hole or holed :) Great video! I'm currently experiencing the paralysis-by-analysis effect, literally just told my wife that last night. Thanks for the advice and encouragement!

ezgoodwin
Автор

You've just might be filled the last blank part in my head to take a couple steps further. I've been and still am learning a lot about game development and I've recently found myself in advanced level docs and tutorials but I've made a little mistake that I did not really care about basics and fundementals when I was trying to become a developer at collage and after. At one point I decided to become a game developer I just jumped into it and made a lot of games by learning what I needed to know to write required features and today I'm writing editor feautures for our art people to easily do what they need to do whenever I find time from my actual tasks going on. Many packages that I use are sometimes not enough for what I need them for so now I can easily read and edit most of them. But because of that mistake I started feel the gap in between my knowledge, It really says that I just need to simply learn and practice these and I now feel confident so I know that it won't be as hard as I thought. Thank's for not being lazy to enlighten your colleagues, I might just start take a look at unity community forums sometimes to share whatever I know..

Umut-iyyy
Автор

All these characters Charles plays makes me wonder - are we all just figments of his imagination, created solely for the purpose of demonstrating a concept in a Youtube video?

strawhenge
Автор

Welcome Back Charles and Barles. Glad to see yall in my notifications again with entertaining gamedev skits for 2021. It's always good to take breaks now n then to unwind which is understandable. Thanks to finding you guys, Cherno and few others all got me into learning gamedev past 3 years. Havent made anything yet since im apporaching things slowly but one day i'll get there.

CreativeSteve