Community Led Training - Exploring Code Principles in Blueprint - July 18 - Peter L Newton

THANK YOU

I’m excited for everyone to join me! My plan is for everyone to be able to take away skills which they can use now to help manage and maintain their Blueprint code. This has less to do with naming conventions, but now how you layout your nodes.

I posted a tweet about this which clearly demonstrates the idea.

What typically is done.

What the results of following the guidelines.
9f12aa9d21759c9c0afc4f6fec8c4c986c7fa1d2.jpeg

Notice that instead of showing all of the high-level functions, which tell us nothing other than something is happening.

Once changed, the Blueprint Visual Scripting code itself tells us what is happening. We don’t need comment nodes, although they can help.

This loosely follows the principles called Single Responsibility Principles. It’s true definition applies to classes and modules, but I am applying it to functions. Curly’s Law is the principle used for functions. But the take away is that your code is itself is understandable.

We don’t need documentation to understand the original authors intent. So I want to bring over a lot of principles which already exist, and that I have no part in creating. I am just bringing it to you, so that you all can benefit as I do from the benefits of SRP Principles, and the others like it.

LEARN MORE

If you’re interested in SRP and SOLID. Here are some awesome articles about it.
SOLID on Wikipedia

Game Tut’s The SOLID Principles
(Game Tut’s is an amazing source for foundation game knowledge.)

Curly’s Law Principles, Similar to SRP, for functions.