I am making 2 games at the time and when my buddy saw my codes he said im getting good at coding but obviously my code is “spaghetti code” and I should study some design patterns such as “N-layer” and others. what would some of the best design patterns for godot and game design be?
TBH, I’ve never heard of N-Layer architecture. It’s apparently just MVC (Model, View, Controller) with another name. It’s a great architecture for web development. It’s not great for Godot IMO.
I would recommend starting with just OOP principles. Especially encapsulation. Godot is made up of nodes. You want each node to do its job and communicate with other nodes.
Here’s an article to get you started. Understanding OOP will help you understand design patterns.
Design Patterns are an application of object-oriented programming. I’m suggesting you learn addition, subtraction, multiplication and division before you try to tackle geometry.
Head First Design Patterns is a great book I’d highly recommend. It’s not related to game development at all, but if you want to learn about design patterns I can’t think of anything better.
(OK, technically the original “gang of four” design pattern book might be “better” but its very dry and much harder to read in my opinion. I also realise I have the most experience in Java, which is why I probably found the Head First book easier to understand )