Unity3D Managers vs Controllers

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

Комментарии • 74

  • @Grempington
    @Grempington 6 лет назад +11

    This pretty much aligns with what I said in the survey minus the system part, however I did have to stretch a little on what I believe system should mean because I myself never used System when naming classes, so you've got a point there.
    Is it possible to view the results of the survey? I'm just curious to see what other people thought, same as you were :)

    • @Unity3dCollege
      @Unity3dCollege  6 лет назад +5

      Here they are :) docs.google.com/forms/d/e/1FAIpQLSdd3z5gkh9Ugit_L6b-o2WP9l7jSgTpKqynjO28a-CXQH8Eag/viewanalytics

    • @Grempington
      @Grempington 6 лет назад

      Thanks!

  • @DanielStreck
    @DanielStreck 6 лет назад +113

    Please do more of this high level architecture concepts videos. That's an area that I find very lacking in content in the Unity3D community!

    • @cyqry
      @cyqry 5 лет назад +7

      Agreed. Been studying games programming for the past 5 years (3 in uni, 2 in college) and general programming (computer science, 2 years in another college).
      I was taught a lot about high level architecture and concepts in the CS course (first of the three) but almost nothing in the next 5 years of actual GAMES programming. Sure we all know how to do all kinds of games-related coding now but I found a lot of my peers can barely understand the terminology without having to go into insanely basic details to explain it. A lot of their code works fine but could be considerably more efficient if they just knew these sorts of high-level concepts.

    • @HarrisBaig
      @HarrisBaig 5 лет назад

      yess

    • @muzboz
      @muzboz 3 года назад

      Agreed!

  • @Unity3dCollege
    @Unity3dCollege  6 лет назад +46

    Just a warning, I tried using aftereffects to do some editing... emphasis on tried :) Definitely need a lot more practice :)

    • @popuzin
      @popuzin 6 лет назад

      At first look of this video I noticed that most part of the images and videos distract me from the topic. Except code pictures, this makes me concentrate more on the coding than on the video games)) Now, looking on the second time I see that all this backgrounds make sense =) will prefer static pictures on BKG than dynamic and may be more pictures of code (you know, even well-known built-in unity and assets from unity technology). However, overwatch clip was a good demonstration of uselessness of GameManager and it was in right spot and don't distract me... Hope this feedback will be useful for you ) Love your videos )

    • @Captaincook987
      @Captaincook987 6 лет назад

      The effects are quite nice in helping maintain attention, but not entirely necessary. I know for my on my channel I find editing with after effects or any other similar program to be very time consuming, and I get really burnt out on it. My only advice would be to make sure that adding in these extra effects doesn't take up too much of your time, thus, reducing the time you have to create the quality content you produce.

  • @garryhamer7615
    @garryhamer7615 6 лет назад +34

    Hi Jason - it would be really useful and informative if we could watch you set up a very simple game that uses Managers, controllers and systems so we can see exactly how you lay them it out in the project view and how you would use each of them in the game. Great verbal explanation btw, but would love to watch you implement them in real time. Cheers! :D

  • @Elesnouman
    @Elesnouman 10 месяцев назад

    I didn't realize that I needed a game manager until I realized I that I needed to relate scripts in my project and the most convinient way of doing it I'd to tie most of the same type of info into a manager. Controllers are great for groups. Managers are good for flow.

  • @skulltrail5757
    @skulltrail5757 6 лет назад +6

    Thank you, Dan Harmon

  • @johncarlogamboa7331
    @johncarlogamboa7331 6 лет назад +1

    I believe what everything I've answered in your survey reflected on this video. I really thought we'll have differing thoughts about this topic. Awesome. :D

  • @PLanTonN
    @PLanTonN 4 года назад +1

    Finally, the video I was looking for. Thank you so much!

  • @hunter_nx987
    @hunter_nx987 6 лет назад +1

    Great approach! I usually use Managers in multiplayer games where there is a lot of local interaction with the server / client and the UI. Systems use a lot when I create Editor Tools like terrain system.

  • @andywatts
    @andywatts 6 лет назад +1

    Thanks for this.
    I was using the model-view-controller lingo, but will change.
    Good to know the convention for classic unity is manager/controller.
    For ECS, I guess you just have manager entities with their components and systems.

  • @pixsaoul1494
    @pixsaoul1494 5 лет назад +3

    Personnaly I completely forbid myself to use manager and controller keyword, to force myself into having more precise and accurate description of the goal of each class. This prevent classes to become ubber managers, and keep everything SOLID ;)
    (If someone disagree, I would like to discuss this :D as it is a really interesting topic )

  • @Anathemx
    @Anathemx 5 лет назад

    Thumbs up for the audio quality 👌

  • @robbasgaming7044
    @robbasgaming7044 3 года назад

    Interesting discussion of systems. In my field of work, I'm not a game dev, a system is defined as encompassing combinations of technology and people in the context of natural, social, business, public or political environments, created, used and sustained for an identified purpose.

  • @TehAntares
    @TehAntares 5 лет назад +2

    I usually name managers as containers, in case I need to separate the search logic, I put it in separate class named provider or data provider.

  • @SirRelith
    @SirRelith 6 лет назад +2

    Thanks man. This helped me. Made me realize I'm doing good work too.
    Have a nice day! :)

  • @immapartain4712
    @immapartain4712 3 года назад

    I love this video, and I am a huge fan of the channel! I've always been interested in game dev cause I am a freak for design patterns, and I love videogames. That being said, I am extremely new to unity, and I am trying to create a weapon manager. It would be awesome if you made a video to show some basics of implementing controllers, and managers in shooters or anything of the sort. You might already haver a video out there that covers these, if so I would love to be pointed to it! Thanks for all you do, keep it up!

  • @joevaghn457
    @joevaghn457 3 года назад

    4:00 - 4:39 idk why but I seriously just died laughing. he's so right, it's hysterical.

  • @muzboz
    @muzboz 3 года назад

    Really great. Thanks Jason! :D

  • @stevenbraun918
    @stevenbraun918 6 лет назад +2

    Thank you so much! Very helpful!

  • @callmedeno
    @callmedeno 6 лет назад +4

    Really enjoying these videos. Coming into Unity I have been trying to find a balance between following Unity's lead and buying into its design patterns, but also finding this can quickly get out of control. Do you have anything on data driven design? I feel like anytime I'm mixing state with behaviour is dodgy. For something like a Player, I'm thinking have all the seperate controllers (like you mentioned, navigation, animation) attached to the game object and use the Player class for state (and where you can get references to the controllers).

  • @castlecodersltd
    @castlecodersltd Год назад

    Very interesting, thanks☺

  • @saraireyes696
    @saraireyes696 4 года назад +1

    Thx Jason!! I always am confused with these concepts. Im a begginer, and don´t know how to start.

  • @RandomGuyyy
    @RandomGuyyy 6 лет назад +1

    It's funny how similar the unwritten conventions are for the usage of these names.

  • @Kanal994
    @Kanal994 6 лет назад +2

    You worked on WoW, didnt you? I am so glad i found your tutorials =D

  • @sconosciutosconosciuto2196
    @sconosciutosconosciuto2196 6 лет назад +1

    I want to use composition for my game objects... If I have understood I should use a Input Manager that tell to an Attack Controller script (attached to my player game object)(that is useful for doing something, like a control of mana before casting...) to use the function called "Cast Spell" in the script that "derives" from interface ISpell?

    • @aronlinde1723
      @aronlinde1723 6 лет назад

      First half is well understood, the interface part might be off. If you have a system where all playable objects have a spell then yes ISpell could be useful, but if you want to have somethings have spells and others maybe attack, drink, throw then you should abstract more or you will dig yourself into a switch statement hell.
      IUsableObject could have Use(this, target) as a method. Then you could just focus on the behavior of the objects separately. Interfaces are for deriving behaviors, not functionality. The class that is attached to the interface is the functionality/structure.

    • @sconosciutosconosciuto2196
      @sconosciutosconosciuto2196 6 лет назад

      @@aronlinde1723 OK, thanks.. But what do you think about the ECS? It will destroy all these things :(

  • @benjoe1993
    @benjoe1993 6 лет назад +1

    If we have no "gameManager" per se how should we handle game states for example? Where do you usually handle pausing the game for example, that most other managers should probably know about? What is the best practice for that kind of situation where we need globally accessible variables?

    • @benjoe1993
      @benjoe1993 6 лет назад

      Forgot to add this: Great video :D It matches my answers pretty well which feels good to know :D Also I wrote a thing about Repositories. How do you feel about Repository classes that are only there to contain data (no business code) that is used by the managers?

    • @originaltenka5545
      @originaltenka5545 6 лет назад

      I use singletons....I think he has other videos on what you're asking

    • @benjoe1993
      @benjoe1993 6 лет назад

      I know about singletons. It's not the actual coding I'm interested in, but the idea of where to store such Global Game values other than in a Game Manager script?

    • @originaltenka5545
      @originaltenka5545 6 лет назад

      BenJoe72 you could use a state machine to handle pausing the game

  • @PS-vj6jz
    @PS-vj6jz 2 года назад

    Perfect. Big thanks.

  • @onesevenfourone
    @onesevenfourone 6 лет назад

    I guess it can get as complicated or as simple as you want it to be. I guess it depends on the project scope. I usually work on small to medium projects, so I tend to not over-complicate things, I feel like after a certain point you end up making the iteration process slower. And since I'm the only one coding I don't want to use too much time over-engineering systems.

  • @hesamom1781
    @hesamom1781 4 года назад

    I know it's unrelated, but what's the name of the game in the video intro?

  • @HowToMakeMobileGames
    @HowToMakeMobileGames 6 лет назад

    Great video again :)

  • @zaimatsu
    @zaimatsu 5 лет назад

    Sometimes, I create something like TimeManager but it does not fit into the definitions presented here (which I really like). What naming would you use for a class that handles time management?

    • @cristiancaze
      @cristiancaze 5 лет назад

      That bame is good, I used the same name haha, for slow motion.. pause game.. resume..

    • @tomasbaranauskas8142
      @tomasbaranauskas8142 3 года назад

      TimeFlowManager :)

  • @andyvickers9021
    @andyvickers9021 6 лет назад

    What game is that at the begining of the video?

  • @stevenbraun918
    @stevenbraun918 6 лет назад +4

    I used 1 script for 1 eg. Player / enemy I guess it's very bad 🤔😁

  • @BrainSlugs83
    @BrainSlugs83 5 лет назад

    Is "Controller" here similar to the meaning of the word in other patterns (e.g. MVC)?

    • @JordaanM
      @JordaanM 4 года назад +1

      From my understanding of the 2 terms, no, they aren't the same, though there are some overlaps. In an MVC paradigm, a "controller" is the part of the system responsible for managing communication between the view (what the user sees) and the model (the underlying data relationships).
      The term 'controller' as used in this video seems to be related to the concept of delegation of responsibilities. So, rather than having a single God class that does everything, you break it out into several controllers, each with distinct (as much as possible) responsibilities. So, if we take the example of a player character in an action game, you might have a Movement controller, Health controller, Weapon controller, Animation controller, etc. They would be all linked via some overarching class, eg "Player", that coordinates information between the different controllers, where necessary.

    • @tomasbaranauskas8142
      @tomasbaranauskas8142 3 года назад

      @@JordaanM Thanks for the clarification on this one. Can you tell me please, does that overarching class sit on a GameObject as well; alongside these controllers? So, let's say I have a Board prefab with Balls prefabs and I have a SpawnController and MoveController attached to that Board prefab. Should I call that overarching class as Board and plug it in? Also, should I access controllers by GetComponent or should I have a serialized field to hold it so that there is a guarantee that this object exist? Thanks in advance

    • @JordaanM
      @JordaanM 3 года назад

      ​@@tomasbaranauskas8142 I don't think there's a single correct answer, it varies based on your needs / situation.

  • @crazyphysicsdev2832
    @crazyphysicsdev2832 6 лет назад +7

    Your videos are so helpful and effective. I wish you would do more. Can someone recommend me other videos / RUclipsr, which offer just as much information content? I would like to learn in the most effective way with little time - would be nice if someone could give me some tips :) ( like SOLID principles)

    • @originaltenka5545
      @originaltenka5545 6 лет назад +1

      Fluffy Tiger personally...I find his methods more applicable to real world projects, the others are generally just for fun projects

  • @SoaringSimulator
    @SoaringSimulator 4 года назад

    No, I think uncle bob defines better what is a controller and a manager making define boundaries. Jason pleas can you expand this concept for unity developers inside unity components? Please read or look old bob concepts first. And make for us beginners making complex systems interacting, a hierarchy naming example structure. Thx a lot for your videos. Ps: armada?

  • @junaidijaz41
    @junaidijaz41 6 лет назад +2

    1:47 i thought you'r going to vomit... :D

    • @Unity3dCollege
      @Unity3dCollege  6 лет назад +1

      Side effect of my noob editing skills :) Normally if I mess up I just restart, this time I thought I could edit out mistakes lol :) (also a few times where I completely failed at saying words :)

    • @junaidijaz41
      @junaidijaz41 6 лет назад +2

      lolzz .. I was just kidding .. these things don't matter ithink .. you are legend

  • @mfatihbilhaq4977
    @mfatihbilhaq4977 6 лет назад +1

    Lol funny thumbnail

  • @spiral9316
    @spiral9316 6 лет назад

    Hey, cool, and thank you, for realz hehe cheers

  • @everabyss
    @everabyss 5 лет назад

    Like ( done ), Sub ( Already Done! ), Here's a request! How you should Architect your project ? According to small scale and according to medium scale projects and what are the best general practices? Thanks.

  • @shindao6
    @shindao6 6 лет назад +3

    ECS is only useful if you have a game that relies on a lot of data, for example a game like SimCity or any other building game. If you are making an MMO or any other dynamic game, it's better to use GameObject. Also the ECS that Unity implemented is bad, it will probably take them years to make it good for production.

    • @originaltenka5545
      @originaltenka5545 6 лет назад +1

      It isn't bad, that's how it was designed

    • @shindao6
      @shindao6 6 лет назад

      I don't like the way they have designed it, but anyways most of the games won't benefit from using ECS except building games.

    • @shindao6
      @shindao6 6 лет назад

      Haha.. I just don't have enough time at the moment, I did my own implementation of ECS awhile ago. The Unity team was in my house the other day and we talked about ECS, they agreed most of the games won't even benefit from it, but you can do your own research.

  • @dvsdev
    @dvsdev 5 лет назад +2

    Anyone else finding this video hard to watch? He keeps talking about managers, but keeps showing code for a controller, and video text that says controllers.

  • @nemogames5354
    @nemogames5354 3 года назад

    I didn't get it.. I don't if it's the way you explained or what, i didn't get it. And apparently, this is the only video on this subject

  • @grimmimsy7159
    @grimmimsy7159 3 года назад

    It does not pay to consistinly misuse buzzwords. System? State Machine? Index... if you are using these words right you are the only person. Unless its a internal class I would avoid them in your code at all costs

  • @iangraham6730
    @iangraham6730 4 года назад

    Noobs take note!! I know 'I' am!

  • @onesevenfourone
    @onesevenfourone 6 лет назад

    I love Unity, but you know two things that really still bothers me in Unity in 2018? 1. We still can't rebind input on runtime. Yes, you can write your own input manager and there is an open-source one on github that is pretty good. But still remaping input in runtime it's basic, like 1-on-1 making games for PC. 2. The generated mipmaps creates seams on the textures. Very annoying, another basic thing you would expect a 3d engine to do doesn't work very well in Unity.

  • @yggdrasilthousandsand3124
    @yggdrasilthousandsand3124 6 лет назад

    That female referee derailed me big time : -)

  • @dago6410
    @dago6410 2 года назад

    I dont find it productive to add garbage words to my class names.