I started 2 years ago with Unity and C# and would consider myself an intermediate programmer. I'm also self taught. I'm working on a game with 5 other people and I'm responsible for the whole gameplay code. Basically everything except UI. Now my latest system I had to program was an event driven announcer and one-liner system. So basically anything that happens ingame could cause an event and I need to catch it and play audio tracks. Sounded pretty simple to me at first. But once I got into it I realized this would be really difficult. First of all there are so many different events and I have to keep it performant. Then I want the system to be open closed. I want to be able to add AudioEvents just by creating a ScriptableObject and setting up a few parameters.
I now sometimes try to design code with visual-paradigm.com because I want to try to design better from the start and avoid having to redesign systems after noticing they won't work as expected at some part. Also it's super hard to keep the whole design in my head and check for edge cases without having it written down. Now I tried this visual-paradigm approach with the Audio Event system an quickly noticed it didn't help me at all and I had no idea what I was supposed to do. So do you have any tips or resources I could use to learn the design process?
For those interested I ended up with a static generic EventBus<T> so events can be published and subscribed to from anywhere. I subscribe with AudioEvent<T> SOs that subscribe with their T event type and check some Conditions<T> before notifying an AudioEventHandler that they want to be played. This Handler then decides over priority and so forth. I hate that I had to make everything strongly typed. I tried a more generic version before but I ended up with Conditions that had to get their own context from the game, which was weird and error prone. Now my Conditions get the context directly from the event, but I need to do a bit more maintenance (more classes)