Level up your code with game programming patterns: Factory pattern | Tutorial

preview_player
Показать описание
In this video, you’ll learn about how to use the factory design pattern in your Unity project. This pattern can be used to build an interface for creating objects in a superclass, while allowing subclasses to alter the type of objects that will be created.


Timestamp:
[0:00] Intro
[0:20] Power-ups in a game level and the factory design pattern
[1:00] How the factory design pattern works
[2:23] Breakdown of the factory design pattern in action
[5:05] The example covered in the e-book
[5:24] Using a dictionary with the factory design pattern

#unity #unity3d #gameprogramming #unitygamedev #gamedev #gamedesign
Рекомендации по теме
Комментарии
Автор

I think this is a good route for Unity to take, understanding of patterns is very important for something more advanced than a school project or something like that. We need more of this!

MrShadow
Автор

Another pattern tutorial in such a short amount of time! Unity coming in with the presents like Santa for Christmas! 🎅

iHeartGameDev
Автор

These videos on programming patterns are awesome. Please keep them coming!

prometheus
Автор

Implementing programming patterns is a time saver. Even if you feel that is too hard to apply, once you have learned it, your quality of life improves.😁

paufenollosa
Автор

This is a great idea to teach.

Especially with the disclaimer up front that this is the ideal at the end work.

I always try only abstract once I find it's needed.
A sort of three or more rule that applies.

And only if it makes the code simpler to use.

alextrollip
Автор

Thank you for the e-book, example project, and the videos. I'm happy to go through these examples to expand my knowledge and practice :D

page
Автор

Love the explanations, especially the stand-up comedian theme ^^ <3 Pls keep up the great work!

firedragongamestudio
Автор

Not sure at 3:54 why we need these two different factories. They look identical. A joke is essentially only an `IJokeTeller` so we could use that as the prefab? It's even returned by `CreateJoke` 🙃

pythooonuser
Автор

This is great. Thanks for putting these together. Keep them coming :D

benjaminlehmann
Автор

This feels like a great lesson on beginner object oriented coding

thepokekid
Автор

Awesome video, thank you for this! Really well explained and set ou

tarutso
Автор

5:55 asset store has one called Serializable Dictionary, which shows dictionary in inspector, very helpful ;)

edward
Автор

Thanks again!!! Outstanding content!! As many examples as possible please :)

jacobs.
Автор

we need more - this is epic keep coming - makes me feel like using unity over unreal

PrajwalArtist-pd
Автор

Very hard to understand what is actually going on in this video. :(

ilypavan
Автор

Its a great pattern, but I feel like the example here is too complicated. You could achieve relatively the same with scriptable objects in this case.

kylemichiels
Автор

Unity i forgive you cause you have a cool animated fish and i want it

MonsterKnightGames
Автор

Very good video. You must create more tutorials for Unity nobles. This very important for popularity engine!

nickicool
Автор

thanks, Unity! now I am better at humour.

vadym.shvets
Автор

Can't we get rid of the factory class (another file) and just implement it as part of the Joke? (the creation). Just have a list like you have here of Jokes class prefab refs and the rest is simple. Or... I'm missing something? I always have this feeling that patterns sometimes overcomplicate things thank making them better. Correct me if I'm wrong with this case

spider
welcome to shbcf.ru