Breaking Down my Architecture - Legacy Devlog #18

Поделиться
HTML-код
  • Опубликовано: 27 фев 2021
  • Today I'm trying to walk you through the overall architecture of Astortion. The video may not be as in-depth and exhaustive as I'd like it to be but it's honest work
    Support me on Patreon:
    / aarthificial
    Thanks so much for watching!
    And thanks to GuiGraphic for the amazing artwork:
    / guigraphic

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

  • @NICK....
    @NICK.... 3 года назад +197

    may the algorithm look upon your channel, amen

    • @NICK....
      @NICK.... 3 года назад +4

      @@gamecavalier3230 Yes yes engagement good
      Quick​ @aarthificial do a poll! Make a #shorts video on minecraft or something

    • @EthMiC_
      @EthMiC_ 3 года назад +1

      Amen

    • @OctagonalSquare
      @OctagonalSquare 3 года назад +1

      been rewatching all the videos and making sure to like them so he gets bumped up the algorithm ranks

    • @justaguyalive6762
      @justaguyalive6762 2 года назад +2

      it worked, found the channel and binging it rn

    • @NICK....
      @NICK.... 2 года назад +1

      @@justaguyalive6762 So my blood sacrifices weren't in vein
      good to know

  • @Sephta
    @Sephta 3 года назад +102

    This is incredibly insightful to a degree I have yet to see in other "devlog-indie-youtube-channels". Your progress on Astortion, and you content in general is highly educational even if its not meant to be. Thank you!

  • @oscarlundin3842
    @oscarlundin3842 3 года назад +203

    Love that you talk more about the structure of games. Im a hobbyist gamemaker and I find these more hi-concept parts hard to find good references on. Maybe I should get a book...

    • @kylevondra
      @kylevondra 2 года назад +2

      What kind of books even go over game architecture like this? I'd definitely be interested to read any related books, but I don't even know what to look for

    • @oscarlundin3842
      @oscarlundin3842 2 года назад +1

      @@kylevondra same...

    • @martincou6740
      @martincou6740 2 года назад +4

      Me too, I'm more interested in these videos because not only teaches you coding, it teaches you how to organize the code in a way or an architecture, and thats the fun about game development

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

      did you find any references on it? :c

    • @honeybadger9078
      @honeybadger9078 11 месяцев назад

      I haven't seen a one.

  • @thomasrosebrough9062
    @thomasrosebrough9062 3 года назад +58

    THIS is the cool stuff that not enough devs talk about!! Planning out the skeleton of your game can be SO much harder and more daunting than just making fun content, and yet nobody makes any videos about it. Thanks so much for sharing this!

  • @mufelo
    @mufelo 3 года назад +39

    These kind of videos are great. Definitely prefer them to "new kind of enemy!"- vlogs. Thanks for posting!

  • @vaflov
    @vaflov 3 года назад +16

    This is the first time I have seen this RuntimeInitializeOnLoadMethod thing.
    It is exactly what I needed for my project. Thank you for showing it!

  • @SteveJstone
    @SteveJstone 3 года назад +30

    That was really informative. I've been staying away from using resources because the unity docs say to avoid it, but I really like the idea of loading persistent app code this way. Thanks for sharing!

    • @aarthificial
      @aarthificial  3 года назад +10

      Thanks!
      Totally agree, 99% of the time, Addressables are the way to go. This is this one percent where Resources' downsides become actually useful

  • @tauheedgamedev2388
    @tauheedgamedev2388 3 года назад +25

    As a gamedev I find the architecture very interesting and sometimes enlightening to watch. I can definitely learn a lot from this video.

  • @benjaminlehmann
    @benjaminlehmann 8 месяцев назад +1

    That was awesome. Reallly insightful. I totally agree that devs don't talk enough about architecture - it's obvious why - but archtecture is so fundemental it really deserves more attention and coverage. Super appreciate you sharing.

  • @bilel114
    @bilel114 3 года назад +13

    I really apretiate that you include the architecture and the code desing aspect of the game.
    You're doing great work.

  • @RugbugRedfern
    @RugbugRedfern 3 года назад +10

    Super cool! I love going in-depth to game architecture. It's so useful to learn how other people handle it.

  • @_kett2164
    @_kett2164 3 года назад +11

    This was super interesting! it's cool that you go above and beyond with this architecture

  • @floatingblaze8405
    @floatingblaze8405 3 года назад +7

    I love these devlogs! It's nice to see someone using their skills to make something new, it's really inspiring!

  • @pixelboi7360
    @pixelboi7360 3 года назад +15

    Once again I have been shown how much of a frog in the well I am.
    This is truly impressive work. ReAnimator and the Save system are extrememly eye opening in terms of their complexity of construction but simplicity of execution.
    Plus the custom editors you make for all of them.
    Do I even want to ask how long it took to develop these?
    I don't know which answer to fear more, how short the time was or how long it took to get there.
    Watching these vids is always humbling and inspiring at the same time.
    Thanks for sharing the dev journey.

    • @aarthificial
      @aarthificial  3 года назад +5

      Thank you so much!
      I'm flattered by the sheer fact that these videos can be inspiring for someone.

  • @m1lkweed
    @m1lkweed 3 года назад +12

    I'm so early that the only video resolutions are 144p, 360p, and 1080p60

  • @ReedHarston
    @ReedHarston 3 года назад +2

    This is exactly the sort of thing I always want to see when watching devlogs. Thank you so much for sharing this!

  • @fancydudemanbro1158
    @fancydudemanbro1158 2 года назад +1

    I cant wait until there are speedruns of this game

  • @sodagames4980
    @sodagames4980 3 года назад +3

    Wow. This is a really good video! Very well made and great information!

  • @cavemaneca
    @cavemaneca 2 года назад +2

    To be honest, the loading/unloading structure for scenes is the part of working with Unity and game design in general that has most confused me over my years of unfinished projects.

  • @tiredko-hi-
    @tiredko-hi- 3 года назад +2

    Great as usual!
    Very informative and easy to follow.

  • @BrokenPuzzle03
    @BrokenPuzzle03 3 года назад +2

    Very interesting thanks for sharing! I can see your channel growing alot keep it up!

  • @teamjoy1968
    @teamjoy1968 3 года назад +1

    Also thanks for showing me the RuntimeInitializeOnLoadMethod, didn't knew something like that even existed ^^

  • @mrOverYeff
    @mrOverYeff Год назад +1

    This is insanely useful for me, as knowing how to structure ur project so it doesn't become a massive pain in the ass is still pretty hard for me

  • @horrornumber
    @horrornumber 3 года назад +3

    very informative I loved it

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

    this stuff is also really interesting! Just found your channel and it's been really helpful, keep it up man

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

    I really appreciate this kind of devlog. It's the part of the game people end up realizing they've never heard described in any depth.

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

    This video was very insightful, thank you. I'm in for more videos like this

  • @bamfyu
    @bamfyu 3 года назад +3

    Great devlog

  • @the_yashe
    @the_yashe 3 года назад +3

    I've watched 4-5 videos today, and you just uploaded a new one :D
    I'm really fascinated by pixel wind shader from previous episodes, but unfortunately, I failed to do it by myself. Is there any chance to get more details about it? (especially first part, without tracking player velocity to texture - only pixel perfect distortion).

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

    This is awesome! I really like these programming breakdown videos. Keep it up. :)

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

    Man… This is so high level for me. This looks so clean. I hope i will be able to learn all these ways of implementation.

  • @sinus4784
    @sinus4784 3 года назад +2

    New DevLog on my birthday? pog

  • @janpaulbergeson3557
    @janpaulbergeson3557 3 года назад +1

    Thanks for sharing! I did not know about [RuntimeInitializeOnLoadMethod] but that seems very useful.

  • @jvizcode4845
    @jvizcode4845 Год назад +1

    Amaizing. Do you use Flutter? Your scope reminds me a lot how MaterialApp and the Context are implemented.
    Do you have a more detail explanation of how are you using the Context Class? At first glance looks like a singleton but something is telling me is not.
    Great video! I am really exited to play Astortion!

  • @noodle-eater
    @noodle-eater 2 года назад

    Awesome, rarely find any devlog talking about the architecture

  • @Alain_Du_Bois
    @Alain_Du_Bois 2 года назад +2

    I love the way you explain the complex in a plain way. It is a sign of great intelligence.
    Anyway, what's the outro music?

    • @aarthificial
      @aarthificial  2 года назад +2

      Thanks!
      It's Luella Gren - There Is Something about the World:
      ruclips.net/video/E23TKjdDtow/видео.html

    • @Alain_Du_Bois
      @Alain_Du_Bois 2 года назад +1

      @@aarthificial Appreciated

  • @jomy10-games
    @jomy10-games 3 года назад

    This was very interesting!

  • @Donvermicelli
    @Donvermicelli 2 года назад +4

    Wow! The architecture looks extremely clean and elegant. It inspired me to clean up my own :) I know I am late to the party on this vid but was hoping you would be willing to clear up the way your components communicate.
    At 2:02 On the OnStart method of StoryMode we fetch the SaveService(SaveManager?) from the (static?) App class in order to handle our Saves. When explaining the OnEditorStart at 3:52 however we seemingly have static access to the SaveService without going through the App class. Did the architecture change during the making of this video or am I missing something?
    Thanks again for this super insightful look into your way of handling game architecture.

    • @aarthificial
      @aarthificial  2 года назад +1

      Thanks for pointing that out!
      I must have forgotten about it during refactoring. GetEditorSave() shouldn't be static and OnEditorStart should access it via the App class, like so: App.SaveService.GetEditorSave().
      Initially, SaveService was a singleton - this must be a relic of that.

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

    thank you! It's hard to find good talks on game architecture

  • @04tmoodyscratch24
    @04tmoodyscratch24 3 года назад +2

    Yay new one!!

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

    I see you are a man of coroutines as well, except i wish i could use them as neatly as you did here, this is really satisfying to watch honestly

  • @ailurusgames1137
    @ailurusgames1137 Год назад +1

    Hey there, thank you for this very interesting insight. Can you recommend any resources for creating this kind of architecture? Sadly most Unity related videos or blogs do not care about architecture and focus more on the quick-and-dirty way of doing something, but I would love to learn how to do it properly.

  • @EthMiC_
    @EthMiC_ 3 года назад +3

    Let the legends speak of the one that were here before 100k
    If u get 100k u deserve it

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

    Damn it man i wish i was this intelligent ❤. Love to see this system in depth

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

    Your video are awsome

  • @nix3l_
    @nix3l_ 2 года назад +2

    i know that im a bit late, but where did you learn all these patterns? I'd love to have a reference since im quite new to such high-level topics

    • @aarthificial
      @aarthificial  2 года назад +1

      I'm sorry but I don't have a satisfying answer to that.
      Most of my knowledge comes from watching GDC / Unite talks, reading the docs and scavenging through Unity's source code. I don't really have a specific place where I learn this stuff.
      When it comes to architecture, here's a really good talk I highly recommend: ruclips.net/video/raQ3iHhE_Kk/видео.html

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

      @@aarthificial alright thanks a lot!

  • @isobelshasha2095
    @isobelshasha2095 3 года назад +1

    this is really great & actually closely mirrors an architecture ive been noodling on for years. Was this by any chance inspired by the menu system outlined by the Yousician team at Unite europe 2017?

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

      Thanks! I honestly haven't seen that one but now I'll definitely give it a watch

  • @CitifiedBow225
    @CitifiedBow225 2 года назад +1

    i want to make games so bad but stuff like this is just so beyond me it makes me feel like i cant :,)

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

    If you could do a basic tutorial on how to set that up id be so thankful!

  • @PeterVerzijl
    @PeterVerzijl 3 года назад +2

    Hey man! Thanks for sharing. I am thinking of using a similar approach in the next game we are working on at the company I work for. The idea of an initialiser and the way you've implemented OnLoad looks a lot like the way we do it now. But the idea of wrapping most things in Coroutines is quite clever. And I like the state machine idea for game modes a lot.
    One thing I am going to change is the reliance on DontDestroyOnLoad for the systems. Personally I tend to dislike MonoBehaviours for systems which don't really belong in a particular scene or require things like a transform or a gameobject. I've grown to love the new UnityEngine.PlayerLoop for registering self-updating systems. But I wish there would be a StartCoroutineOwnerless for runtime instead of just the editor.
    Some implementation details you've kind of glossed over; are you planning a more in-depth look once you've solidified your thoughts/implementation of it? I'd love to learn more about your ideas for architecture.

    • @aarthificial
      @aarthificial  3 года назад +2

      Thanks!
      I would love to go back to this topic and do it justice once I have more experience with making this sort of videos

    • @mehultahiliani8797
      @mehultahiliani8797 3 года назад +1

      I agree with the point about MonoBehaviours and GameObjects, some of the more centralized persistent systems don’t really belong in a scene as components. What I generally do is have them implement an interface and have a system that makes all the classes with the interface into singletons that can be referenced easily.
      Edit: I wasn’t aware of UnityEngine.PlayerLoop, that might be just what I needed :)

    • @PeterVerzijl
      @PeterVerzijl 3 года назад +1

      @@mehultahiliani8797 Oh that sounds interesting. Can you elaborate a bit further? Do you use reflection to get all the implementations and than instantiate the singletons from there?
      And about the PlayerLoops, they are great! I've used them in our last game to make a custom audio system for managing the priority of audio sources. Since some console platforms have limitations on how many can be active at a time. Most of which needed to persist across scenes (such as background music).

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

      ​@@PeterVerzijl Yes I do use reflection! I'm a huge fan of reflection, it's such a clean approach to everything, there's no manually edited registers of instances and types and instancing can be done automatically. I have a ServiceManager class (the interface being IService) that manages all the IServices, creates instances, and relegates the game loop to them. The IService interface implements the most important Unity signals (Start, Update, FixedUpdate, etc. ) plus a couple of my own which allow the IServices to almost statically (technically not static but through a singleton instance) hook into the game loop. Additionally each IService has an OnInit method and the game has a static event called PostInit that is called after all IServices have inited. This makes it an extremely dynamic and efficient way to not worry about initialization order and have to manually edit what calls what and when.
      This is useful for things like making sure you're only performing an initialization task after all JSON has been loaded, or all Mods have inited.
      Your music system sounds great, audio priority is important and implementing your own system always makes you more comfortable with how stuff works. I'll def look into PlayerLoops, atm I have a GameObject in the scene called GameObjectProxy which just relays all its game loop methods to the ServiceManager. (It also serves as a tool to run coroutines from static classes and/or non MonoBehaviour instances).
      Edit: sorry if this was too long and deep :p

  • @silchasruin4487
    @silchasruin4487 3 года назад +4

    I like how you've implemented your architecture but watch out how you've implemented it. The dot operator acts as a GetComponent or FindObject type. I'd recommend trying to find a simpler way to design your architecture because it can be performance costly for no reason and even if you're running fine now. Once your game starts growing in scope, things start becoming spaghetti like and refactoring can become a monumental task. Great work though! Looking to see how things shape up!

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

      I don't really understand what you mean by "The dot operator acts as a GetComponent or FindObject type"
      Could you point out specific places in the code that you're referring to?

    • @silchasruin4487
      @silchasruin4487 3 года назад +1

      @@aarthificial for example your Context.so on so forth code... when you're referencing other classes and functions in other scripts

    • @aarthificial
      @aarthificial  3 года назад +1

      I'm sorry but it seems like you've made some false assumptions about how the "Current" property has been implemented.
      I think it's pointless to discuss things like performance or code structure without knowing the implementation details, but if you have an example of a simpler architecture I'd be more than happy to see it

    • @silchasruin4487
      @silchasruin4487 3 года назад +2

      @@aarthificial @aarthificial I don't know what your code base looks like so you're right about it being pointless discussing those things. Its just something to keep in mind as you grow your game. Your performance may not be an issue even on the slowest system's and I'm not assuming you don't know what you're doing, I would just try to keep things as simple as I can. Don't mean to question or put down any of your work.

    • @aarthificial
      @aarthificial  3 года назад +2

      Don't get me wrong, I do appreciate your insights, it's just that with your comments alone I'm still not sure how to improve my current architecture. So if you have any examples/resources on how to design a proper, simple, and performant architecture in Unity, I would genuinely love to see that

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

    Thank you! What's your theme & font for ide? I really liked the colors & font

  • @santi5655
    @santi5655 3 года назад +5

    i thought this was about unity's architecture, the title is not clear

  • @itsME-dc4vm
    @itsME-dc4vm 3 года назад +3

    Nice ;D

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

    I am curious about that App.Backdrop. Currently in my game scene-switching is a big problem, because no solution I've found has been satisfactory. How does this work?

  • @mehultahiliani8797
    @mehultahiliani8797 3 года назад +1

    This is gonna sound crazy but as a fellow indie dev with an unfortunate addiction to over-engineering, I have a strangely similar structure, just that the distinction between global and scene scope doesn’t really have a “transition class” like your Context, I just write scrips that run in the scene scope in a separate C# namespace than the global scope scripts, so I can easily track all references they have to each other and port them to assemblies and packages later. Your system seems better and more over engineered tbh tho 😆

  • @Ezzataii
    @Ezzataii 3 года назад +1

    What is the point of loading in the Initial Scene in case 1 and default in editor mode?

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

      The initial scene is a loading screen. It persists throughout the entire game and is used to hide transitions between other scenes.
      In the cases you've mentioned, the game would have been started using a scene other than the initial one, so it needs to be loaded in.
      This way I don't need to switch back to the initial scene every time I want to play the game

  • @teamjoy1968
    @teamjoy1968 3 года назад +1

    why so little views :

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

    god people are so much better at programming than I am

  • @Narutoninjaqiu
    @Narutoninjaqiu 3 года назад +1

    bump

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

    Bro what the fk do I need to learn to get this good? I've been coding on Unity for 4 years and I have some really shitty coding practices. I can't even architect game systems.