The Type Object pattern in Godot

This is all based on a chapter from Game Programming Patterns on a pattern called Type Object. I’m also using the same example Nystrom uses for his explanation of the pattern. Read his article about the pattern and then come back to learn how I would implement it in Godot. The idea is that instead of having a base class which contains some properties that are common to inherited classes, you move those properties into a different class which you then use to compose the classes that were previously obtaining the properties via inheritance. ...

November 30, 2024 · 7 min · Will Hensel