{"action":"created","issue":{"url":"https://api.github.com/repos/libgdx/ashley/issues/166","labels_url":"https://api.github.com/repos/libgdx/ashley/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/libgdx/ashley/issues/166/comments","events_url":"https://api.github.com/repos/libgdx/ashley/issues/166/events","html_url":"https://github.com/libgdx/ashley/issues/166","id":84954445,"number":166,"title":"Multiply instances of the same component type","user":{"login":"ArtCraft","id":1221783,"avatar_url":"https://avatars.githubusercontent.com/u/1221783?v=3","gravatar_id":"","url":"https://api.github.com/users/ArtCraft","html_url":"https://github.com/ArtCraft","followers_url":"https://api.github.com/users/ArtCraft/followers","following_url":"https://api.github.com/users/ArtCraft/following{/other_user}","gists_url":"https://api.github.com/users/ArtCraft/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtCraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtCraft/subscriptions","organizations_url":"https://api.github.com/users/ArtCraft/orgs","repos_url":"https://api.github.com/users/ArtCraft/repos","events_url":"https://api.github.com/users/ArtCraft/events{/privacy}","received_events_url":"https://api.github.com/users/ArtCraft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-04T07:08:36Z","updated_at":"2015-06-04T10:28:07Z","closed_at":null,"body":"I wonder what is the main reason not to allow entity to contain multiply instances of the same component type?\r\n\r\nHere is few use cases:\r\n1. entity represents a box2d body with few shapes or joints attached to it\r\n2. entity represents a character who have few animations\r\n3. entity represents a particle effect with few emitters\r\n\r\nPlease explain the reason why it is not allowed.\r\nAnd if you think that allowing it is a bad idea, please suggest some solution that allow to implement this in another way.\r\n"},"comment":{"url":"https://api.github.com/repos/libgdx/ashley/issues/comments/108831332","html_url":"https://github.com/libgdx/ashley/issues/166#issuecomment-108831332","issue_url":"https://api.github.com/repos/libgdx/ashley/issues/166","id":108831332,"user":{"login":"saltares","id":570314,"avatar_url":"https://avatars.githubusercontent.com/u/570314?v=3","gravatar_id":"","url":"https://api.github.com/users/saltares","html_url":"https://github.com/saltares","followers_url":"https://api.github.com/users/saltares/followers","following_url":"https://api.github.com/users/saltares/following{/other_user}","gists_url":"https://api.github.com/users/saltares/gists{/gist_id}","starred_url":"https://api.github.com/users/saltares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltares/subscriptions","organizations_url":"https://api.github.com/users/saltares/orgs","repos_url":"https://api.github.com/users/saltares/repos","events_url":"https://api.github.com/users/saltares/events{/privacy}","received_events_url":"https://api.github.com/users/saltares/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T10:28:07Z","updated_at":"2015-06-04T10:28:07Z","body":"@Antag99 thanks for helping out with issues :-).\r\n\r\n> But i'm gonna need to serialize all compnents for each entity ( to save level for example )\r\nLibgdx provides a [JSON serialization API](https://github.com/libgdx/libgdx/wiki/Saved-game-serialization). You can always add serialization capabilities to more complex components and add your game save logic in there. The serialization logic can be done either in the `BodyComponent` or in a separate `BodySerializer` class."}}