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
may the algorithm look upon your channel, amen
@@gamecavalier3230 Yes yes engagement good
Quick @aarthificial do a poll! Make a #shorts video on minecraft or something
Amen
been rewatching all the videos and making sure to like them so he gets bumped up the algorithm ranks
it worked, found the channel and binging it rn
@@justaguyalive6762 So my blood sacrifices weren't in vein
good to know
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!
Thank you, too!
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...
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
@@kylevondra same...
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
did you find any references on it? :c
I haven't seen a one.
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!
These kind of videos are great. Definitely prefer them to "new kind of enemy!"- vlogs. Thanks for posting!
Thank you, too!
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!
Glad I could help!
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!
Thanks!
Totally agree, 99% of the time, Addressables are the way to go. This is this one percent where Resources' downsides become actually useful
As a gamedev I find the architecture very interesting and sometimes enlightening to watch. I can definitely learn a lot from this video.
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.
I really apretiate that you include the architecture and the code desing aspect of the game.
You're doing great work.
Thanks so much!
Super cool! I love going in-depth to game architecture. It's so useful to learn how other people handle it.
This was super interesting! it's cool that you go above and beyond with this architecture
Thanks!
I love these devlogs! It's nice to see someone using their skills to make something new, it's really inspiring!
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.
Thank you so much!
I'm flattered by the sheer fact that these videos can be inspiring for someone.
I'm so early that the only video resolutions are 144p, 360p, and 1080p60
This is exactly the sort of thing I always want to see when watching devlogs. Thank you so much for sharing this!
I cant wait until there are speedruns of this game
Wow. This is a really good video! Very well made and great information!
Thank you!
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.
Great as usual!
Very informative and easy to follow.
Thank you!
Very interesting thanks for sharing! I can see your channel growing alot keep it up!
Also thanks for showing me the RuntimeInitializeOnLoadMethod, didn't knew something like that even existed ^^
Glad to help!
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
very informative I loved it
Glad to hear that!
this stuff is also really interesting! Just found your channel and it's been really helpful, keep it up man
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.
This video was very insightful, thank you. I'm in for more videos like this
Great devlog
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).
This is awesome! I really like these programming breakdown videos. Keep it up. :)
Thanks!
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.
New DevLog on my birthday? pog
All the best!
Thanks for sharing! I did not know about [RuntimeInitializeOnLoadMethod] but that seems very useful.
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!
Awesome, rarely find any devlog talking about the architecture
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?
Thanks!
It's Luella Gren - There Is Something about the World:
ruclips.net/video/E23TKjdDtow/видео.html
@@aarthificial Appreciated
This was very interesting!
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.
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.
thank you! It's hard to find good talks on game architecture
Yay new one!!
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
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.
Let the legends speak of the one that were here before 100k
If u get 100k u deserve it
Thank you 🖤
Damn it man i wish i was this intelligent ❤. Love to see this system in depth
Your video are awsome
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
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
@@aarthificial alright thanks a lot!
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?
Thanks! I honestly haven't seen that one but now I'll definitely give it a watch
i want to make games so bad but stuff like this is just so beyond me it makes me feel like i cant :,)
If you could do a basic tutorial on how to set that up id be so thankful!
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.
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
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 :)
@@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).
@@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
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!
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?
@@aarthificial for example your Context.so on so forth code... when you're referencing other classes and functions in other scripts
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
@@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.
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
Thank you! What's your theme & font for ide? I really liked the colors & font
i thought this was about unity's architecture, the title is not clear
Nice ;D
:D
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?
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 😆
Thanks xD
What is the point of loading in the Initial Scene in case 1 and default in editor mode?
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
why so little views :
god people are so much better at programming than I am
bump
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.