- Published on
Learning SOLID Principles
- Authors
- Name
- Ryan Flores
- @_TrustyTea
Hello everyone,
This week, I've been focusing on studying game development and code architecture. While I did work on pixel art a little bit, creating a new character design of an arcane mage, I have decided to not pursue art any further as I am going full steam on my coding and making sure I am a better coder.
One of the most beneficial things I've done this week was joining a discord community of friendly and helpful developers. They've given me lots of pointers and even my first code review! Through this community, I was introduced to the concept of code architecture, which I knew I should have been learning for a while. Although it's a lot of information to take in, I'm glad I was introduced to it early on in my game development journey.
While development on my game has stagnated just a little bit, I have grown so much in knowledge. This week I have been researching the SOLID principles, which are a set of guidelines for writing maintainable and scalable code. The SOLID principles consist of five principles: Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion.
I also learned about interfaces and how they are different from classes and can be utilized to enhance my code. I started this week by learning the Single Responsibility principle, and ended it by starting to apply it to my Pong Remake game. For example, in my Pong Remake, I separated the movement and collision detection logic into separate classes to adhere to the Single Responsibility principle. This will make it easier to make changes and add new features to the game in the future.
Overall, it's been a challenging but rewarding week as I continue to learn and improve my skills in game development. I am looking forward to applying what I've learned to my game and seeing the positive impact it will have on my code.