of inheritance tree tends to cause overhead • Leaf of inheritance tree tends to be a copy from another • Tend to become less flexible when adding new feature
behavior or aspects of things • Component is the data for Entity • Component can be an empty “Tag” (ie. `Player`) #[derive(Clone, Copy, Debug, PartialEq)] pub struct Player { pub map_level: u32, } // Tag #[derive(Clone, Copy, Debug, PartialEq)] pub struct Enemy; #[derive(Clone, Copy, Debug, PartialEq)] pub struct Health { pub current: i32, pub max: i32, } #[derive(Clone, PartialEq)] pub struct Name(pub String); // Can even be a message #[derive(Clone, PartialEq)] pub struct MessageToDoSomething;