Closed NathanLovato closed 5 years ago
OK, so I've been thinking of how to visually show this for a bit now. I came up with a simple example:
I need your feedback/suggestions on how to go about this. I initially planned on making a secondary abstract view on the bottom of the screen, like a panel that shows how the events are triggered and linked to objects, but the example is too simple for that. There's just two events: attacked
from Player
& damaged
from Dummy
and it goes like Player - attacked
-> Dummy damaged
-> update Player EXP UI
.
The thing is signal management can be pretty complex if not thought through, could even lead to circular dependencies so any thoughts on how we could show (perhaps non-linearly) how this is in practice (a network of nodes & connections that blink when signals are emitted/received?) or something like that.
Or is the example above enough you think?
So as topics to be expanded upon I have:
Events
singleton "pattern" in code to manage complex systemsI'm thinking of having the same simple example from above made with:
Events
pattern in codecc @NathanLovato
The example above is enough, along with your explanations and showing some of the code. You don't want to spend too much time on such a video that targets experienced developers, but also as it's not going to get a ton of views. Considering our code will keep getting better, that our use of the pattern might change as we develop more games, and that future Godot updates may improve signals so that this pattern isn't as useful anymore, I prefer that we keep moving forward at a good pace.
Alright, I've thought about this and I think I got it to a level I'm happy with. I'll be recording the vid tomorrow morning.
The video: https://youtu.be/S6PbC4Vqim4
See the corresponding section in the gdscript guidelines