What Is The Pattern?

The Flyweight pattern is a data organization pattern where a shared set of information is created as a single object. Then, any object references that single piece of data when the object needs said data. This reduces the duplication and makes it easier to change a bunch of objects by changing the one set of data. It’s particularly useful for a nominal or static set of data properties. Common examples are usually in 3D games: shared meshes, team attributes, etc. To my knowledge, it is a memory cost saving pattern that helps organize the objects that one has created, since these properties do not change once created

How I Used It

Image for post

#unity #programming #gamedev #game-design

Game Design with Programming Patterns: Flyweight
2.65 GEEK