I am sorry if that does not mean what I tried to mean: When you are programming your game, are you sticking to one kind of design pattern, or do you have some kind of a mix of some of the patterns?
The reason I am asking this is, since Unity made it free to access their premium learning site, I decided that I might come back to game programming and try my hands on this one more time, but with proper tools and tutorials this time. Unity advanced more than I’d expect, congratulations to the team, and thanks for making learning hub free.
My learning process is, I get the basic idea, read/watch some tutorials, and then try to add more on top of it. For instance, if they are making a platformer with 3 power-ups and 2 collectibles, I’d think of new power-ups and new collectibles and try to implement it. If they are hand-making a level, I try to automate it to a degree etc. You get the idea, I set myself a next step and I try to take it.
I am not sure if this is because of lack of proper planning at the beginning of those projects, there was always a point where it’s impossible to go ahead with the project. It was usually when every script was tied to every script and a small change in scriptA would break scriptZ and in return that would break scriptW and crash the whole system whereas I was expecting a change in scriptF. And there I am, in a staring contest with my code and finally losing after a couple of weeks.
I am a doctor and I was really stressed about covid until recently. Now I have some free time on my hands and I kind of want to stay away from my profession when I’m not working. I stumbled upon a design pattern book review and thought maybe that was what I needed back then. So, I have been watching videos and reading tutorials about a couple of design patterns. The more I read about them the more I think of my “F this, I’m out” moments and how they could have helped.
A singleton GameManager would make everything easier when I was trying to pass tens of variables to tens of classes and maybe impossible situations where every class had some kind of reference to every other class and you had to sell your soul to add or remove a feature.
Or finite state machine thing would help when I was buried under dozens of bools and if statements and wondering if another bool would have made it easier.
And how about the event system I just learnt about! All those GetComponent or FindObject calls were unnecessary and nobody told me anything.
The answer already feels like “A little bit of everything”, but what’s the strategy? Do you try to stick by your chosen pattern as much as you can, do you “add some singleton on top of fsm”? And what do the tutorials on YouTube or similar platforms use when they are doing a ‘Make a FPS in 10 videos’ series? Do we have to stick to one or more design pattern?